mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-05 08:09:21 +00:00
@@ -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
|
||||
@@ -99,6 +100,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,
|
||||
@@ -269,6 +271,7 @@ internal data class RawMessage(
|
||||
pinned_message != null -> PinnedMessage(pinned_message.asMessage)
|
||||
proximity_alert_triggered != null -> proximity_alert_triggered
|
||||
successful_payment != null -> SuccessfulPaymentEvent(successful_payment)
|
||||
refunded_payment != null -> RefundedPaymentEvent(refunded_payment)
|
||||
connected_website != null -> UserLoggedIn(connected_website)
|
||||
web_app_data != null -> web_app_data
|
||||
users_shared != null -> users_shared
|
||||
|
@@ -0,0 +1,9 @@
|
||||
package dev.inmo.tgbotapi.types.message.payments
|
||||
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent
|
||||
import dev.inmo.tgbotapi.types.message.payments.abstracts.PaymentInfo
|
||||
import dev.inmo.tgbotapi.types.payments.RefundedPayment
|
||||
|
||||
data class RefundedPaymentEvent(
|
||||
val payment: RefundedPayment
|
||||
) : PaymentInfo, CommonEvent
|
@@ -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? = null
|
||||
): Amounted, Currencied
|
Reference in New Issue
Block a user