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 int
Identifier uniquely determining type of the object.long
Number of Telegram Stars that can be claimed by the receiver instead of the regular gift by default.int
Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only.long
Unique identifier of the gift.boolean
True, if the gift is a birthday gift.int
Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.int
Number of remaining times the gift can be purchased; 0 if not limited or the gift was sold out.long
Number of Telegram Stars that must be paid for the gift.The sticker representing the gift.int
Number of total times the gift can be purchased; 0 if not limited.long
Number 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, 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 TypeMethodDescriptionint
Returns 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. -
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, 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.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.Object
Returns an identifier uniquely determining type of the object.- Specified by:
getConstructor
in classTdApi.Object
- Returns:
- this.CONSTRUCTOR
-