1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-21 15:53:47 +00:00

Bot API 7.7

implemented minor changes regarding refunded payments
This commit is contained in:
bpavuk 2024-07-07 17:45:59 +03:00
parent fe518a0d8f
commit 6edf466220
2 changed files with 25 additions and 0 deletions

View File

@ -30,6 +30,7 @@ import dev.inmo.tgbotapi.types.message.content.MessageContent
import dev.inmo.tgbotapi.types.message.payments.*
import dev.inmo.tgbotapi.types.passport.PassportData
import dev.inmo.tgbotapi.types.payments.Invoice
import dev.inmo.tgbotapi.types.payments.RefundedPayment
import dev.inmo.tgbotapi.types.payments.SuccessfulPayment
import dev.inmo.tgbotapi.types.polls.Poll
import dev.inmo.tgbotapi.types.request.ChatShared
@ -98,6 +99,7 @@ internal data class RawMessage(
private val invoice: Invoice? = null,
private val dice: Dice? = null,
private val successful_payment: SuccessfulPayment? = null,
private val refunded_payment: RefundedPayment? = null,
private val giveaway: Giveaway? = null,
private val giveaway_winners: GiveawayResults? = null,
private val sender_boost_count: Int? = null,

View File

@ -0,0 +1,23 @@
package dev.inmo.tgbotapi.types.payments
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.payments.abstracts.Amounted
import dev.inmo.tgbotapi.types.payments.abstracts.Currencied
import dev.inmo.tgbotapi.types.payments.abstracts.Currency
import dev.inmo.tgbotapi.types.payments.abstracts.TelegramPaymentChargeId
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class RefundedPayment(
@SerialName(currencyField)
override val currency: Currency,
@SerialName(totalAmountField)
override val amount: Long,
@SerialName(invoicePayloadField)
val invoicePayload: String,
@SerialName(telegramPaymentChargeIdField)
val telegramPaymentChargeId: TelegramPaymentChargeId,
@SerialName(providerPaymentChargeIdField)
val providerPaymentChargeId: String
): Amounted, Currencied