1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-29 13:38:43 +00:00

fix error with deserialization of passport data

This commit is contained in:
InsanusMokrassar 2021-01-17 16:11:38 +06:00
parent 6b414d64b0
commit c1ab9da4c4
7 changed files with 13 additions and 13 deletions

View File

@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.WithEmail
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@Serializable(EncryptedElementSerializer::class) @Serializable
data class Email( data class Email(
@SerialName(emailField) @SerialName(emailField)
override val email: String, override val email: String,

View File

@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.WithData
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@Serializable(EncryptedElementSerializer::class) @Serializable
data class EncryptedAddress( data class EncryptedAddress(
@SerialName(dataField) @SerialName(dataField)
override val data: EncryptedData, override val data: EncryptedData,

View File

@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.WithData
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@Serializable(EncryptedElementSerializer::class) @Serializable
data class EncryptedPersonalDetails( data class EncryptedPersonalDetails(
@SerialName(dataField) @SerialName(dataField)
@Serializable(Base64StringSerializer::class) @Serializable(Base64StringSerializer::class)

View File

@ -10,7 +10,7 @@ import kotlinx.serialization.Serializable
@Serializable(EncryptedElementSerializer::class) @Serializable(EncryptedElementSerializer::class)
sealed class Passport : WithData, WithFrontSide, WithSelfie, Translatable sealed class Passport : WithData, WithFrontSide, WithSelfie, Translatable
@Serializable(EncryptedElementSerializer::class) @Serializable
data class CommonPassport( data class CommonPassport(
@SerialName(dataField) @SerialName(dataField)
override val data: EncryptedData, override val data: EncryptedData,
@ -24,7 +24,7 @@ data class CommonPassport(
@Serializable(Base64StringSerializer::class) @Serializable(Base64StringSerializer::class)
override val hash: String override val hash: String
) : Passport() ) : Passport()
@Serializable(EncryptedElementSerializer::class) @Serializable
data class InternalPassport( data class InternalPassport(
@SerialName(dataField) @SerialName(dataField)
override val data: EncryptedData, override val data: EncryptedData,

View File

@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.phoneNumberField
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@Serializable(EncryptedElementSerializer::class) @Serializable
data class PhoneNumber( data class PhoneNumber(
@SerialName(phoneNumberField) @SerialName(phoneNumberField)
override val phoneNumber: String, override val phoneNumber: String,

View File

@ -10,7 +10,7 @@ import kotlinx.serialization.Serializable
@Serializable(EncryptedElementSerializer::class) @Serializable(EncryptedElementSerializer::class)
sealed class TranslatableFilesCollection : Translatable, FilesCollection sealed class TranslatableFilesCollection : Translatable, FilesCollection
@Serializable(EncryptedElementSerializer::class) @Serializable
data class UtilityBill( data class UtilityBill(
@SerialName(filesField) @SerialName(filesField)
override val files: List<PassportFile>, override val files: List<PassportFile>,
@ -20,7 +20,7 @@ data class UtilityBill(
@Serializable(Base64StringSerializer::class) @Serializable(Base64StringSerializer::class)
override val hash: String override val hash: String
) : TranslatableFilesCollection() ) : TranslatableFilesCollection()
@Serializable(EncryptedElementSerializer::class) @Serializable
data class BankStatement( data class BankStatement(
@SerialName(filesField) @SerialName(filesField)
override val files: List<PassportFile>, override val files: List<PassportFile>,
@ -30,7 +30,7 @@ data class BankStatement(
@Serializable(Base64StringSerializer::class) @Serializable(Base64StringSerializer::class)
override val hash: String override val hash: String
) : TranslatableFilesCollection() ) : TranslatableFilesCollection()
@Serializable(EncryptedElementSerializer::class) @Serializable
data class RentalAgreement( data class RentalAgreement(
@SerialName(filesField) @SerialName(filesField)
override val files: List<PassportFile>, override val files: List<PassportFile>,
@ -40,7 +40,7 @@ data class RentalAgreement(
@Serializable(Base64StringSerializer::class) @Serializable(Base64StringSerializer::class)
override val hash: String override val hash: String
) : TranslatableFilesCollection() ) : TranslatableFilesCollection()
@Serializable(EncryptedElementSerializer::class) @Serializable
data class PassportRegistration( data class PassportRegistration(
@SerialName(filesField) @SerialName(filesField)
override val files: List<PassportFile>, override val files: List<PassportFile>,
@ -50,7 +50,7 @@ data class PassportRegistration(
@Serializable(Base64StringSerializer::class) @Serializable(Base64StringSerializer::class)
override val hash: String override val hash: String
) : TranslatableFilesCollection() ) : TranslatableFilesCollection()
@Serializable(EncryptedElementSerializer::class) @Serializable
data class TemporaryRegistration( data class TemporaryRegistration(
@SerialName(filesField) @SerialName(filesField)
override val files: List<PassportFile>, override val files: List<PassportFile>,

View File

@ -10,7 +10,7 @@ import kotlinx.serialization.Serializable
@Serializable(EncryptedElementSerializer::class) @Serializable(EncryptedElementSerializer::class)
sealed class TranslatableIDDocument : WithData, WithFrontSide, WithReverseSide, WithSelfie, Translatable sealed class TranslatableIDDocument : WithData, WithFrontSide, WithReverseSide, WithSelfie, Translatable
@Serializable(EncryptedElementSerializer::class) @Serializable
data class DriverLicense( data class DriverLicense(
@SerialName(dataField) @SerialName(dataField)
override val data: EncryptedData, override val data: EncryptedData,
@ -27,7 +27,7 @@ data class DriverLicense(
override val hash: String override val hash: String
) : TranslatableIDDocument() ) : TranslatableIDDocument()
@Serializable(EncryptedElementSerializer::class) @Serializable
data class IdentityCard( data class IdentityCard(
@SerialName(dataField) @SerialName(dataField)
override val data: EncryptedData, override val data: EncryptedData,