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

This object describes the model of a unique gift. https://core.telegram.org/bots/api#uniquegiftmodel. More...

#include <UniqueGiftModel.hpp>

Public Member Functions

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

std::string name
 Name of the model.
 
Ptr< Stickersticker
 The sticker that represents the unique gift.
 
std::int32_t rarityPerMille {}
 The number of unique gifts that receive this model for every 1000 gifts upgraded.
 

Detailed Description

This object describes the model of a unique gift. https://core.telegram.org/bots/api#uniquegiftmodel.

Definition at line 8 of file UniqueGiftModel.hpp.

Constructor & Destructor Documentation

◆ UniqueGiftModel() [1/2]

tgbotxx::UniqueGiftModel::UniqueGiftModel ( )
default

◆ UniqueGiftModel() [2/2]

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

Definition at line 10 of file UniqueGiftModel.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 33 of file UniqueGiftModel.hpp.

◆ toJson()

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

Serializes this object to JSON.

Definition at line 24 of file UniqueGiftModel.hpp.

Member Data Documentation

◆ name

std::string tgbotxx::UniqueGiftModel::name

Name of the model.

Definition at line 15 of file UniqueGiftModel.hpp.

◆ rarityPerMille

std::int32_t tgbotxx::UniqueGiftModel::rarityPerMille {}

The number of unique gifts that receive this model for every 1000 gifts upgraded.

Definition at line 21 of file UniqueGiftModel.hpp.

◆ sticker

Ptr<Sticker> tgbotxx::UniqueGiftModel::sticker

The sticker that represents the unique gift.

Definition at line 18 of file UniqueGiftModel.hpp.


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