tgbotxx 1.1.9.2
Telegram Bot C++ Library
Loading...
Searching...
No Matches
PaidMessagePriceChanged.hpp
Go to the documentation of this file.
1#pragma once
3
4namespace tgbotxx {
9 explicit PaidMessagePriceChanged(const nl::json& json) {
10 fromJson(json);
11 }
12
14 std::int64_t paidMessageStarCount{};
15
18 nl::json toJson() const {
19 nl::json json = nl::json::object();
20 OBJECT_SERIALIZE_FIELD(json, "paid_message_star_count", paidMessageStarCount);
21 return json;
22 }
24 void fromJson(const nl::json& json) {
25 OBJECT_DESERIALIZE_FIELD(json, "paid_message_star_count", paidMessageStarCount, 0, false);
26 }
27 };
28}
#define OBJECT_SERIALIZE_FIELD(json, json_field, field)
Available objects: https://core.telegram.org/bots/api#available-types.
Definition Object.hpp:19
#define OBJECT_DESERIALIZE_FIELD(json, json_field, field, default_value, optional)
Deserialize.
Definition Object.hpp:46
Describes a service message about a change in the price of paid messages within a chat....
std::int64_t paidMessageStarCount
The new number of Telegram Stars that must be paid by non-administrator users for each message.
nl::json toJson() const
Serializes this object to JSON.
void fromJson(const nl::json &json)
Deserializes this object from JSON.