Package org.drinkless.tdlib
Class TdApi.Gift
java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Gift
- Enclosing class:
- TdApi
Describes a gift that can be sent to another user or channel chat.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIdentifier uniquely determining type of the object.longNumber of Telegram Stars that can be claimed by the receiver instead of the regular gift by default.intPoint in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only.longUnique identifier of the gift.booleanTrue, if the gift is a birthday gift.intPoint in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.longIdentifier of the chat that published the gift; 0 if none.intNumber of remaining times the gift can be purchased; 0 if not limited or the gift was sold out.longNumber of Telegram Stars that must be paid for the gift.The sticker representing the gift.intNumber of total times the gift can be purchased; 0 if not limited.longNumber of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible. -
Constructor Summary
ConstructorsConstructorDescriptionGift()Describes a gift that can be sent to another user or channel chat.Gift(long id, long publisherChatId, TdApi.Sticker sticker, long starCount, long defaultSellStarCount, long upgradeStarCount, boolean isForBirthday, int remainingCount, int totalCount, int firstSendDate, int lastSendDate) Describes a gift that can be sent to another user or channel 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
-
id
public long idUnique identifier of the gift. -
publisherChatId
public long publisherChatIdIdentifier of the chat that published the gift; 0 if none. -
sticker
The sticker representing the gift. -
starCount
public long starCountNumber of Telegram Stars that must be paid for the gift. -
defaultSellStarCount
public long defaultSellStarCountNumber of Telegram Stars that can be claimed by the receiver instead of the regular gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed. -
upgradeStarCount
public long upgradeStarCountNumber of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible. -
isForBirthday
public boolean isForBirthdayTrue, if the gift is a birthday gift. -
remainingCount
public int remainingCountNumber of remaining times the gift can be purchased; 0 if not limited or the gift was sold out. -
totalCount
public int totalCountNumber of total times the gift can be purchased; 0 if not limited. -
firstSendDate
public int firstSendDatePoint in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only. -
lastSendDate
public int lastSendDatePoint in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only. -
CONSTRUCTOR
public static final int CONSTRUCTORIdentifier uniquely determining type of the object.- See Also:
-
-
Constructor Details
-
Gift
public Gift()Describes a gift that can be sent to another user or channel chat. -
Gift
public Gift(long id, long publisherChatId, TdApi.Sticker sticker, long starCount, long defaultSellStarCount, long upgradeStarCount, boolean isForBirthday, int remainingCount, int totalCount, int firstSendDate, int lastSendDate) Describes a gift that can be sent to another user or channel chat.- Parameters:
id- Unique identifier of the gift.publisherChatId- Identifier of the chat that published the gift; 0 if none.sticker- The sticker representing the gift.starCount- Number of Telegram Stars that must be paid for the gift.defaultSellStarCount- Number of Telegram Stars that can be claimed by the receiver instead of the regular gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed.upgradeStarCount- Number of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible.isForBirthday- True, if the gift is a birthday gift.remainingCount- Number of remaining times the gift can be purchased; 0 if not limited or the gift was sold out.totalCount- Number of total times the gift can be purchased; 0 if not limited.firstSendDate- Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only.lastSendDate- Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.
-
-
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
-