tgbot-cpp
PreCheckoutQuery.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Oleg Morozenkov
3  * Copyright (c) 2017 Maks Mazurov (fox.cpp)
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy
6  * of this software and associated documentation files (the "Software"), to deal
7  * in the Software without restriction, including without limitation the rights
8  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9  * copies of the Software, and to permit persons to whom the Software is
10  * furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in all
13  * copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21  * SOFTWARE.
22  */
23 
24 #ifndef TGBOT_PRECHECKOUTQUERY_H
25 #define TGBOT_PRECHECKOUTQUERY_H
26 
27 #include <string>
28 #include <memory>
29 #include <vector>
30 #include "tgbot/types/User.h"
31 #include "tgbot/types/OrderInfo.h"
32 
33 namespace TgBot {
34 
43 public:
44  typedef std::shared_ptr<PreCheckoutQuery> Ptr;
45 
49  std::string id;
50 
55 
59  std::string currency;
60 
72  int32_t totalAmount;
73 
77  std::string invoicePayload;
78 
82  std::string shippingOptionId;
83 
88 };
89 }
90 
91 #endif //TGBOT_PRECHECKOUTQUERY_H
User::Ptr from
User who sent the query.
This object contains information about an incoming pre-checkout query.
std::string id
Unique query identifier.
Definition: Api.h:49
int32_t totalAmount
Total price in the smallest units of the currency (integer, not float/double).
std::string invoicePayload
Bot specified invoice payload.
std::string currency
Three-letter ISO 4217 currency code.
OrderInfo::Ptr orderInfo
Optional. Order info provided by the user.
std::shared_ptr< OrderInfo > Ptr
Definition: OrderInfo.h:42
std::string shippingOptionId
Optional. Identifier of the shipping option chosen by the user.
std::shared_ptr< PreCheckoutQuery > Ptr
std::shared_ptr< User > Ptr
Definition: User.h:39