mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-23 00:57:13 +00:00
update invoices API
This commit is contained in:
parent
7118631213
commit
663d63b009
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
## 14.0.1
|
## 14.0.1
|
||||||
|
|
||||||
|
* In `core` and `api` modules related to invoices changed their APIs to suite current API
|
||||||
|
|
||||||
## 14.0.0
|
## 14.0.0
|
||||||
|
|
||||||
**Add support of [Telegram Bots API 7.4](https://core.telegram.org/bots/api-changelog#may-28-2024)**
|
**Add support of [Telegram Bots API 7.4](https://core.telegram.org/bots/api-changelog#may-28-2024)**
|
||||||
|
@ -82,7 +82,7 @@ suspend fun TelegramBot.sendInvoice(
|
|||||||
title: String,
|
title: String,
|
||||||
description: String,
|
description: String,
|
||||||
payload: String,
|
payload: String,
|
||||||
prices: List<LabeledPrice>,
|
price: LabeledPrice,
|
||||||
maxTipAmount: Int? = null,
|
maxTipAmount: Int? = null,
|
||||||
suggestedTipAmounts: List<Int>? = null,
|
suggestedTipAmounts: List<Int>? = null,
|
||||||
startParameter: StartParameter? = null,
|
startParameter: StartParameter? = null,
|
||||||
@ -101,7 +101,7 @@ suspend fun TelegramBot.sendInvoice(
|
|||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
SendInvoice(chatId, title, description, payload, null, Currency.XTR, prices, maxTipAmount, suggestedTipAmounts ?.sorted(), startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, threadId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
SendInvoice(chatId, title, description, payload, price, maxTipAmount, suggestedTipAmounts ?.sorted(), startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, threadId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -113,7 +113,7 @@ suspend fun TelegramBot.sendInvoice(
|
|||||||
title: String,
|
title: String,
|
||||||
description: String,
|
description: String,
|
||||||
payload: String,
|
payload: String,
|
||||||
prices: List<LabeledPrice>,
|
price: LabeledPrice,
|
||||||
maxTipAmount: Int? = null,
|
maxTipAmount: Int? = null,
|
||||||
suggestedTipAmounts: List<Int>? = null,
|
suggestedTipAmounts: List<Int>? = null,
|
||||||
startParameter: StartParameter? = null,
|
startParameter: StartParameter? = null,
|
||||||
@ -135,7 +135,7 @@ suspend fun TelegramBot.sendInvoice(
|
|||||||
title = title,
|
title = title,
|
||||||
description = description,
|
description = description,
|
||||||
payload = payload,
|
payload = payload,
|
||||||
prices = prices,
|
price = price,
|
||||||
maxTipAmount = maxTipAmount,
|
maxTipAmount = maxTipAmount,
|
||||||
suggestedTipAmounts = suggestedTipAmounts,
|
suggestedTipAmounts = suggestedTipAmounts,
|
||||||
startParameter = startParameter,
|
startParameter = startParameter,
|
||||||
|
@ -105,9 +105,7 @@ data class SendInvoice(
|
|||||||
title: String,
|
title: String,
|
||||||
description: String,
|
description: String,
|
||||||
payload: String,
|
payload: String,
|
||||||
prices: List<LabeledPrice>,
|
price: LabeledPrice,
|
||||||
maxTipAmount: Int? = null,
|
|
||||||
suggestedTipAmounts: List<Int>? = null,
|
|
||||||
providerData: String? = null,
|
providerData: String? = null,
|
||||||
requireName: Boolean = false,
|
requireName: Boolean = false,
|
||||||
requirePhoneNumber: Boolean = false,
|
requirePhoneNumber: Boolean = false,
|
||||||
@ -129,9 +127,7 @@ data class SendInvoice(
|
|||||||
payload = payload,
|
payload = payload,
|
||||||
providerToken = null,
|
providerToken = null,
|
||||||
currency = Currency.XTR,
|
currency = Currency.XTR,
|
||||||
prices = prices,
|
prices = listOf(price),
|
||||||
maxTipAmount = maxTipAmount,
|
|
||||||
suggestedTipAmounts = suggestedTipAmounts,
|
|
||||||
providerData = providerData,
|
providerData = providerData,
|
||||||
requireName = requireName,
|
requireName = requireName,
|
||||||
requirePhoneNumber = requirePhoneNumber,
|
requirePhoneNumber = requirePhoneNumber,
|
||||||
|
Loading…
Reference in New Issue
Block a user