Package org.drinkless.tdlib
Class TdApi.ReceivedGift
java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.ReceivedGift
- Enclosing class:
- TdApi
Represents a gift received by a user or a chat.
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanTrue, if the gift is an upgraded gift that can be transferred to another owner; only for the receiver of the gift.booleanTrue, if the gift is a regular gift that can be upgraded to a unique gift; only for the receiver of the gift.static final intIdentifier uniquely determining type of the object.intPoint in time (Unix timestamp) when the gift was sent.intPoint 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.booleanTrue, if the gift is pinned to the top of the chat's profile page.booleanTrue, if the sender and gift text are shown only to the gift receiver; otherwise, everyone are able to see them.booleanTrue, if the gift is displayed on the chat's profile page; only for the receiver of the gift.intPoint 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.intPoint 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.longNumber 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.longNumber 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.longNumber of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift.booleanTrue, if the gift was refunded and isn't available anymore. -
Constructor Summary
ConstructorsConstructorDescriptionRepresents 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 TypeMethodDescriptionintReturns an identifier uniquely determining type of the object.Methods inherited from class org.drinkless.tdlib.TdApi.Object
toString
-
Field Details
-
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
public boolean isPrivateTrue, if the sender and gift text are shown only to the gift receiver; otherwise, everyone are able to see them. -
isSaved
public boolean isSavedTrue, if the gift is displayed on the chat's profile page; only for the receiver of the gift. -
isPinned
public boolean isPinnedTrue, if the gift is pinned to the top of the chat's profile page. -
canBeUpgraded
public boolean canBeUpgradedTrue, 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 canBeTransferredTrue, if the gift is an upgraded gift that can be transferred to another owner; only for the receiver of the gift. -
wasRefunded
public boolean wasRefundedTrue, if the gift was refunded and isn't available anymore. -
date
public int datePoint in time (Unix timestamp) when the gift was sent. -
gift
The gift. -
sellStarCount
public long sellStarCountNumber 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 prepaidUpgradeStarCountNumber of Telegram Stars that were paid by the sender for the ability to upgrade the gift. -
transferStarCount
public long transferStarCountNumber of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift. -
nextTransferDate
public int nextTransferDatePoint 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 nextResaleDatePoint 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 exportDatePoint 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 CONSTRUCTORIdentifier 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.ObjectReturns an identifier uniquely determining type of the object.- Specified by:
getConstructorin classTdApi.Object- Returns:
- this.CONSTRUCTOR
-