tgbotxx  1.1.6.9
Telegram Bot C++ Library
tgbotxx::InputInvoiceMessageContent Struct Reference

Represents the content of a invoice message to be sent as the result of an inline query. https://core.telegram.org/bots/api#inputinvoicemessagecontent. More...

#include <InputMessageContent.hpp>

Inheritance diagram for tgbotxx::InputInvoiceMessageContent:
tgbotxx::InputMessageContent

Public Member Functions

 InputInvoiceMessageContent ()
 
 InputInvoiceMessageContent (const nl::json &json)
 
nl::json toJson () const override
 
void fromJson (const nl::json &json) override
 
- Public Member Functions inherited from tgbotxx::InputMessageContent
 InputMessageContent ()=default
 
 InputMessageContent (const nl::json &json)
 
virtual ~InputMessageContent ()=default
 

Public Attributes

std::string title
 Product name, 1-32 characters. More...
 
std::string description
 Product description, 1-255 characters. More...
 
std::string payload
 Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. More...
 
std::string providerToken
 Payment provider token, obtained via @BotFather. More...
 
std::string currency
 Three-letter ISO 4217 currency code, see more on currencies More...
 
std::vector< Ptr< LabeledPrice > > prices
 Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) More...
 
std::int32_t maxTipAmount {}
 Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. More...
 
std::vector< std::int32_t > suggestedTipAmounts
 Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed maxTipAmount. More...
 
std::string providerData
 Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider. More...
 
std::string photoUrl
 Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. More...
 
std::int64_t photoSize {}
 Optional. Photo size in bytes. More...
 
std::int32_t photoWidth {}
 Optional. Photo width. More...
 
std::int32_t photoHeight {}
 Optional. Photo height. More...
 
bool needName {}
 Optional. Pass True if you require the user's full name to complete the order. More...
 
bool needPhoneNumber {}
 Optional. Pass True if you require the user's phone number to complete the order. More...
 
bool needEmail {}
 Optional. Pass True if you require the user's email address to complete the order. More...
 
bool needShippingAddress {}
 Optional. Pass True if you require the user's shipping address to complete the order. More...
 
bool sendPhoneNumberToProvider {}
 Optional. Pass True if the user's phone number should be sent to provider. More...
 
bool sendEmailToProvider {}
 Optional. Pass True if the user's email address should be sent to provider. More...
 
bool isFlexible {}
 Optional. Pass True if the final price depends on the shipping method. More...
 
- Public Attributes inherited from tgbotxx::InputMessageContent
std::string type
 Type of this content. More...
 

Detailed Description

Represents the content of a invoice message to be sent as the result of an inline query. https://core.telegram.org/bots/api#inputinvoicemessagecontent.

Definition at line 233 of file InputMessageContent.hpp.

Constructor & Destructor Documentation

◆ InputInvoiceMessageContent() [1/2]

tgbotxx::InputInvoiceMessageContent::InputInvoiceMessageContent ( )
inline

Definition at line 234 of file InputMessageContent.hpp.

◆ InputInvoiceMessageContent() [2/2]

tgbotxx::InputInvoiceMessageContent::InputInvoiceMessageContent ( const nl::json &  json)
inlineexplicit

Definition at line 237 of file InputMessageContent.hpp.

Member Function Documentation

◆ fromJson()

void tgbotxx::InputInvoiceMessageContent::fromJson ( const nl::json &  json)
inlineoverridevirtual

Reimplemented from tgbotxx::InputMessageContent.

Definition at line 331 of file InputMessageContent.hpp.

◆ toJson()

nl::json tgbotxx::InputInvoiceMessageContent::toJson ( ) const
inlineoverridevirtual

Reimplemented from tgbotxx::InputMessageContent.

Definition at line 306 of file InputMessageContent.hpp.

Member Data Documentation

◆ currency

std::string tgbotxx::InputInvoiceMessageContent::currency

