1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-28 13:08:45 +00:00

Bot API 7.6

added invoice payload field to TransactionPartner.User
This commit is contained in:
bpavuk 2024-07-08 22:46:26 +03:00
parent 9dd80be36d
commit 051922b4c2
No known key found for this signature in database
GPG Key ID: B501D26D9DEA9CFE

View File

@ -1,6 +1,8 @@
package dev.inmo.tgbotapi.types.payments.stars package dev.inmo.tgbotapi.types.payments.stars
import dev.inmo.tgbotapi.types.InvoicePayload
import dev.inmo.tgbotapi.types.chat.PreviewUser import dev.inmo.tgbotapi.types.chat.PreviewUser
import dev.inmo.tgbotapi.types.invoicePayloadField
import dev.inmo.tgbotapi.types.userField import dev.inmo.tgbotapi.types.userField
import dev.inmo.tgbotapi.types.withdrawalStateField import dev.inmo.tgbotapi.types.withdrawalStateField
import dev.inmo.tgbotapi.utils.decodeDataAndJson import dev.inmo.tgbotapi.utils.decodeDataAndJson
@ -35,7 +37,9 @@ sealed interface TransactionPartner {
@Serializable(TransactionPartner.Companion::class) @Serializable(TransactionPartner.Companion::class)
data class User( data class User(
@SerialName(userField) @SerialName(userField)
val user: PreviewUser val user: PreviewUser,
@SerialName(invoicePayloadField)
val invoicePayload: InvoicePayload? = null
) : TransactionPartner { ) : TransactionPartner {
override val type: String override val type: String
get() = Companion.type get() = Companion.type
@ -61,7 +65,9 @@ sealed interface TransactionPartner {
private data class Surrogate( private data class Surrogate(
val type: String, val type: String,
val withdrawal_state: RevenueWithdrawalState? = null, val withdrawal_state: RevenueWithdrawalState? = null,
val user: PreviewUser? = null val user: PreviewUser? = null,
@SerialName(invoicePayloadField)
val invoicePayload: InvoicePayload? = null
) )
override val descriptor: SerialDescriptor override val descriptor: SerialDescriptor