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

Inherits Object.

Description

Describes a gift that can be sent to another user or channel chat.

Public Fields

int64 id_
 Unique identifier of the gift.
 
int53 publisher_chat_id_
 Identifier of the chat that published the gift; 0 if none.
 
object_ptr< stickersticker_
 The sticker representing the gift.
 
int53 star_count_
 Number of Telegram Stars that must be paid for the gift.
 
int53 default_sell_star_count_
 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.
 
int53 upgrade_star_count_
 Number of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible.
 
bool is_for_birthday_
 True, if the gift is a birthday gift.
 
bool is_premium_
 True, if the gift can be bought only by Telegram Premium subscribers.
 
int32 next_send_date_
 Point in time (Unix timestamp) when the gift can be sent next time by the current user; can 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.
 
object_ptr< giftPurchaseLimitsuser_limits_
 Number of times the gift can be purchased by the current user; may be null if not limited.
 
object_ptr< giftPurchaseLimitsoverall_limits_
 Number of times the gift can be purchased all users; may be null if not limited.
 
int32 first_send_date_
 Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only.
 
int32 last_send_date_
 Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.
 

Public Instance Methods

 gift ()
 
 gift (int64 id_, int53 publisher_chat_id_, object_ptr< sticker > &&sticker_, int53 star_count_, int53 default_sell_star_count_, int53 upgrade_star_count_, bool is_for_birthday_, bool is_premium_, int32 next_send_date_, object_ptr< giftPurchaseLimits > &&user_limits_, object_ptr< giftPurchaseLimits > &&overall_limits_, int32 first_send_date_, int32 last_send_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 = -198381165
 Identifier uniquely determining a type of the object.
 

Constructor & Destructor Documentation

◆ gift() [1/2]

gift ( )

Describes a gift that can be sent to another user or channel chat.

◆ gift() [2/2]

gift ( int64  id_,
int53  publisher_chat_id_,
object_ptr< sticker > &&  sticker_,
int53  star_count_,
int53  default_sell_star_count_,
int53  upgrade_star_count_,
bool  is_for_birthday_,
bool  is_premium_,
int32  next_send_date_,
object_ptr< giftPurchaseLimits > &&  user_limits_,
object_ptr< giftPurchaseLimits > &&  overall_limits_,
int32  first_send_date_,
int32  last_send_date_ 
)

Describes a gift that can be sent to another user or channel chat.

Parameters
[in]id_Unique identifier of the gift.
[in]publisher_chat_id_Identifier of the chat that published the gift; 0 if none.
[in]sticker_The sticker representing the gift.
[in]star_count_Number of Telegram Stars that must be paid for the gift.
[in]default_sell_star_count_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.
[in]upgrade_star_count_Number of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible.
[in]is_for_birthday_True, if the gift is a birthday gift.
[in]is_premium_True, if the gift can be bought only by Telegram Premium subscribers.
[in]next_send_date_Point in time (Unix timestamp) when the gift can be sent next time by the current user; can 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.
[in]user_limits_Number of times the gift can be purchased by the current user; may be null if not limited.
[in]overall_limits_Number of times the gift can be purchased all users; may be null if not limited.
[in]first_send_date_Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only.
[in]last_send_date_Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.

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: