tgbotapi/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/answers/payments/AnswerPreCheckoutQuery.kt

24 lines
944 B
Kotlin
Raw Normal View History

package dev.inmo.tgbotapi.extensions.api.answers.payments
2020-02-15 09:33:04 +00:00
2020-10-04 11:06:30 +00:00
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.answers.payments.AnswerPreCheckoutQueryError
import dev.inmo.tgbotapi.requests.answers.payments.AnswerPreCheckoutQueryOk
import dev.inmo.tgbotapi.types.PreCheckoutQueryId
import dev.inmo.tgbotapi.types.payments.PreCheckoutQuery
2020-02-15 09:33:04 +00:00
suspend fun TelegramBot.answerPreCheckoutQueryOk(
2020-02-15 09:33:04 +00:00
id: PreCheckoutQueryId
) = execute(AnswerPreCheckoutQueryOk(id))
suspend fun TelegramBot.answerPreCheckoutQueryOk(
2020-02-15 09:33:04 +00:00
preCheckoutQuery: PreCheckoutQuery
) = answerPreCheckoutQueryOk(preCheckoutQuery.id)
suspend fun TelegramBot.answerPreCheckoutQueryError(
2020-02-15 09:33:04 +00:00
id: PreCheckoutQueryId,
error: String
) = execute(AnswerPreCheckoutQueryError(id, error))
suspend fun TelegramBot.answerPreCheckoutQueryError(
2020-02-15 09:33:04 +00:00
preCheckoutQuery: PreCheckoutQuery,
error: String
) = answerPreCheckoutQueryError(preCheckoutQuery.id, error)