summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/tgbot/Api.h4
-rw-r--r--src/Api.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/tgbot/Api.h b/include/tgbot/Api.h
index 2b73d31..8dea56a 100644
--- a/include/tgbot/Api.h
+++ b/include/tgbot/Api.h
@@ -214,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::Ptr>& 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,
@@ -232,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 = std::vector<ShippingOption>(), const std::string& errorMessage = "") const;
+ bool answerShippingQuery(const std::string& shippingQueryId, bool ok, const std::vector<ShippingOption::Ptr>& shippingOptions = std::vector<ShippingOption::Ptr>(), const std::string& errorMessage = "") const;
/**
* @brief Use this method to respond to such pre-checkout queries.
diff --git a/src/Api.cpp b/src/Api.cpp
index de697df..e6a39d7 100644
--- a/src/Api.cpp
+++ b/src/Api.cpp
@@ -230,7 +230,7 @@ Message::Ptr Api::sendDocument(int64_t chatId, const string& document, const str
}
Message::Ptr Api::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::Ptr>& prices,
const std::string& providerData, const std::string& photoUrl, int32_t photoSize,
int32_t photoWidth, int32_t photoHeight, bool needName,
bool needPhoneNumber, bool needEmail, bool needShippingAddress,
@@ -294,7 +294,7 @@ Message::Ptr Api::sendInvoice(int64_t chatId, const std::string& title, const st
return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendInvoice", args));
}
-bool Api::answerShippingQuery(const std::string& shippingQueryId, bool ok, const std::vector<ShippingOption>& shippingOptions, const std::string& errorMessage) const {
+bool Api::answerShippingQuery(const std::string& shippingQueryId, bool ok, const std::vector<ShippingOption::Ptr>& shippingOptions, const std::string& errorMessage) const {
vector<HttpReqArg> args;
args.reserve(4);
args.emplace_back("shipping_query_id", shippingQueryId);