mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-06-03 00:15:27 +00:00
17 lines
479 B
Kotlin
17 lines
479 B
Kotlin
package dev.inmo.tgbotapi.webapps.invoice
|
|
|
|
external interface InvoiceClosedInfo {
|
|
val url: String
|
|
val status: String
|
|
}
|
|
|
|
val InvoiceClosedInfo.statusTyped
|
|
get() = when (status) {
|
|
InvoiceStatus.Paid.name -> InvoiceStatus.Paid
|
|
InvoiceStatus.Cancelled.name -> InvoiceStatus.Cancelled
|
|
InvoiceStatus.Failed.name -> InvoiceStatus.Failed
|
|
InvoiceStatus.Pending.name -> InvoiceStatus.Pending
|
|
else -> InvoiceStatus.Unknown(status)
|
|
}
|
|
|