9 explicit Invoice(
const nl::json& json) {
36 nl::json json = nl::json::object();
#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 contains basic information about an invoice. https://core.telegram.org/bots/api#invoice.
std::string currency
Three-letter ISO 4217 currency code https://core.telegram.org/bots/payments#supported-currencies .
std::string description
Product description.
void fromJson(const nl::json &json)
Deserializes this object from JSON.
std::string title
Product name.
std::int32_t totalAmount
Total price in the smallest units of the currency (integer, not float/double). For example,...
nl::json toJson() const
Serializes this object to JSON.
std::string startParameter
Unique bot deep-linking parameter that can be used to generate this invoice.
Invoice(const nl::json &json)