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.
    int[]
    Identifiers of collections to which the gift is added; 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.
    long
    Number of Telegram Stars that must be paid to drop original details of the upgraded gift; 0 if not available; only for the receiver of the gift.
    int
    Point in time (Unix timestamp) when the upgraded gift can be transferred to the TON blockchain as an NFT; can be in the past; 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.
    boolean
    True, if the upgrade was bought after the gift was sent.
    int
    Point in time (Unix timestamp) when the gift can be resold to another user; can be in the past; 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; can be in the past; 0 if the gift can be transferred immediately or transfer isn't possible; only for the receiver of the gift.
    If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade.
    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.
    int
    Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned.
    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, int uniqueGiftNumber, boolean isPrivate, boolean isSaved, boolean isPinned, boolean canBeUpgraded, boolean canBeTransferred, boolean wasRefunded, int date, TdApi.SentGift gift, int[] collectionIds, long sellStarCount, long prepaidUpgradeStarCount, boolean isUpgradeSeparate, long transferStarCount, long dropOriginalDetailsStarCount, int nextTransferDate, int nextResaleDate, int exportDate, String prepaidUpgradeHash)
    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.
    • uniqueGiftNumber

      public int uniqueGiftNumber
      Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned.
    • 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.
    • collectionIds

      public int[] collectionIds
      Identifiers of collections to which the gift is added; only for the receiver of 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.
    • isUpgradeSeparate

      public boolean isUpgradeSeparate
      True, if the upgrade was bought after the gift was sent. In this case, prepaid upgrade cost must not be added to the gift cost.
    • transferStarCount

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

      public long dropOriginalDetailsStarCount
      Number of Telegram Stars that must be paid to drop original details of the upgraded gift; 0 if not available; 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; can be in the past; 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; can be in the past; 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; can be in the past; 0 if NFT export isn't possible; only for the receiver of the gift.
    • prepaidUpgradeHash

      public String prepaidUpgradeHash
      If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade.
    • 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, int uniqueGiftNumber, boolean isPrivate, boolean isSaved, boolean isPinned, boolean canBeUpgraded, boolean canBeTransferred, boolean wasRefunded, int date, TdApi.SentGift gift, int[] collectionIds, long sellStarCount, long prepaidUpgradeStarCount, boolean isUpgradeSeparate, long transferStarCount, long dropOriginalDetailsStarCount, int nextTransferDate, int nextResaleDate, int exportDate, String prepaidUpgradeHash)
      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.
      uniqueGiftNumber - Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned.
      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.
      collectionIds - Identifiers of collections to which the gift is added; only for the receiver of 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.
      isUpgradeSeparate - True, if the upgrade was bought after the gift was sent. In this case, prepaid upgrade cost must not be added to the gift cost.
      transferStarCount - Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift.
      dropOriginalDetailsStarCount - Number of Telegram Stars that must be paid to drop original details of the upgraded gift; 0 if not available; only for the receiver of the gift.
      nextTransferDate - Point in time (Unix timestamp) when the gift can be transferred to another owner; can be in the past; 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; can be in the past; 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; can be in the past; 0 if NFT export isn't possible; only for the receiver of the gift.
      prepaidUpgradeHash - If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade.
  • 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