eu.vendeli.tgbot.utils.builders.InvoiceData.kt Maven / Gradle / Ivy
package eu.vendeli.tgbot.utils.builders
import eu.vendeli.tgbot.types.internal.Currency
import eu.vendeli.tgbot.types.payment.LabeledPrice
class InvoiceData {
lateinit var title: String
lateinit var description: String
lateinit var payload: String
lateinit var providerToken: String
lateinit var currency: Currency
lateinit var prices: List
constructor()
constructor(
title: String,
description: String,
payload: String,
providerToken: String,
currency: Currency,
prices: List,
) {
this.title = title
this.description = description
this.payload = payload
this.providerToken = providerToken
this.currency = currency
this.prices = prices
}
internal fun checkIsAllFieldsPresent() {
require(
::title.isInitialized && ::description.isInitialized &&
::payload.isInitialized && ::providerToken.isInitialized &&
::currency.isInitialized && ::prices.isInitialized,
) {
"All fields must be initialized"
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy