34 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.
Contains information about the affiliate that received a commission via a transaction https://core....
Ptr< User > affiliateUser
Optional. The bot or user that received an affiliate commission.
std::int32_t amount
Integer amount of Telegram Stars received by the affiliate from the transaction; can be negative for ...
nl::json toJson() const
Serializes this object to JSON.
Ptr< Chat > affiliateChat
Optional. The chat that received an affiliate commission.
std::int32_t nanostarAmount
Optional. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; can be negat...
void fromJson(const nl::json &json)
Deserializes this object from JSON.
std::int32_t commissionPerMille
The number of Telegram Stars received by the affiliate for each 1000 Stars received by the bot.
AffiliateInfo(const nl::json &json)