From fb3b8a741592c329586b4d06a0b85a301c9e1796 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 11 Nov 2024 13:03:46 +0600 Subject: [PATCH] fix of #917 --- .../dev/inmo/tgbotapi/types/payments/OrderInfo.kt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/payments/OrderInfo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/payments/OrderInfo.kt index 274449cc45..b7a03d3edb 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/payments/OrderInfo.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/payments/OrderInfo.kt @@ -4,14 +4,21 @@ import dev.inmo.tgbotapi.types.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable +/** + * All the field of this class are nullable due to specific of [OrderInfo](https://core.telegram.org/bots/api#orderinfo) + * from official bots api + * + * @see dev.inmo.tgbotapi.abstracts.CommonSendInvoiceData + * @see dev.inmo.tgbotapi.requests.send.payments.SendInvoice + */ @Serializable data class OrderInfo( @SerialName(nameField) - val name: String, + val name: String?, @SerialName(phoneNumberField) - val phoneNumber: String, + val phoneNumber: String?, @SerialName(emailField) - val email: String, + val email: String?, @SerialName(shippingAddressField) - val shippingAddress: ShippingAddress + val shippingAddress: ShippingAddress? )