tgbot-cpp
Loading...
Searching...
No Matches
TgBot::InputInvoiceMessageContent Struct Reference

Represents the content of an invoice message to be sent as the result of an inline query. More...

#include <Types.h>

Public Types

using Ptr = std::shared_ptr<InputInvoiceMessageContent>

Public Attributes

std::string title { }
 Product name, 1-32 characters.
std::string description { }
 Product description, 1-255 characters.
std::string payload { }
 Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.
std::optional< std::string > providerToken { }
 Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.
std::string currency { }
 Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars.
std::vector< std::shared_ptr< LabeledPrice > > prices { }
 Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars.
std::optional< 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. Not supported for payments in Telegram Stars.
std::optional< 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 max_tip_amount.
std::optional< 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.
std::optional< 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.
std::optional< std::int32_t > photoSize { }
 Optional. Photo size in bytes.
std::optional< std::int32_t > photoWidth { }
 Optional. Photo width.
std::optional< std::int32_t > photoHeight { }
 Optional. Photo height.
std::optional< bool > needName { }
 Optional. Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.
std::optional< bool > needPhoneNumber { }
 Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.
std::optional< bool > needEmail { }
 Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.
std::optional< bool > needShippingAddress { }
 Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.
std::optional< bool > sendPhoneNumberToProvider { }
 Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.
std::optional< bool > sendEmailToProvider { }
 Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.
std::optional< bool > isFlexible { }
 Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.

Detailed Description

Represents the content of an invoice message to be sent as the result of an inline query.

Definition at line 6119 of file Types.h.

Member Typedef Documentation

◆ Ptr

Definition at line 6120 of file Types.h.

Member Data Documentation

◆ currency

std::string TgBot::InputInvoiceMessageContent::currency { }

Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars.

Definition at line 6148 of file Types.h.

◆ description

std::string TgBot::InputInvoiceMessageContent::description { }

Product description, 1-255 characters.

Definition at line 6130 of file Types.h.

◆ isFlexible

std::optional<bool> TgBot::InputInvoiceMessageContent::isFlexible { }

Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.

Definition at line 6242 of file Types.h.

◆ maxTipAmount

std::optional<std::int32_t> TgBot::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. Not supported for payments in Telegram Stars.

Definition at line 6164 of file Types.h.

◆ needEmail

std::optional<bool> TgBot::InputInvoiceMessageContent::needEmail { }

Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.

Definition at line 6218 of file Types.h.

◆ needName

std::optional<bool> TgBot::InputInvoiceMessageContent::needName { }

Optional. Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.

Definition at line 6206 of file Types.h.

◆ needPhoneNumber

std::optional<bool> TgBot::InputInvoiceMessageContent::needPhoneNumber { }

Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.

Definition at line 6212 of file Types.h.

◆ needShippingAddress

std::optional<bool> TgBot::InputInvoiceMessageContent::needShippingAddress { }

Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.

Definition at line 6224 of file Types.h.

◆ payload

std::string TgBot::InputInvoiceMessageContent::payload { }

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

Definition at line 6136 of file Types.h.

◆ photoHeight

std::optional<std::int32_t> TgBot::InputInvoiceMessageContent::photoHeight { }

Optional. Photo height.

Definition at line 6200 of file Types.h.

◆ photoSize

std::optional<std::int32_t> TgBot::InputInvoiceMessageContent::photoSize { }

Optional. Photo size in bytes.

Definition at line 6190 of file Types.h.

◆ photoUrl

std::optional<std::string> TgBot::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 6185 of file Types.h.

◆ photoWidth

std::optional<std::int32_t> TgBot::InputInvoiceMessageContent::photoWidth { }

Optional. Photo width.

Definition at line 6195 of file Types.h.

◆ prices

std::vector<std::shared_ptr<LabeledPrice> > TgBot::InputInvoiceMessageContent::prices { }

Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars.

Definition at line 6155 of file Types.h.

◆ providerData

std::optional<std::string> TgBot::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 6179 of file Types.h.

◆ providerToken

std::optional<std::string> TgBot::InputInvoiceMessageContent::providerToken { }

Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.

Definition at line 6142 of file Types.h.

◆ sendEmailToProvider

std::optional<bool> TgBot::InputInvoiceMessageContent::sendEmailToProvider { }

Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.

Definition at line 6236 of file Types.h.

◆ sendPhoneNumberToProvider

std::optional<bool> TgBot::InputInvoiceMessageContent::sendPhoneNumberToProvider { }

Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.

Definition at line 6230 of file Types.h.

◆ suggestedTipAmounts

std::optional<std::vector<std::int32_t> > TgBot::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 max_tip_amount.

Definition at line 6172 of file Types.h.

◆ title

std::string TgBot::InputInvoiceMessageContent::title { }

Product name, 1-32 characters.

Definition at line 6125 of file Types.h.


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