|
tgbotxx 1.1.9.2
Telegram Bot C++ Library
|
Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control. https://core.telegram.org/bots/api#startransaction. More...
#include <StarTransaction.hpp>
Public Member Functions | |
| StarTransaction ()=default | |
| StarTransaction (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 | id |
| Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users. | |
| std::int64_t | amount {} |
| Integer amount of Telegram Stars transferred by the transaction. | |
| std::int32_t | nanostarAmount {} |
| Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999. | |
| std::time_t | date {} |
| Date the transaction was created in Unix time. | |
| Ptr< TransactionPartner > | source |
| Optional. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions. | |
| Ptr< TransactionPartner > | receiver |
| Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions. | |
Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control. https://core.telegram.org/bots/api#startransaction.
Definition at line 13 of file StarTransaction.hpp.
|
default |
|
inlineexplicit |
Definition at line 15 of file StarTransaction.hpp.
|
inline |
Deserializes this object from JSON.
Definition at line 53 of file StarTransaction.hpp.
|
inline |
Serializes this object to JSON.
Definition at line 41 of file StarTransaction.hpp.
| std::int64_t tgbotxx::StarTransaction::amount {} |
Integer amount of Telegram Stars transferred by the transaction.
Definition at line 25 of file StarTransaction.hpp.
| std::time_t tgbotxx::StarTransaction::date {} |
Date the transaction was created in Unix time.
Definition at line 31 of file StarTransaction.hpp.
| std::string tgbotxx::StarTransaction::id |
Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users.
Definition at line 22 of file StarTransaction.hpp.
| std::int32_t tgbotxx::StarTransaction::nanostarAmount {} |
Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999.
Definition at line 28 of file StarTransaction.hpp.
| Ptr<TransactionPartner> tgbotxx::StarTransaction::receiver |
Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions.
Definition at line 37 of file StarTransaction.hpp.
| Ptr<TransactionPartner> tgbotxx::StarTransaction::source |
Optional. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions.
Definition at line 34 of file StarTransaction.hpp.