43 nl::json json = nl::json::object();
#define OBJECT_SERIALIZE_FIELD_PTR(json, json_field, field)
#define OBJECT_SERIALIZE_FIELD_PTR_ARRAY(json, json_field, array_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.
#define OBJECT_DESERIALIZE_FIELD_PTR_ARRAY(json, json_field, array_field, optional)
Describes a service message about a regular gift that was sent or received. https://core....
Ptr< Gift > gift
Information about the gift.
std::string text
Optional. Text of the message that was added to the gift.
std::int64_t convertStarCount
Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitte...
std::vector< Ptr< MessageEntity > > entities
Optional. Special entities that appear in the text.
std::string ownedGiftId
Optional. Unique identifier of the received gift for the bot; only present for gifts received on beha...
nl::json toJson() const
Serializes this object to JSON.
bool isPrivate
Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise,...
bool canBeUpgraded
Optional. True, if the gift can be upgraded to a unique gift.
std::int64_t prepaidUpgradeStarCount
Optional. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gif...
GiftInfo(const nl::json &json)
void fromJson(const nl::json &json)
Deserializes this object from JSON.