Three-letter ISO 4217 currency code, see more on currencies

Definition at line 254 of file InputMessageContent.hpp.

◆ description

std::string tgbotxx::InputInvoiceMessageContent::description

Product description, 1-255 characters.

Definition at line 245 of file InputMessageContent.hpp.

◆ isFlexible

bool tgbotxx::InputInvoiceMessageContent::isFlexible {}

Optional. Pass True if the final price depends on the shipping method.

Definition at line 304 of file InputMessageContent.hpp.

◆ maxTipAmount

std::int32_t tgbotxx::InputInvoiceMessageContent::maxTipAmount {}

Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0.

Definition at line 263 of file InputMessageContent.hpp.

◆ needEmail

bool tgbotxx::InputInvoiceMessageContent::needEmail {}

Optional. Pass True if you require the user's email address to complete the order.

Definition at line 292 of file InputMessageContent.hpp.

◆ needName

bool tgbotxx::InputInvoiceMessageContent::needName {}

Optional. Pass True if you require the user's full name to complete the order.

Definition at line 286 of file InputMessageContent.hpp.

◆ needPhoneNumber

bool tgbotxx::InputInvoiceMessageContent::needPhoneNumber {}

Optional. Pass True if you require the user's phone number to complete the order.

Definition at line 289 of file InputMessageContent.hpp.

◆ needShippingAddress

bool tgbotxx::InputInvoiceMessageContent::needShippingAddress {}

Optional. Pass True if you require the user's shipping address to complete the order.

Definition at line 295 of file InputMessageContent.hpp.

◆ payload

std::string tgbotxx::InputInvoiceMessageContent::payload

Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.

Definition at line 248 of file InputMessageContent.hpp.

◆ photoHeight

std::int32_t tgbotxx::InputInvoiceMessageContent::photoHeight {}

Optional. Photo height.

Definition at line 283 of file InputMessageContent.hpp.

◆ photoSize

std::int64_t tgbotxx::InputInvoiceMessageContent::photoSize {}

Optional. Photo size in bytes.

Definition at line 277 of file InputMessageContent.hpp.

◆ photoUrl

std::string tgbotxx::InputInvoiceMessageContent::photoUrl

Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.

Definition at line 274 of file InputMessageContent.hpp.

◆ photoWidth

std::int32_t tgbotxx::InputInvoiceMessageContent::photoWidth {}

Optional. Photo width.

Definition at line 280 of file InputMessageContent.hpp.

◆ prices

std::vector<Ptr<LabeledPrice> > tgbotxx::InputInvoiceMessageContent::prices

Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)

Definition at line 257 of file InputMessageContent.hpp.

◆ providerData

std::string tgbotxx::InputInvoiceMessageContent::providerData

Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.

Definition at line 271 of file InputMessageContent.hpp.

◆ providerToken

std::string tgbotxx::InputInvoiceMessageContent::providerToken

Payment provider token, obtained via @BotFather.

Definition at line 251 of file InputMessageContent.hpp.

◆ sendEmailToProvider

bool tgbotxx::InputInvoiceMessageContent::sendEmailToProvider {}

Optional. Pass True if the user's email address should be sent to provider.

Definition at line 301 of file InputMessageContent.hpp.

◆ sendPhoneNumberToProvider

bool tgbotxx::InputInvoiceMessageContent::sendPhoneNumberToProvider {}

Optional. Pass True if the user's phone number should be sent to provider.

Definition at line 298 of file InputMessageContent.hpp.

◆ suggestedTipAmounts

std::vector<std::int32_t> tgbotxx::InputInvoiceMessageContent::suggestedTipAmounts

Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed maxTipAmount.

Definition at line 267 of file InputMessageContent.hpp.

◆ title

std::string tgbotxx::InputInvoiceMessageContent::title

Product name, 1-32 characters.

Definition at line 242 of file InputMessageContent.hpp.


The documentation for this struct was generated from the following file: