Class TdApi.MessageUpgradedGift

Enclosing class:
TdApi

public static class TdApi.MessageUpgradedGift extends TdApi.MessageContent
An upgraded gift was received or sent by the current user, or the current user was notified about a channel gift.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean
    True, if the gift can be transferred to another owner; only for the receiver of the gift.
    static final int
    Identifier uniquely determining type of the object.
    int
    Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT; 0 if NFT export isn't possible; only for the receiver of the gift.
    The gift.
    boolean
    True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift.
    boolean
    True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift.
    long
    Number of Telegram Stars that were paid by the sender for the gift; 0 if the gift was upgraded or transferred.
    int
    Point in time (Unix timestamp) when the gift can be resold to another user; 0 if the gift can't be resold; only for the receiver of the gift.
    int
    Point in time (Unix timestamp) when the gift can be transferred to another owner; 0 if the gift can be transferred immediately or transfer isn't possible; only for the receiver of the gift.
    Unique identifier of the received gift for the current user; only for the receiver of the gift.
    Sender of the gift; may be null for anonymous gifts.
    long
    Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift.
    boolean
    True, if the gift was transferred to another owner; only for the receiver of the gift.
  • Constructor Summary

    Constructors
    Constructor
    Description
    An upgraded gift was received or sent by the current user, or the current user was notified about a channel gift.
    MessageUpgradedGift(TdApi.UpgradedGift gift, TdApi.MessageSender senderId, String receivedGiftId, boolean isUpgrade, boolean isSaved, boolean canBeTransferred, boolean wasTransferred, long lastResaleStarCount, long transferStarCount, int nextTransferDate, int nextResaleDate, int exportDate)
    An upgraded gift was received or sent by the current user, or the current user was notified about a channel 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.Object

    toString

    Methods inherited from class java.lang.Object

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

    • gift

      public TdApi.UpgradedGift gift
      The gift.
    • senderId

      public TdApi.MessageSender senderId
      Sender of the gift; may be null for anonymous gifts.
    • receivedGiftId

      public String receivedGiftId
      Unique identifier of the received gift for the current user; only for the receiver of the gift.
    • isUpgrade

      public boolean isUpgrade
      True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift.
    • isSaved

      public boolean isSaved
      True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift.
    • canBeTransferred

      public boolean canBeTransferred
      True, if the gift can be transferred to another owner; only for the receiver of the gift.
    • wasTransferred

      public boolean wasTransferred
      True, if the gift was transferred to another owner; only for the receiver of the gift.
    • lastResaleStarCount

      public long lastResaleStarCount
      Number of Telegram Stars that were paid by the sender for the gift; 0 if the gift was upgraded or transferred.
    • transferStarCount

      public long transferStarCount
      Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift.
    • nextTransferDate

      public int nextTransferDate
      Point in time (Unix timestamp) when the gift can be transferred to another owner; 0 if the gift can be transferred immediately or transfer isn't possible; only for the receiver of the gift.
    • nextResaleDate

      public int nextResaleDate
      Point in time (Unix timestamp) when the gift can be resold to another user; 0 if the gift can't be resold; only for the receiver of the gift.
    • exportDate

      public int exportDate
      Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT; 0 if NFT export isn't possible; only for the receiver of the gift.
    • CONSTRUCTOR

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

    • MessageUpgradedGift

      public MessageUpgradedGift()
      An upgraded gift was received or sent by the current user, or the current user was notified about a channel gift.
    • MessageUpgradedGift

      public MessageUpgradedGift(TdApi.UpgradedGift gift, TdApi.MessageSender senderId, String receivedGiftId, boolean isUpgrade, boolean isSaved, boolean canBeTransferred, boolean wasTransferred, long lastResaleStarCount, long transferStarCount, int nextTransferDate, int nextResaleDate, int exportDate)
      An upgraded gift was received or sent by the current user, or the current user was notified about a channel gift.
      Parameters:
      gift - The gift.
      senderId - Sender of the gift; may be null for anonymous gifts.
      receivedGiftId - Unique identifier of the received gift for the current user; only for the receiver of the gift.
      isUpgrade - True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift.
      isSaved - True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift.
      canBeTransferred - True, if the gift can be transferred to another owner; only for the receiver of the gift.
      wasTransferred - True, if the gift was transferred to another owner; only for the receiver of the gift.
      lastResaleStarCount - Number of Telegram Stars that were paid by the sender for the gift; 0 if the gift was upgraded or transferred.
      transferStarCount - Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift.
      nextTransferDate - Point in time (Unix timestamp) when the gift can be transferred to another owner; 0 if the gift can be transferred immediately or transfer isn't possible; only for the receiver of the gift.
      nextResaleDate - Point in time (Unix timestamp) when the gift can be resold to another user; 0 if the gift can't be resold; only for the receiver of the gift.
      exportDate - Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT; 0 if NFT export isn't possible; only for the receiver of the gift.
  • 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