tgbotxx 1.1.9.2
Telegram Bot C++ Library
Loading...
Searching...
No Matches
tgbotxx::UniqueGiftInfo Struct Reference

Describes a service message about a unique gift that was sent or received. https://core.telegram.org/bots/api#uniquegiftinfo. More...

#include <UniqueGiftInfo.hpp>

Public Member Functions

 UniqueGiftInfo ()=default
 
 UniqueGiftInfo (const nl::json &json)
 
nl::json toJson () const
 Serializes this object to JSON.
 
void fromJson (const nl::json &json)
 Deserializes this object from JSON.
 

Public Attributes

Ptr< UniqueGiftgift
 Information about the gift.
 
std::string origin
 Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, or “resale” for gifts bought from other users.
 
std::int64_t lastResaleStarCount {}
 Optional. For gifts bought from other users, the price paid for the gift.
 
std::string ownedGiftId
 Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts.
 
std::int64_t transferStarCount {}
 Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift.
 
std::time_t nextTransferDate {}
 Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now.
 

Detailed Description

Describes a service message about a unique gift that was sent or received. https://core.telegram.org/bots/api#uniquegiftinfo.

Definition at line 8 of file UniqueGiftInfo.hpp.

Constructor & Destructor Documentation

◆ UniqueGiftInfo() [1/2]

tgbotxx::UniqueGiftInfo::UniqueGiftInfo ( )
default

◆ UniqueGiftInfo() [2/2]

tgbotxx::UniqueGiftInfo::UniqueGiftInfo ( const nl::json &  json)
inlineexplicit

Definition at line 10 of file UniqueGiftInfo.hpp.

Member Function Documentation

◆ fromJson()

void tgbotxx::UniqueGiftInfo::fromJson ( const nl::json &  json)
inline

Deserializes this object from JSON.

Definition at line 53 of file UniqueGiftInfo.hpp.

◆ toJson()

nl::json tgbotxx::UniqueGiftInfo::toJson ( ) const
inline

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 41 of file UniqueGiftInfo.hpp.

Member Data Documentation

◆ gift

Ptr<UniqueGift> tgbotxx::UniqueGiftInfo::gift

Information about the gift.

Definition at line 15 of file UniqueGiftInfo.hpp.

◆ lastResaleStarCount

std::int64_t tgbotxx::UniqueGiftInfo::lastResaleStarCount {}

Optional. For gifts bought from other users, the price paid for the gift.

Definition at line 25 of file UniqueGiftInfo.hpp.

◆ nextTransferDate

std::time_t tgbotxx::UniqueGiftInfo::nextTransferDate {}

Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now.

Definition at line 37 of file UniqueGiftInfo.hpp.

◆ origin

std::string tgbotxx::UniqueGiftInfo::origin

Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, or “resale” for gifts bought from other users.

Definition at line 22 of file UniqueGiftInfo.hpp.

◆ ownedGiftId

std::string tgbotxx::UniqueGiftInfo::ownedGiftId

Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts.

Definition at line 29 of file UniqueGiftInfo.hpp.

◆ transferStarCount

std::int64_t tgbotxx::UniqueGiftInfo::transferStarCount {}

Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift.

Definition at line 33 of file UniqueGiftInfo.hpp.


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