42 nl::json json = nl::json::object();
#define OBJECT_SERIALIZE_FIELD_PTR(json, json_field, field)
#define OBJECT_DESERIALIZE_FIELD_PTR(json, json_field, field, optional)
#define OBJECT_SERIALIZE_FIELD(json, json_field, field)
Available objects: https://core.telegram.org/bots/api#available-types.
#define OBJECT_DESERIALIZE_FIELD(json, json_field, field, default_value, optional)
Deserialize.
Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment...
nl::json toJson() const
Serializes this object to JSON.
std::string id
Unique identifier of the transaction. Coincides with the identifier of the original transaction for r...
void fromJson(const nl::json &json)
Deserializes this object from JSON.
StarTransaction(const nl::json &json)
std::int32_t nanostarAmount
Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 ...
std::int64_t amount
Integer amount of Telegram Stars transferred by the transaction.
StarTransaction()=default
Ptr< TransactionPartner > receiver
Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund,...
Ptr< TransactionPartner > source
Optional. Source of an incoming transaction (e.g., a user purchasing goods or services,...
std::time_t date
Date the transaction was created in Unix time.