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

Describes the price of a suggested post. https://core.telegram.org/bots/api#suggestedpostprice. More...

#include <SuggestedPostPrice.hpp>

Public Member Functions

 SuggestedPostPrice ()=default
 
 SuggestedPostPrice (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 currency
 Currency in which the post will be paid. Currently, must be one of “XTR” for Telegram Stars or “TON” for toncoins.
 
std::int64_t amount {}
 The amount of the currency that will be paid for the post in the smallest units of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000.
 

Detailed Description

Describes the price of a suggested post. https://core.telegram.org/bots/api#suggestedpostprice.

Definition at line 7 of file SuggestedPostPrice.hpp.

Constructor & Destructor Documentation

◆ SuggestedPostPrice() [1/2]

tgbotxx::SuggestedPostPrice::SuggestedPostPrice ( )
default

◆ SuggestedPostPrice() [2/2]

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

Definition at line 9 of file SuggestedPostPrice.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 32 of file SuggestedPostPrice.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 24 of file SuggestedPostPrice.hpp.

Member Data Documentation

◆ amount

std::int64_t tgbotxx::SuggestedPostPrice::amount {}

The amount of the currency that will be paid for the post in the smallest units of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000.

Definition at line 20 of file SuggestedPostPrice.hpp.

◆ currency

std::string tgbotxx::SuggestedPostPrice::currency

Currency in which the post will be paid. Currently, must be one of “XTR” for Telegram Stars or “TON” for toncoins.

Definition at line 15 of file SuggestedPostPrice.hpp.


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