List of all members | Public Fields | Public Instance Methods | Static Public Attributes
receivedGift Class Referencefinal

Inherits Object.

Description

Represents a gift received by a user or a chat.

Public Fields

string received_gift_id_
 Unique identifier of the received gift for the current user; only for the receiver of the gift.
 
object_ptr< MessageSendersender_id_
 Identifier of a user or a chat that sent the gift; may be null if unknown.
 
object_ptr< formattedTexttext_
 Message added to the gift.
 
bool is_private_
 True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone are able to see them.
 
bool is_saved_
 True, if the gift is displayed on the chat's profile page; only for the receiver of the gift.
 
bool can_be_upgraded_
 True, if the gift is a regular gift that can be upgraded to a unique gift; only for the receiver of the gift.
 
bool can_be_transferred_
 True, if the gift is an upgraded gift that can be transferred to another owner; only for the receiver of the gift.
 
bool was_refunded_
 True, if the gift was refunded and isn't available anymore.
 
int32 date_
 Point in time (Unix timestamp) when the gift was sent.
 
object_ptr< SentGiftgift_
 The gift.
 
int53 sell_star_count_
 Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the current user.
 
int53 prepaid_upgrade_star_count_
 Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.
 
int53 transfer_star_count_
 Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift.
 
int32 export_date_
 Point in time (Unix timestamp) when the upgraded gift can be transferred to the TON blockchain as an NFT; 0 if NFT export isn't possible; only for the receiver of the gift.
 

Public Instance Methods

 receivedGift ()
 
 receivedGift (string const &received_gift_id_, object_ptr< MessageSender > &&sender_id_, object_ptr< formattedText > &&text_, bool is_private_, bool is_saved_, bool can_be_upgraded_, bool can_be_transferred_, bool was_refunded_, int32 date_, object_ptr< SentGift > &&gift_, int53 sell_star_count_, int53 prepaid_upgrade_star_count_, int53 transfer_star_count_, int32 export_date_)
 
void store (TlStorerToString &s, const char *field_name) const final
 
- Public Instance Methods inherited from TlObject
virtual void store (TlStorerUnsafe &s) const
 
virtual void store (TlStorerCalcLength &s) const
 
 TlObject ()=default
 
 TlObject (const TlObject &)=delete
 
TlObjectoperator= (const TlObject &)=delete
 
 TlObject (TlObject &&)=default
 
TlObjectoperator= (TlObject &&)=default
 
virtual ~TlObject ()=default
 

Static Public Attributes

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

Constructor & Destructor Documentation

◆ receivedGift() [1/2]

Represents a gift received by a user or a chat.

◆ receivedGift() [2/2]

receivedGift ( string const &  received_gift_id_,
object_ptr< MessageSender > &&  sender_id_,
object_ptr< formattedText > &&  text_,
bool  is_private_,
bool  is_saved_,
bool  can_be_upgraded_,
bool  can_be_transferred_,
bool  was_refunded_,
int32  date_,
object_ptr< SentGift > &&  gift_,
int53  sell_star_count_,
int53  prepaid_upgrade_star_count_,
int53  transfer_star_count_,
int32  export_date_ 
)

Represents a gift received by a user or a chat.

Parameters
[in]received_gift_id_Unique identifier of the received gift for the current user; only for the receiver of the gift.
[in]sender_id_Identifier of a user or a chat that sent the gift; may be null if unknown.
[in]text_Message added to the gift.
[in]is_private_True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone are able to see them.
[in]is_saved_True, if the gift is displayed on the chat's profile page; only for the receiver of the gift.
[in]can_be_upgraded_True, if the gift is a regular gift that can be upgraded to a unique gift; only for the receiver of the gift.
[in]can_be_transferred_True, if the gift is an upgraded gift that can be transferred to another owner; only for the receiver of the gift.
[in]was_refunded_True, if the gift was refunded and isn't available anymore.
[in]date_Point in time (Unix timestamp) when the gift was sent.
[in]gift_The gift.
[in]sell_star_count_Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the current user.
[in]prepaid_upgrade_star_count_Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.
[in]transfer_star_count_Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift.
[in]export_date_Point in time (Unix timestamp) when the upgraded gift can be transferred to the TON blockchain as an NFT; 0 if NFT export isn't possible; only for the receiver of the gift.

Method 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: