public static class TdApi.MessagePremiumGiftCode extends TdApi.MessageContent
| Modifier and Type | Field and Description |
|---|---|
long |
amount
The paid amount, in the smallest units of the currency; 0 if unknown.
|
java.lang.String |
code
The gift code.
|
static int |
CONSTRUCTOR
Identifier uniquely determining type of the object.
|
TdApi.MessageSender |
creatorId
Identifier of a chat or a user that created the gift code; may be null if unknown.
|
java.lang.String |
cryptocurrency
Cryptocurrency used to pay for the gift; may be empty if none or unknown.
|
long |
cryptocurrencyAmount
The paid amount, in the smallest units of the cryptocurrency; 0 if unknown.
|
java.lang.String |
currency
Currency for the paid amount; empty if unknown.
|
boolean |
isFromGiveaway
True, if the gift code was created for a giveaway.
|
boolean |
isUnclaimed
True, if the winner for the corresponding Telegram Premium subscription wasn't chosen.
|
int |
monthCount
Number of months the Telegram Premium subscription will be active after code activation.
|
TdApi.Sticker |
sticker
A sticker to be shown in the message; may be null if unknown.
|
TdApi.FormattedText |
text
Message added to the gift.
|
| Constructor and Description |
|---|
MessagePremiumGiftCode()
A Telegram Premium gift code was created for the user.
|
MessagePremiumGiftCode(TdApi.MessageSender creatorId,
TdApi.FormattedText text,
boolean isFromGiveaway,
boolean isUnclaimed,
java.lang.String currency,
long amount,
java.lang.String cryptocurrency,
long cryptocurrencyAmount,
int monthCount,
TdApi.Sticker sticker,
java.lang.String code)
A Telegram Premium gift code was created for the user.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getConstructor()
Returns an identifier uniquely determining type of the object.
|
toStringpublic TdApi.MessageSender creatorId
public TdApi.FormattedText text
public boolean isFromGiveaway
public boolean isUnclaimed
public java.lang.String currency
public long amount
public java.lang.String cryptocurrency
public long cryptocurrencyAmount
public int monthCount
public TdApi.Sticker sticker
public java.lang.String code
public static final int CONSTRUCTOR
public MessagePremiumGiftCode()
public MessagePremiumGiftCode(TdApi.MessageSender creatorId, TdApi.FormattedText text, boolean isFromGiveaway, boolean isUnclaimed, java.lang.String currency, long amount, java.lang.String cryptocurrency, long cryptocurrencyAmount, int monthCount, TdApi.Sticker sticker, java.lang.String code)
creatorId - Identifier of a chat or a user that created the gift code; may be null if unknown.text - Message added to the gift.isFromGiveaway - True, if the gift code was created for a giveaway.isUnclaimed - True, if the winner for the corresponding Telegram Premium subscription wasn't chosen.currency - Currency for the paid amount; empty if unknown.amount - The paid amount, in the smallest units of the currency; 0 if unknown.cryptocurrency - Cryptocurrency used to pay for the gift; may be empty if none or unknown.cryptocurrencyAmount - The paid amount, in the smallest units of the cryptocurrency; 0 if unknown.monthCount - Number of months the Telegram Premium subscription will be active after code activation.sticker - A sticker to be shown in the message; may be null if unknown.code - The gift code.public int getConstructor()
TdApi.ObjectgetConstructor in class TdApi.Object