From 4cc83d0ea36d4470123bdf77f881dffed9ebd4ac Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Fri, 22 Jun 2018 21:11:23 +0900 Subject: Fix compilation error (no matching function) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix "‘parseSuccessfulPayment’ was not declared in this scope" --- include/tgbot/Api.h | 6 ++++-- include/tgbot/TgTypeParser.h | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'include') 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& prices, + const std::string& providerToken, const std::string& startParameter, const std::string& currency, const std::vector 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& shippingOptions = nullptr, const std::string& errorMessage = "") const; + bool answerShippingQuery(const std::string& shippingQueryId, bool ok, const std::vector 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; -- cgit v1.2.3