SendInvoice

@Serializable
data class SendInvoice(val chatId: ChatId, val title: String, val description: String, val payload: String, val providerToken: String, val currency: Currency, val prices: List<LabeledPrice>, val maxTipAmount: Int? = null, val suggestedTipAmounts: List<Int>? = null, val startParameter: StartParameter? = null, val providerData: String? = null, val requireName: Boolean = false, val requirePhoneNumber: Boolean = false, val requireEmail: Boolean = false, val requireShippingAddress: Boolean = false, val shouldSendPhoneNumberToProvider: Boolean = false, val shouldSendEmailToProvider: Boolean = false, val priceDependOnShipAddress: Boolean = false, val threadId: MessageThreadId? = null, val disableNotification: Boolean = false, val protectContent: Boolean = false, val replyToMessageId: MessageId? = null, val allowSendingWithoutReply: Boolean? = null, val replyMarkup: InlineKeyboardMarkup? = null) : CommonSendInvoiceData, ChatRequest, DisableNotification, ReplyMessageId, WithReplyMarkup, SendMessageRequest<ContentMessage<InvoiceContent>>

Parameters

providerData
  • JSON-ENCODED FIELD

Constructors

Link copied to clipboard
fun SendInvoice(chatId: ChatId, title: String, description: String, payload: String, providerToken: String, currency: Currency, prices: List<LabeledPrice>, maxTipAmount: Int? = null, suggestedTipAmounts: List<Int>? = null, startParameter: StartParameter? = null, providerData: String? = null, requireName: Boolean = false, requirePhoneNumber: Boolean = false, requireEmail: Boolean = false, requireShippingAddress: Boolean = false, shouldSendPhoneNumberToProvider: Boolean = false, shouldSendEmailToProvider: Boolean = false, priceDependOnShipAddress: Boolean = false, threadId: MessageThreadId? = null, disableNotification: Boolean = false, protectContent: Boolean = false, replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: InlineKeyboardMarkup? = null)

Functions

Link copied to clipboard
open override fun method(): String
Link copied to clipboard
open override fun setPhoto(photoUrl: String, photoSize: Long?, photoWidth: Int?, photoHeight: Int?)
Link copied to clipboard
open override fun unsetPhoto()

Properties

Link copied to clipboard
open override val allowSendingWithoutReply: Boolean? = null
Link copied to clipboard
open override val chatId: ChatId
Link copied to clipboard
open override val currency: Currency
Link copied to clipboard
open override val description: String
Link copied to clipboard
open override val disableNotification: Boolean = false
Link copied to clipboard
open override val maxTipAmount: Int? = null
Link copied to clipboard
open override val payload: String
Link copied to clipboard
open override var photoHeight: Int? = null
Link copied to clipboard
open override var photoSize: Long? = null
Link copied to clipboard
open override var photoUrl: String? = null
Link copied to clipboard
open override var photoWidth: Int? = null
Link copied to clipboard
open override val priceDependOnShipAddress: Boolean = false
Link copied to clipboard
@Serializable(with = LabeledPricesSerializer::class)
open override val prices: List<LabeledPrice>
Link copied to clipboard
open override val protectContent: Boolean = false
Link copied to clipboard
open override val providerData: String? = null
Link copied to clipboard
open override val providerToken: String
Link copied to clipboard
open override val replyMarkup: InlineKeyboardMarkup? = null
Link copied to clipboard
open override val replyToMessageId: MessageId? = null
Link copied to clipboard
open override val requestSerializer: SerializationStrategy<*>
Link copied to clipboard
open override val requireEmail: Boolean = false
Link copied to clipboard
open override val requireName: Boolean = false
Link copied to clipboard
open override val requirePhoneNumber: Boolean = false
Link copied to clipboard
open override val requireShippingAddress: Boolean = false
Link copied to clipboard
open override val resultDeserializer: DeserializationStrategy<ContentMessage<InvoiceContent>>
Link copied to clipboard
open override val shouldSendEmailToProvider: Boolean = false
Link copied to clipboard
open override val shouldSendPhoneNumberToProvider: Boolean = false
Link copied to clipboard
Link copied to clipboard
open override val suggestedTipAmounts: List<Int>? = null
Link copied to clipboard
open override val threadId: MessageThreadId? = null
Link copied to clipboard
open override val title: String

Extensions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> CommonSendInvoiceData.ifSendInvoice(block: (SendInvoice) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard