tgbotxx  1.1.6.9
Telegram Bot C++ Library
tgbotxx::ChatBoostSourceGiftCode Struct Reference

The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user. https://core.telegram.org/bots/api#chatboostsourcegiftcode. More...

#include <ChatBoostSource.hpp>

Inheritance diagram for tgbotxx::ChatBoostSourceGiftCode:
tgbotxx::ChatBoostSource

Public Member Functions

 ChatBoostSourceGiftCode ()
 
 ChatBoostSourceGiftCode (const nl::json &json)
 
nl::json toJson () const override
 Serializes this object to JSON. More...
 
void fromJson (const nl::json &json) override
 Deserializes this object from JSON. More...
 
- Public Member Functions inherited from tgbotxx::ChatBoostSource
 ChatBoostSource ()=default
 
 ChatBoostSource (const nl::json &json)
 

Public Attributes

Ptr< Useruser
 User for which the gift code was created. More...
 
- Public Attributes inherited from tgbotxx::ChatBoostSource
std::string source
 Source of the boost. More...
 

Detailed Description

The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user. https://core.telegram.org/bots/api#chatboostsourcegiftcode.

Definition at line 67 of file ChatBoostSource.hpp.

Constructor & Destructor Documentation

◆ ChatBoostSourceGiftCode() [1/2]

tgbotxx::ChatBoostSourceGiftCode::ChatBoostSourceGiftCode ( )
inline

Definition at line 68 of file ChatBoostSource.hpp.

◆ ChatBoostSourceGiftCode() [2/2]

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

Definition at line 71 of file ChatBoostSource.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Reimplemented from tgbotxx::ChatBoostSource.

Definition at line 84 of file ChatBoostSource.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Reimplemented from tgbotxx::ChatBoostSource.

Definition at line 79 of file ChatBoostSource.hpp.

Member Data Documentation

◆ user

Ptr<User> tgbotxx::ChatBoostSourceGiftCode::user

User for which the gift code was created.

Definition at line 77 of file ChatBoostSource.hpp.


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