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

Describes a regular gift owned by a user or a chat. More...

#include <OwnedGift.hpp>

Inheritance diagram for tgbotxx::OwnedGiftRegular:
tgbotxx::OwnedGift

Public Member Functions

 OwnedGiftRegular ()
 
 OwnedGiftRegular (const nl::json &json)
 
 ~OwnedGiftRegular () override=default
 
nl::json toJson () const override
 Serializes this object to JSON.
 
void fromJson (const nl::json &json) override
 Deserializes this object from JSON.
 
- Public Member Functions inherited from tgbotxx::OwnedGift
 OwnedGift ()=default
 
 OwnedGift (const nl::json &json)
 
virtual ~OwnedGift ()=default
 

Public Attributes

Ptr< Giftgift
 Information about the regular gift.
 
std::string ownedGiftId
 Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only.
 
Ptr< UsersenderUser
 Optional. Sender of the gift if it is a known user.
 
std::int64_t sendDate {}
 Date the gift was sent in Unix time.
 
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.
 
bool isSaved {}
 Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only.
 
bool canBeUpgraded {}
 Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only.
 
bool wasRefunded {}
 Optional. True, if the gift was refunded and isn't available anymore.
 
std::int32_t convertStarCount {}
 Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift.
 
std::int32_t prepaidUpgradeStarCount {}
 Optional. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.
 
- Public Attributes inherited from tgbotxx::OwnedGift
std::string type
 Type of the gift: "regular" or "unique".
 

Detailed Description

Describes a regular gift owned by a user or a chat.

Definition at line 41 of file OwnedGift.hpp.

Constructor & Destructor Documentation

◆ OwnedGiftRegular() [1/2]

tgbotxx::OwnedGiftRegular::OwnedGiftRegular ( )
inline

Definition at line 42 of file OwnedGift.hpp.

◆ OwnedGiftRegular() [2/2]

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

Definition at line 45 of file OwnedGift.hpp.

◆ ~OwnedGiftRegular()

tgbotxx::OwnedGiftRegular::~OwnedGiftRegular ( )
overridedefault

Member Function Documentation

◆ fromJson()

void tgbotxx::OwnedGiftRegular::fromJson ( const nl::json &  json)
inlineoverridevirtual

Deserializes this object from JSON.

Reimplemented from tgbotxx::OwnedGift.

Definition at line 105 of file OwnedGift.hpp.

◆ toJson()

nl::json tgbotxx::OwnedGiftRegular::toJson ( ) const
inlineoverridevirtual

Serializes this object to JSON.

Reimplemented from tgbotxx::OwnedGift.

Definition at line 87 of file OwnedGift.hpp.

Member Data Documentation

◆ canBeUpgraded

bool tgbotxx::OwnedGiftRegular::canBeUpgraded {}

Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only.

Definition at line 75 of file OwnedGift.hpp.

◆ convertStarCount

std::int32_t tgbotxx::OwnedGiftRegular::convertStarCount {}

Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift.

Definition at line 81 of file OwnedGift.hpp.

◆ entities

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

Optional. Special entities that appear in the text.

Definition at line 66 of file OwnedGift.hpp.

◆ gift

Ptr<Gift> tgbotxx::OwnedGiftRegular::gift

Information about the regular gift.

Definition at line 51 of file OwnedGift.hpp.

◆ isPrivate

bool tgbotxx::OwnedGiftRegular::isPrivate {}

Optional. True, if the sender and gift text are shown only to the gift receiver.

Definition at line 69 of file OwnedGift.hpp.

◆ isSaved

bool tgbotxx::OwnedGiftRegular::isSaved {}

Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only.

Definition at line 72 of file OwnedGift.hpp.

◆ ownedGiftId

std::string tgbotxx::OwnedGiftRegular::ownedGiftId

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

Definition at line 54 of file OwnedGift.hpp.

◆ prepaidUpgradeStarCount

std::int32_t tgbotxx::OwnedGiftRegular::prepaidUpgradeStarCount {}

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

Definition at line 84 of file OwnedGift.hpp.

◆ sendDate

std::int64_t tgbotxx::OwnedGiftRegular::sendDate {}

Date the gift was sent in Unix time.

Definition at line 60 of file OwnedGift.hpp.

◆ senderUser

Ptr<User> tgbotxx::OwnedGiftRegular::senderUser

Optional. Sender of the gift if it is a known user.

Definition at line 57 of file OwnedGift.hpp.

◆ text

std::string tgbotxx::OwnedGiftRegular::text

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

Definition at line 63 of file OwnedGift.hpp.

◆ wasRefunded

bool tgbotxx::OwnedGiftRegular::wasRefunded {}

Optional. True, if the gift was refunded and isn't available anymore.

Definition at line 78 of file OwnedGift.hpp.


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