tgbotxx 1.2.9.5
Telegram Bot C++ Library
Loading...
Searching...
No Matches
tgbotxx::GiftInfo Struct Reference

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

#include <GiftInfo.hpp>

Public Member Functions

 GiftInfo ()=default
 
 GiftInfo (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< Giftgift
 Information about 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 convertStarCount {}
 Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible.
 
std::int64_t prepaidUpgradeStarCount {}
 Optional. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift.
 
bool isUpgradeSeparate {}
 Optional. True, if the gift's upgrade was purchased after the gift was sent.
 
bool canBeUpgraded {}
 Optional. True, if the gift can be upgraded to a unique gift.
 
std::string text
 Optional. Text of the message that was added to the gift.
 
std::vector< Ptr< MessageEntity > > entities
 Optional. Special entities that appear in the text.
 
bool isPrivate {}
 Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them.
 
std::int32_t uniqueGiftNumber {}
 Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift.
 

Detailed Description

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

Definition at line 9 of file GiftInfo.hpp.

Constructor & Destructor Documentation

◆ GiftInfo() [1/2]

tgbotxx::GiftInfo::GiftInfo ( )
default

◆ GiftInfo() [2/2]

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

Definition at line 11 of file GiftInfo.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 64 of file GiftInfo.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 48 of file GiftInfo.hpp.

Member Data Documentation

◆ canBeUpgraded

bool tgbotxx::GiftInfo::canBeUpgraded {}

Optional. True, if the gift can be upgraded to a unique gift.

Definition at line 32 of file GiftInfo.hpp.

◆ convertStarCount

std::int64_t tgbotxx::GiftInfo::convertStarCount {}

Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible.

Definition at line 23 of file GiftInfo.hpp.

◆ entities

std::vector<Ptr<MessageEntity> > tgbotxx::GiftInfo::entities

Optional. Special entities that appear in the text.

Definition at line 38 of file GiftInfo.hpp.

◆ gift

Ptr<Gift> tgbotxx::GiftInfo::gift

Information about the gift.

Definition at line 16 of file GiftInfo.hpp.

◆ isPrivate

bool tgbotxx::GiftInfo::isPrivate {}

Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them.

Definition at line 41 of file GiftInfo.hpp.

◆ isUpgradeSeparate

bool tgbotxx::GiftInfo::isUpgradeSeparate {}

Optional. True, if the gift's upgrade was purchased after the gift was sent.

Definition at line 29 of file GiftInfo.hpp.

◆ ownedGiftId

std::string tgbotxx::GiftInfo::ownedGiftId

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

Definition at line 19 of file GiftInfo.hpp.

◆ prepaidUpgradeStarCount

std::int64_t tgbotxx::GiftInfo::prepaidUpgradeStarCount {}

Optional. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift.

Definition at line 26 of file GiftInfo.hpp.

◆ text

std::string tgbotxx::GiftInfo::text

Optional. Text of the message that was added to the gift.

Definition at line 35 of file GiftInfo.hpp.

◆ uniqueGiftNumber

std::int32_t tgbotxx::GiftInfo::uniqueGiftNumber {}

Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift.

Definition at line 44 of file GiftInfo.hpp.


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