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

This object describes the types of gifts that can be gifted to a user or a chat. https://core.telegram.org/bots/api#acceptedgifttypes. More...

#include <AcceptedGiftTypes.hpp>

Public Member Functions

 AcceptedGiftTypes ()=default
 
 AcceptedGiftTypes (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

bool unlimitedGifts {}
 True, if unlimited regular gifts are accepted.
 
bool limitedGifts {}
 True, if limited regular gifts are accepted.
 
bool uniqueGifts {}
 True, if unique gifts or gifts that can be upgraded to unique for free are accepted.
 
bool premiumSubscription {}
 True, if a Telegram Premium subscription is accepted.
 

Detailed Description

This object describes the types of gifts that can be gifted to a user or a chat. https://core.telegram.org/bots/api#acceptedgifttypes.

Definition at line 8 of file AcceptedGiftTypes.hpp.

Constructor & Destructor Documentation

◆ AcceptedGiftTypes() [1/2]

tgbotxx::AcceptedGiftTypes::AcceptedGiftTypes ( )
default

◆ AcceptedGiftTypes() [2/2]

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

Definition at line 10 of file AcceptedGiftTypes.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 38 of file AcceptedGiftTypes.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 28 of file AcceptedGiftTypes.hpp.

Member Data Documentation

◆ limitedGifts

bool tgbotxx::AcceptedGiftTypes::limitedGifts {}

True, if limited regular gifts are accepted.

Definition at line 18 of file AcceptedGiftTypes.hpp.

◆ premiumSubscription

bool tgbotxx::AcceptedGiftTypes::premiumSubscription {}

True, if a Telegram Premium subscription is accepted.

Definition at line 24 of file AcceptedGiftTypes.hpp.

◆ uniqueGifts

bool tgbotxx::AcceptedGiftTypes::uniqueGifts {}

True, if unique gifts or gifts that can be upgraded to unique for free are accepted.

Definition at line 21 of file AcceptedGiftTypes.hpp.

◆ unlimitedGifts

bool tgbotxx::AcceptedGiftTypes::unlimitedGifts {}

True, if unlimited regular gifts are accepted.

Definition at line 15 of file AcceptedGiftTypes.hpp.


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