Class TdApi.ReceivedGift

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.ReceivedGift
Enclosing class:
TdApi

public static class TdApi.ReceivedGift extends TdApi.Object
Represents a gift received by a user or a chat.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean
    True, if the gift is an upgraded gift that can be transferred to another owner; only for the receiver of the gift.
    boolean
    True, if the gift is a regular gift that can be upgraded to a unique gift; 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 was sent.
    int
    Point in time (Unix timestamp) when the upgraded 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 pinned to the top of the chat's profile page.
    boolean
    True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone are able to see them.
    boolean
    True, if the gift is displayed on the chat's profile page; only for the receiver of the gift.
    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.
    long
    Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.
    Unique identifier of the received gift for the current user; only for the receiver of the gift.
    long
    Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the current user.
    Identifier of a user or a chat that sent the gift; may be null if unknown.
    Message added to the gift.
    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 refunded and isn't available anymore.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Represents a gift received by a user or a chat.
    ReceivedGift(String receivedGiftId, TdApi.MessageSender senderId, TdApi.FormattedText text, boolean isPrivate, boolean isSaved, boolean isPinned, boolean canBeUpgraded, boolean canBeTransferred, boolean wasRefunded, int date, TdApi.SentGift gift, long sellStarCount, long prepaidUpgradeStarCount, long transferStarCount, int nextTransferDate, int nextResaleDate, int exportDate)
    Represents a gift received by a user or a chat.
  • 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

    • receivedGiftId

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

      public TdApi.MessageSender senderId
      Identifier of a user or a chat that sent the gift; may be null if unknown.
    • text

      public TdApi.FormattedText text
      Message added to the gift.
    • isPrivate

      public boolean isPrivate
      True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone are able to see them.
    • isSaved

      public boolean isSaved
      True, if the gift is displayed on the chat's profile page; only for the receiver of the gift.
    • isPinned

      public boolean isPinned
      True, if the gift is pinned to the top of the chat's profile page.
    • canBeUpgraded

      public boolean canBeUpgraded
      True, if the gift is a regular gift that can be upgraded to a unique gift; only for the receiver of the gift.
    • canBeTransferred

      public boolean canBeTransferred
      True, if the gift is an upgraded gift that can be transferred to another owner; only for the receiver of the gift.
    • wasRefunded

      public boolean wasRefunded
      True, if the gift was refunded and isn't available anymore.
    • date

      public int date
      Point in time (Unix timestamp) when the gift was sent.
    • gift

      public TdApi.SentGift gift
      The gift.
    • sellStarCount

      public long sellStarCount
      Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the current user.
    • prepaidUpgradeStarCount

      public long prepaidUpgradeStarCount
      Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.
    • 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 upgraded 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

    • ReceivedGift

      public ReceivedGift()
      Represents a gift received by a user or a chat.
    • ReceivedGift

      public ReceivedGift(String receivedGiftId, TdApi.MessageSender senderId, TdApi.FormattedText text, boolean isPrivate, boolean isSaved, boolean isPinned, boolean canBeUpgraded, boolean canBeTransferred, boolean wasRefunded, int date, TdApi.SentGift gift, long sellStarCount, long prepaidUpgradeStarCount, long transferStarCount, int nextTransferDate, int nextResaleDate, int exportDate)
      Represents a gift received by a user or a chat.
      Parameters:
      receivedGiftId - Unique identifier of the received gift for the current user; only for the receiver of the gift.
      senderId - Identifier of a user or a chat that sent the gift; may be null if unknown.
      text - Message added to the gift.
      isPrivate - True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone are able to see them.
      isSaved - True, if the gift is displayed on the chat's profile page; only for the receiver of the gift.
      isPinned - True, if the gift is pinned to the top of the chat's profile page.
      canBeUpgraded - True, if the gift is a regular gift that can be upgraded to a unique gift; only for the receiver of the gift.
      canBeTransferred - True, if the gift is an upgraded gift that can be transferred to another owner; only for the receiver of the gift.
      wasRefunded - True, if the gift was refunded and isn't available anymore.
      date - Point in time (Unix timestamp) when the gift was sent.
      gift - The gift.
      sellStarCount - Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the current user.
      prepaidUpgradeStarCount - Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.
      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 upgraded 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