tgbotxx 1.2.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 37 of file OwnedGift.hpp.

Constructor & Destructor Documentation

◆ OwnedGiftRegular() [1/2]

tgbotxx::OwnedGiftRegular::OwnedGiftRegular ( )
inline

Definition at line 38 of file OwnedGift.hpp.

◆ OwnedGiftRegular() [2/2]

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

Definition at line 41 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 101 of file OwnedGift.hpp.

◆ toJson()

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

Serializes this object to JSON.

Reimplemented from tgbotxx::OwnedGift.

Definition at line 83 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 71 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 77 of file OwnedGift.hpp.

◆ entities

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

Optional. Special entities that appear in the text.

Definition at line 62 of file OwnedGift.hpp.

◆ gift

Ptr<Gift> tgbotxx::OwnedGiftRegular::gift

Information about the regular gift.

Definition at line 47 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 65 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 68 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 50 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 80 of file OwnedGift.hpp.

◆ sendDate

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

Date the gift was sent in Unix time.

Definition at line 56 of file OwnedGift.hpp.

◆ senderUser

Ptr<User> tgbotxx::OwnedGiftRegular::senderUser

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

Definition at line 53 of file OwnedGift.hpp.

◆ text

std::string tgbotxx::OwnedGiftRegular::text

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

Definition at line 59 of file OwnedGift.hpp.

◆ wasRefunded

bool tgbotxx::OwnedGiftRegular::wasRefunded {}

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

Definition at line 74 of file OwnedGift.hpp.


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