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

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

#include <OwnedGift.hpp>

Inheritance diagram for tgbotxx::OwnedGiftUnique:
tgbotxx::OwnedGift

Public Member Functions

 OwnedGiftUnique ()
 
 OwnedGiftUnique (const nl::json &json)
 
 ~OwnedGiftUnique () 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< UniqueGiftgift
 Information about the unique gift.
 
std::string ownedGiftId
 Optional. Unique identifier of the received 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.
 
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 canBeTransferred {}
 Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only.
 
std::int32_t transferStarCount {}
 Optional. Number of Telegram Stars that must be paid to transfer the gift.
 
std::int64_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.
 
- Public Attributes inherited from tgbotxx::OwnedGift
std::string type
 Type of the gift: "regular" or "unique".
 

Detailed Description

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

Definition at line 123 of file OwnedGift.hpp.

Constructor & Destructor Documentation

◆ OwnedGiftUnique() [1/2]

tgbotxx::OwnedGiftUnique::OwnedGiftUnique ( )
inline

Definition at line 124 of file OwnedGift.hpp.

◆ OwnedGiftUnique() [2/2]

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

Definition at line 127 of file OwnedGift.hpp.

◆ ~OwnedGiftUnique()

tgbotxx::OwnedGiftUnique::~OwnedGiftUnique ( )
overridedefault

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Reimplemented from tgbotxx::OwnedGift.

Definition at line 171 of file OwnedGift.hpp.

◆ toJson()

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

Serializes this object to JSON.

Reimplemented from tgbotxx::OwnedGift.

Definition at line 157 of file OwnedGift.hpp.

Member Data Documentation

◆ canBeTransferred

bool tgbotxx::OwnedGiftUnique::canBeTransferred {}

Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only.

Definition at line 148 of file OwnedGift.hpp.

◆ gift

Ptr<UniqueGift> tgbotxx::OwnedGiftUnique::gift

Information about the unique gift.

Definition at line 133 of file OwnedGift.hpp.

◆ isSaved

bool tgbotxx::OwnedGiftUnique::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 145 of file OwnedGift.hpp.

◆ nextTransferDate

std::int64_t tgbotxx::OwnedGiftUnique::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 154 of file OwnedGift.hpp.

◆ ownedGiftId

std::string tgbotxx::OwnedGiftUnique::ownedGiftId

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

Definition at line 136 of file OwnedGift.hpp.

◆ sendDate

std::int64_t tgbotxx::OwnedGiftUnique::sendDate {}

Date the gift was sent in Unix time.

Definition at line 142 of file OwnedGift.hpp.

◆ senderUser

Ptr<User> tgbotxx::OwnedGiftUnique::senderUser

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

Definition at line 139 of file OwnedGift.hpp.

◆ transferStarCount

std::int32_t tgbotxx::OwnedGiftUnique::transferStarCount {}

Optional. Number of Telegram Stars that must be paid to transfer the gift.

Definition at line 151 of file OwnedGift.hpp.


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