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 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.Function<TdApi.Ok>
      Returns:
      this.CONSTRUCTOR