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

This object contains information about an incoming pre-checkout query. https://core.telegram.org/bots/api#precheckoutquery. More...

#include <PreCheckoutQuery.hpp>

Public Member Functions

 PreCheckoutQuery ()=default
 
 PreCheckoutQuery (const nl::json &json)
 
nl::json toJson () const
 Serializes this object to JSON. More...
 
void fromJson (const nl::json &json)
 Deserializes this object from JSON. More...
 

Public Attributes

std::string id
 Unique query identifier. More...
 
Ptr< Userfrom
 User who sent the query. More...
 
std::string currency
 Three-letter ISO 4217 currency code. More...
 
std::int32_t totalAmount {}
 Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). More...
 
std::string invoicePayload
 Bot specified invoice payload. More...
 
std::string shippingOptionId
 Optional. Identifier of the shipping option chosen by the user. More...
 
Ptr< OrderInfoorderInfo
 Optional. Order information provided by the user. More...
 

Detailed Description

This object contains information about an incoming pre-checkout query. https://core.telegram.org/bots/api#precheckoutquery.

Definition at line 9 of file PreCheckoutQuery.hpp.

Constructor & Destructor Documentation

◆ PreCheckoutQuery() [1/2]

tgbotxx::PreCheckoutQuery::PreCheckoutQuery ( )
default

◆ PreCheckoutQuery() [2/2]

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

Definition at line 11 of file PreCheckoutQuery.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 55 of file PreCheckoutQuery.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 42 of file PreCheckoutQuery.hpp.

Member Data Documentation

◆ currency

std::string tgbotxx::PreCheckoutQuery::currency

Three-letter ISO 4217 currency code.

Note
Supported currencies: https://core.telegram.org/bots/payments#supported-currencies

Definition at line 23 of file PreCheckoutQuery.hpp.

◆ from

Ptr<User> tgbotxx::PreCheckoutQuery::from

User who sent the query.

Definition at line 19 of file PreCheckoutQuery.hpp.

◆ id

std::string tgbotxx::PreCheckoutQuery::id

Unique query identifier.

Definition at line 16 of file PreCheckoutQuery.hpp.

◆ invoicePayload

std::string tgbotxx::PreCheckoutQuery::invoicePayload

Bot specified invoice payload.

Definition at line 31 of file PreCheckoutQuery.hpp.

◆ orderInfo

Ptr<OrderInfo> tgbotxx::PreCheckoutQuery::orderInfo

Optional. Order information provided by the user.

Definition at line 37 of file PreCheckoutQuery.hpp.

◆ shippingOptionId

std::string tgbotxx::PreCheckoutQuery::shippingOptionId

Optional. Identifier of the shipping option chosen by the user.

Definition at line 34 of file PreCheckoutQuery.hpp.

◆ totalAmount

std::int32_t tgbotxx::PreCheckoutQuery::totalAmount {}

Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).

Definition at line 28 of file PreCheckoutQuery.hpp.


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