11 explicit Gift(
const nl::json& json) {
39 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.
This object represents a gift that can be sent by the bot. https://core.telegram.org/bots/api#gift.
std::int64_t totalCount
Optional. The total number of the gifts of this type that can be sent; for limited gifts only.
Ptr< Sticker > sticker
The sticker that represents the gift.
std::int64_t upgradeStarCount
Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one.
Ptr< Chat > publisherChat
Optional. Information about the chat that published the gift.
std::int64_t remainingCount
Optional. The number of remaining gifts of this type that can be sent; for limited gifts only.
nl::json toJson() const
Serializes this object to JSON.
std::string id
Unique identifier of the gift.
void fromJson(const nl::json &json)
Deserializes this object from JSON.
std::int64_t starCount
The number of Telegram Stars that must be paid to send the sticker.
Gift(const nl::json &json)