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

This object contains basic information about a successful payment. https://core.telegram.org/bots/api#successfulpayment. More...

#include <SuccessfulPayment.hpp>

Public Member Functions

 SuccessfulPayment ()=default
 
 SuccessfulPayment (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 currency
 Three-letter ISO 4217 currency code https://core.telegram.org/bots/payments#supported-currencies . 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). https://core.telegram.org/bots/payments/currencies.json . 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...
 
std::string telegramPaymentChargeId
 Telegram payment identifier. More...
 
std::string providerPaymentChargeId
 Provider payment identifier. More...
 

Detailed Description

This object contains basic information about a successful payment. https://core.telegram.org/bots/api#successfulpayment.

Definition at line 8 of file SuccessfulPayment.hpp.

Constructor & Destructor Documentation

◆ SuccessfulPayment() [1/2]

tgbotxx::SuccessfulPayment::SuccessfulPayment ( )
default

◆ SuccessfulPayment() [2/2]

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

Definition at line 10 of file SuccessfulPayment.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 55 of file SuccessfulPayment.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 42 of file SuccessfulPayment.hpp.

Member Data Documentation

◆ currency

std::string tgbotxx::SuccessfulPayment::currency

Three-letter ISO 4217 currency code https://core.telegram.org/bots/payments#supported-currencies .

Definition at line 16 of file SuccessfulPayment.hpp.

◆ invoicePayload

std::string tgbotxx::SuccessfulPayment::invoicePayload

Bot specified invoice payload.

Definition at line 25 of file SuccessfulPayment.hpp.

◆ orderInfo

Ptr<OrderInfo> tgbotxx::SuccessfulPayment::orderInfo

Optional. Order information provided by the user.

Definition at line 31 of file SuccessfulPayment.hpp.

◆ providerPaymentChargeId

std::string tgbotxx::SuccessfulPayment::providerPaymentChargeId

Provider payment identifier.

Definition at line 37 of file SuccessfulPayment.hpp.

◆ shippingOptionId

std::string tgbotxx::SuccessfulPayment::shippingOptionId

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

Definition at line 28 of file SuccessfulPayment.hpp.

◆ telegramPaymentChargeId

std::string tgbotxx::SuccessfulPayment::telegramPaymentChargeId

Telegram payment identifier.

Definition at line 34 of file SuccessfulPayment.hpp.

◆ totalAmount

std::int32_t tgbotxx::SuccessfulPayment::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). https://core.telegram.org/bots/payments/currencies.json .

Definition at line 22 of file SuccessfulPayment.hpp.


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