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 TypeFieldDescriptionInformation about the auction on which the gift can be purchased; may be null if the gift can be purchased directly.Background of the gift.static 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.booleanTrue, if the gift can be used to customize the user's name, and backgrounds of profile photo, reply header, and link preview.longUnique identifier of the gift.booleanTrue, if the gift is a birthday gift.booleanTrue, if the gift can be bought only by Telegram Premium subscribers.intPoint in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.intPoint in time (Unix timestamp) when the gift can be sent next time by the current user; may be 0 or a date in the past.Number of times the gift can be purchased all users; may be null if not limited.longIdentifier of the chat that published the gift; 0 if none.longNumber of Telegram Stars that must be paid for the gift.The sticker representing the gift.longNumber of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible.intNumber of unique gift variants that are available for the upgraded gift; 0 if unknown.Number of times the gift can be purchased by the current user; may be null if not limited. -
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, int upgradeVariantCount, boolean hasColors, boolean isForBirthday, boolean isPremium, TdApi.GiftAuction auctionInfo, int nextSendDate, TdApi.GiftPurchaseLimits userLimits, TdApi.GiftPurchaseLimits overallLimits, TdApi.GiftBackground background, 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. -
upgradeVariantCount
public int upgradeVariantCountNumber of unique gift variants that are available for the upgraded gift; 0 if unknown. -
hasColors
public boolean hasColorsTrue, if the gift can be used to customize the user's name, and backgrounds of profile photo, reply header, and link preview. -
isForBirthday
public boolean isForBirthdayTrue, if the gift is a birthday gift. -
isPremium
public boolean isPremiumTrue, if the gift can be bought only by Telegram Premium subscribers. -
auctionInfo
Information about the auction on which the gift can be purchased; may be null if the gift can be purchased directly. -
nextSendDate
public int nextSendDatePoint in time (Unix timestamp) when the gift can be sent next time by the current user; may be 0 or a date in the past. If the date is in the future, then call canSendGift to get the reason, why the gift can't be sent now. -
userLimits
Number of times the gift can be purchased by the current user; may be null if not limited. -
overallLimits
Number of times the gift can be purchased all users; may be null if not limited. -
background
Background of the gift. -
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, int upgradeVariantCount, boolean hasColors, boolean isForBirthday, boolean isPremium, TdApi.GiftAuction auctionInfo, int nextSendDate, TdApi.GiftPurchaseLimits userLimits, TdApi.GiftPurchaseLimits overallLimits, TdApi.GiftBackground background, 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.upgradeVariantCount- Number of unique gift variants that are available for the upgraded gift; 0 if unknown.hasColors- True, if the gift can be used to customize the user's name, and backgrounds of profile photo, reply header, and link preview.isForBirthday- True, if the gift is a birthday gift.isPremium- True, if the gift can be bought only by Telegram Premium subscribers.auctionInfo- Information about the auction on which the gift can be purchased; may be null if the gift can be purchased directly.nextSendDate- Point in time (Unix timestamp) when the gift can be sent next time by the current user; may be 0 or a date in the past. If the date is in the future, then call canSendGift to get the reason, why the gift can't be sent now.userLimits- Number of times the gift can be purchased by the current user; may be null if not limited.overallLimits- Number of times the gift can be purchased all users; may be null if not limited.background- Background of the gift.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
-