tgbotxx 1.1.9.2
Telegram Bot C++ Library
Loading...
Searching...
No Matches
StarTransactions.hpp
Go to the documentation of this file.
1#pragma once
4#include <vector>
5
6namespace tgbotxx {
7
11 StarTransactions() = default;
12 explicit StarTransactions(const nl::json& json) {
13 fromJson(json);
14 }
15
17 std::vector<Ptr<StarTransaction>> transactions;
18
21 nl::json toJson() const {
22 nl::json json = nl::json::object();
24 return json;
25 }
26
28 void fromJson(const nl::json& json) {
29 OBJECT_DESERIALIZE_FIELD_PTR_ARRAY(json, "transactions", transactions, false);
30 }
31 };
32}
#define OBJECT_SERIALIZE_FIELD_PTR_ARRAY(json, json_field, array_field)
Definition Object.hpp:27
#define OBJECT_DESERIALIZE_FIELD_PTR_ARRAY(json, json_field, array_field, optional)
Definition Object.hpp:89
Contains a list of Telegram Star transactions. https://core.telegram.org/bots/api#startransactions.
StarTransactions(const nl::json &json)
std::vector< Ptr< StarTransaction > > transactions
The list of transactions.
nl::json toJson() const
Serializes this object to JSON.
void fromJson(const nl::json &json)
Deserializes this object from JSON.