TDLib
Loading...
Searching...
No Matches
messagePremiumGiftCode Class Referencefinal

Inherits MessageContent.

Description

A Telegram Premium gift code was created for the user.

Public Member Functions

 messagePremiumGiftCode ()
 messagePremiumGiftCode (object_ptr< MessageSender > &&creator_id_, object_ptr< formattedText > &&text_, bool is_from_giveaway_, bool is_unclaimed_, string const &currency_, int53 amount_, string const &cryptocurrency_, int64 cryptocurrency_amount_, int32 month_count_, int32 day_count_, object_ptr< sticker > &&sticker_, string const &code_)
void store (TlStorerToString &s, const char *field_name) const final
Public Member Functions inherited from TlObject
TlObject & operator= (const TlObject &)=delete
TlObject & operator= (TlObject &&)=default
virtual void store (TlStorerCalcLength &s) const
virtual void store (TlStorerUnsafe &s) const
 TlObject ()=default
 TlObject (const TlObject &)=delete
 TlObject (TlObject &&)=default
virtual ~TlObject ()=default

Public Attributes

int53 amount_
 The paid amount, in the smallest units of the currency; 0 if unknown.
string code_
 The gift code.
object_ptr< MessageSender > creator_id_
 Identifier of a chat or a user who created the gift code; may be null if unknown.
string cryptocurrency_
 Cryptocurrency used to pay for the gift; may be empty if none or unknown.
int64 cryptocurrency_amount_
 The paid amount, in the smallest units of the cryptocurrency; 0 if unknown.
string currency_
 Currency for the paid amount; empty if unknown.
int32 day_count_
 Number of days the Telegram Premium subscription will be active after code activation.
bool is_from_giveaway_
 True, if the gift code was created for a giveaway.
bool is_unclaimed_
 True, if the winner for the corresponding Telegram Premium subscription wasn't chosen.
int32 month_count_
 Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer.
object_ptr< sticker > sticker_
 A sticker to be shown in the message; may be null if unknown.
object_ptr< formattedText > text_
 Message added to the gift.

Static Public Attributes

static const std::int32_t ID = 680217675
 Identifier uniquely determining a type of the object.

Constructor & Destructor Documentation

◆ messagePremiumGiftCode() [1/2]

messagePremiumGiftCode ( )

A Telegram Premium gift code was created for the user.

◆ messagePremiumGiftCode() [2/2]

messagePremiumGiftCode ( object_ptr< MessageSender > && creator_id_,
object_ptr< formattedText > && text_,
bool is_from_giveaway_,
bool is_unclaimed_,
string const & currency_,
int53 amount_,
string const & cryptocurrency_,
int64 cryptocurrency_amount_,
int32 month_count_,
int32 day_count_,
object_ptr< sticker > && sticker_,
string const & code_ )

A Telegram Premium gift code was created for the user.

Parameters
[in]creator_id_Identifier of a chat or a user who created the gift code; may be null if unknown.
[in]text_Message added to the gift.
[in]is_from_giveaway_True, if the gift code was created for a giveaway.
[in]is_unclaimed_True, if the winner for the corresponding Telegram Premium subscription wasn't chosen.
[in]currency_Currency for the paid amount; empty if unknown.
[in]amount_The paid amount, in the smallest units of the currency; 0 if unknown.
[in]cryptocurrency_Cryptocurrency used to pay for the gift; may be empty if none or unknown.
[in]cryptocurrency_amount_The paid amount, in the smallest units of the cryptocurrency; 0 if unknown.
[in]month_count_Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer.
[in]day_count_Number of days the Telegram Premium subscription will be active after code activation.
[in]sticker_A sticker to be shown in the message; may be null if unknown.
[in]code_The gift code.

Member Function Documentation

◆ store()

void store ( TlStorerToString & s,
const char * field_name ) const
finalvirtual

Helper function for to_string method. Appends string representation of the object to the storer.

Parameters
[in]sStorer to which object string representation will be appended.
[in]field_nameObject field_name if applicable.

Implements TlObject.


The documentation for this class was generated from the following file: