summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJellyBrick <shlee1503@naver.com>2018-06-22 21:11:23 +0900
committerJellyBrick <shlee1503@naver.com>2018-06-22 21:11:23 +0900
commit4cc83d0ea36d4470123bdf77f881dffed9ebd4ac (patch)
treedaca74d51376c797a2eae74f9d91befc1fa05d08 /include
parente252f0aa25bb7087698ed94698a91f9309e61460 (diff)
Fix compilation error (no matching function)
Fix "‘parseSuccessfulPayment’ was not declared in this scope"
Diffstat (limited to 'include')
-rw-r--r--include/tgbot/Api.h6
-rw-r--r--include/tgbot/TgTypeParser.h4
2 files changed, 6 insertions, 4 deletions
diff --git a/include/tgbot/Api.h b/include/tgbot/Api.h
index efa2ad4..b9717ba 100644
--- a/include/tgbot/Api.h
+++ b/include/tgbot/Api.h
@@ -43,6 +43,8 @@
#include "tgbot/types/File.h"
#include "tgbot/types/InputMedia.h"
#include "tgbot/types/GameHighScore.h"
+#include "tgbot/types/LabeledPrice.h"
+#include "tgbot/types/ShippingOption.h"
namespace TgBot {
@@ -212,7 +214,7 @@ public:
* @return On success, the sent Message is returned.
*/
Message::Ptr sendInvoice(int64_t chatId, const std::string& title, const std::string& description, const std::string& payload,
- const std::string& providerToken, const std::string& startParameter, const std::string& currency, const std::vector<LabeledPrice>& prices,
+ const std::string& providerToken, const std::string& startParameter, const std::string& currency, const std::vector<LabeledPrice> prices,
const std::string& providerData = "", const std::string& photoUrl = "", int32_t photoSize = 0,
int32_t photoWidth = 0, int32_t photoHeight = 0, bool needName = false,
bool needPhoneNumber = false, bool needEmail = false, bool needShippingAddress = false,
@@ -230,7 +232,7 @@ public:
* @param errorMessage Optional. Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.
* @return On success, True is returned.
*/
- bool answerShippingQuery(const std::string& shippingQueryId, bool ok, const std::vector<ShippingOption>& shippingOptions = nullptr, const std::string& errorMessage = "") const;
+ bool answerShippingQuery(const std::string& shippingQueryId, bool ok, const std::vector<ShippingOption> shippingOptions = nullptr, const std::string& errorMessage = "") const;
/**
* @brief Use this method to respond to such pre-checkout queries.
diff --git a/include/tgbot/TgTypeParser.h b/include/tgbot/TgTypeParser.h
index dfb10a7..356b69e 100644
--- a/include/tgbot/TgTypeParser.h
+++ b/include/tgbot/TgTypeParser.h
@@ -292,8 +292,8 @@ public:
ShippingQuery::Ptr parseJsonAndGetShippingQuery(const boost::property_tree::ptree& data) const;
std::string parseShippingQuery(const ShippingQuery::Ptr& object) const;
- SuccessfulPayment::Ptr parseJsonAndGetSucessfulPayment(const boost::property_tree::ptree& data) const;
- std::string parseSucessfulPayment(const SuccessfulPayment::Ptr& object) const;
+ SuccessfulPayment::Ptr parseJsonAndGetSuccessfulPayment(const boost::property_tree::ptree& data) const;
+ std::string parseSuccessfulPayment(const SuccessfulPayment::Ptr& object) const;
inline boost::property_tree::ptree parseJson(const std::string& json) const {
boost::property_tree::ptree tree;