Class TdApi.SendGiftPurchaseOffer

Enclosing class:
TdApi

public static class TdApi.SendGiftPurchaseOffer extends TdApi.Function<TdApi.Ok>
Sends an offer to purchase an upgraded gift.

Returns Ok

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Identifier uniquely determining type of the object.
    int
    Duration of the offer, in seconds; must be one of 21600, 43200, 86400, 129600, 172800, or 259200.
    Name of the upgraded gift.
    Identifier of the user or the channel chat that currently owns the gift and will receive the offer.
    long
    The number of Telegram Stars the user agreed to pay additionally for sending of the offer message to the current gift owner; pass userFullInfo.outgoingPaidMessageStarCount for users and 0 otherwise.
    The price that the user agreed to pay for the gift.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for a function, which sends an offer to purchase an upgraded gift.
    SendGiftPurchaseOffer(TdApi.MessageSender ownerId, String giftName, TdApi.GiftResalePrice price, int duration, long paidMessageStarCount)
    Creates a function, which sends an offer to purchase an upgraded gift.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns an identifier uniquely determining type of the object.

    Methods inherited from class org.drinkless.tdlib.TdApi.Function

    toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • ownerId

      public TdApi.MessageSender ownerId
      Identifier of the user or the channel chat that currently owns the gift and will receive the offer.
    • giftName

      public String giftName
      Name of the upgraded gift.
    • price

      public TdApi.GiftResalePrice price
      The price that the user agreed to pay for the gift.
    • duration

      public int duration
      Duration of the offer, in seconds; must be one of 21600, 43200, 86400, 129600, 172800, or 259200. Can also be 120 if Telegram test environment is used.
    • paidMessageStarCount

      public long paidMessageStarCount
      The number of Telegram Stars the user agreed to pay additionally for sending of the offer message to the current gift owner; pass userFullInfo.outgoingPaidMessageStarCount for users and 0 otherwise.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      See Also:
  • Constructor Details

    • SendGiftPurchaseOffer

      public SendGiftPurchaseOffer()
      Default constructor for a function, which sends an offer to purchase an upgraded gift.

      Returns Ok

    • SendGiftPurchaseOffer

      public SendGiftPurchaseOffer(TdApi.MessageSender ownerId, String giftName, TdApi.GiftResalePrice price, int duration, long paidMessageStarCount)
      Creates a function, which sends an offer to purchase an upgraded gift.

      Returns Ok

      Parameters:
      ownerId - Identifier of the user or the channel chat that currently owns the gift and will receive the offer.
      giftName - Name of the upgraded gift.
      price - The price that the user agreed to pay for the gift.
      duration - Duration of the offer, in seconds; must be one of 21600, 43200, 86400, 129600, 172800, or 259200. Can also be 120 if Telegram test environment is used.
      paidMessageStarCount - The number of Telegram Stars the user agreed to pay additionally for sending of the offer message to the current gift owner; pass userFullInfo.outgoingPaidMessageStarCount for users and 0 otherwise.
  • Method Details

    • getConstructor

      public int getConstructor()
      Description copied from class: TdApi.Object
      Returns an identifier uniquely determining type of the object.
      Specified by:
      getConstructor in class TdApi.Object
      Returns:
      this.CONSTRUCTOR