tdlib-obf API
Reference documentation for the public tdlib-obf API, generated from TDLib schemas and public headers
Loading...
Searching...
No Matches
td::td_api::gift Class Referencefinal

#include </home/runner/work/tdlib-obf/tdlib-obf/td/generate/auto/td/telegram/td_api.h>

Inheritance diagram for td::td_api::gift:
td::td_api::Object td::TlObject

Public Member Functions

 gift ()
 
 gift (int64 id_, int53 publisher_chat_id_, object_ptr< sticker > &&sticker_, int53 star_count_, int53 default_sell_star_count_, int53 upgrade_star_count_, int32 upgrade_variant_count_, bool has_colors_, bool is_for_birthday_, bool is_premium_, object_ptr< giftAuction > &&auction_info_, int32 next_send_date_, object_ptr< giftPurchaseLimits > &&user_limits_, object_ptr< giftPurchaseLimits > &&overall_limits_, object_ptr< giftBackground > &&background_, int32 first_send_date_, int32 last_send_date_)
 
void store (TlStorerToString &s, const char *field_name) const final
 
- Public Member Functions inherited from td::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
 

Public Attributes

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&#x27;t possible.
 
int32 upgrade_variant_count_
 Number of unique gift variants that are available for the upgraded gift; 0 if unknown.
 
bool has_colors_
 True, if the gift can be used to customize the user&#x27;s name, and backgrounds of profile photo, reply header, and link preview.
 
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.
 
object_ptr< giftAuctionauction_info_
 Information about the auction on which the gift can be purchased; may be null if the gift can be purchased directly.
 
int32 next_send_date_
 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&#x27;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.
 
object_ptr< giftBackgroundbackground_
 Background of the gift.
 
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.
 

Static Public Attributes

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

Detailed Description

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

Definition at line 22826 of file td_api.h.

Constructor & Destructor Documentation

◆ gift() [1/2]

td::td_api::gift::gift ( )

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

◆ gift() [2/2]

td::td_api::gift::gift ( int64  id_,
int53  publisher_chat_id_,
object_ptr< sticker > &&  sticker_,
int53  star_count_,
int53  default_sell_star_count_,
int53  upgrade_star_count_,
int32  upgrade_variant_count_,
bool  has_colors_,
bool  is_for_birthday_,
bool  is_premium_,
object_ptr< giftAuction > &&  auction_info_,
int32  next_send_date_,
object_ptr< giftPurchaseLimits > &&  user_limits_,
object_ptr< giftPurchaseLimits > &&  overall_limits_,
object_ptr< giftBackground > &&  background_,
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&#x27;t possible.
[in]upgrade_variant_count_Number of unique gift variants that are available for the upgraded gift; 0 if unknown.
[in]has_colors_True, if the gift can be used to customize the user&#x27;s name, and backgrounds of profile photo, reply header, and link preview.
[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]auction_info_Information about the auction on which the gift can be purchased; may be null if the gift can be purchased directly.
[in]next_send_date_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&#x27;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]background_Background of the gift.
[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.

Member Function Documentation

◆ store()

void td::td_api::gift::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 td::TlObject.

Member Data Documentation

◆ auction_info_

object_ptr<giftAuction> td::td_api::gift::auction_info_

Information about the auction on which the gift can be purchased; may be null if the gift can be purchased directly.

Definition at line 22857 of file td_api.h.

◆ background_

object_ptr<giftBackground> td::td_api::gift::background_

Background of the gift.

Definition at line 22865 of file td_api.h.

◆ default_sell_star_count_

int53 td::td_api::gift::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.

Definition at line 22845 of file td_api.h.

◆ first_send_date_

int32 td::td_api::gift::first_send_date_

Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only.

Definition at line 22867 of file td_api.h.

◆ has_colors_

bool td::td_api::gift::has_colors_

True, if the gift can be used to customize the user&#x27;s name, and backgrounds of profile photo, reply header, and link preview.

Definition at line 22851 of file td_api.h.

◆ ID

const std::int32_t td::td_api::gift::ID = 1567244615
static

Identifier uniquely determining a type of the object.

Definition at line 22900 of file td_api.h.

◆ id_

int64 td::td_api::gift::id_

Unique identifier of the gift.

Definition at line 22837 of file td_api.h.

◆ is_for_birthday_

bool td::td_api::gift::is_for_birthday_

True, if the gift is a birthday gift.

Definition at line 22853 of file td_api.h.

◆ is_premium_

bool td::td_api::gift::is_premium_

True, if the gift can be bought only by Telegram Premium subscribers.

Definition at line 22855 of file td_api.h.

◆ last_send_date_

int32 td::td_api::gift::last_send_date_

Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.

Definition at line 22869 of file td_api.h.

◆ next_send_date_

int32 td::td_api::gift::next_send_date_

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&#x27;t be sent now.

Definition at line 22859 of file td_api.h.

◆ overall_limits_

object_ptr<giftPurchaseLimits> td::td_api::gift::overall_limits_

Number of times the gift can be purchased all users; may be null if not limited.

Definition at line 22863 of file td_api.h.

◆ publisher_chat_id_

int53 td::td_api::gift::publisher_chat_id_

Identifier of the chat that published the gift; 0 if none.

Definition at line 22839 of file td_api.h.

◆ star_count_

int53 td::td_api::gift::star_count_

Number of Telegram Stars that must be paid for the gift.

Definition at line 22843 of file td_api.h.

◆ sticker_

object_ptr<sticker> td::td_api::gift::sticker_

The sticker representing the gift.

Definition at line 22841 of file td_api.h.

◆ upgrade_star_count_

int53 td::td_api::gift::upgrade_star_count_

Number of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn&#x27;t possible.

Definition at line 22847 of file td_api.h.

◆ upgrade_variant_count_

int32 td::td_api::gift::upgrade_variant_count_

Number of unique gift variants that are available for the upgraded gift; 0 if unknown.

Definition at line 22849 of file td_api.h.

◆ user_limits_

object_ptr<giftPurchaseLimits> td::td_api::gift::user_limits_

Number of times the gift can be purchased by the current user; may be null if not limited.

Definition at line 22861 of file td_api.h.


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