|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types = 1); |
| 4 | + |
| 5 | +namespace unreal4u\TelegramAPI\Telegram\Types\Passport; |
| 6 | + |
| 7 | +use unreal4u\TelegramAPI\Abstracts\TelegramTypes; |
| 8 | +use unreal4u\TelegramAPI\Telegram\Types\Custom\PassportFileArray; |
| 9 | + |
| 10 | +/** |
| 11 | + * This object represents information about an order |
| 12 | + * |
| 13 | + * Objects defined as-is may 2017 |
| 14 | + * |
| 15 | + * @see https://core.telegram.org/bots/api#orderinfo |
| 16 | + */ |
| 17 | +class EncryptedPassportElement extends TelegramTypes |
| 18 | +{ |
| 19 | + /** |
| 20 | + * Element type. One of "personal_details", "passport", "driver_license", "identity_card", "internal_passport", |
| 21 | + * "address", "utility_bill", "bank_statement", "rental_agreement", "passport_registration", |
| 22 | + * "temporary_registration", "phone_number", "email". |
| 23 | + * @var string |
| 24 | + */ |
| 25 | + public $type = ''; |
| 26 | + |
| 27 | + /** |
| 28 | + * Optional. Base64-encoded encrypted Telegram Passport element data provided by the user, available for |
| 29 | + * "personal_details", "passport", "driver_license", "identity_card", "identity_passport" and "address" types. Can |
| 30 | + * be decrypted and verified using the accompanying EncryptedCredentials. |
| 31 | + * @var string |
| 32 | + */ |
| 33 | + public $data = ''; |
| 34 | + |
| 35 | + /** |
| 36 | + * Optional. User's verified phone number, available only for "phone_number" type |
| 37 | + * @var string |
| 38 | + */ |
| 39 | + public $phone_number = ''; |
| 40 | + |
| 41 | + /** |
| 42 | + * Optional. User's verified email address, available only for "email" type |
| 43 | + * @var string |
| 44 | + */ |
| 45 | + public $email = ''; |
| 46 | + |
| 47 | + /** |
| 48 | + * Optional. Array of encrypted files with documents provided by the user, available for "utility_bill", |
| 49 | + * "bank_statement", "rental_agreement", "passport_registration" and "temporary_registration" types. Files can be |
| 50 | + * decrypted and verified using the accompanying EncryptedCredentials. |
| 51 | + * @var PassportFileArray |
| 52 | + */ |
| 53 | + public $files; |
| 54 | + |
| 55 | + /** |
| 56 | + * Optional. Encrypted file with the front side of the document, provided by the user. Available for "passport", |
| 57 | + * "driver_license", "identity_card" and "internal_passport". The file can be decrypted and verified using the |
| 58 | + * accompanying EncryptedCredentials. |
| 59 | + * @var PassportFile |
| 60 | + */ |
| 61 | + public $front_side; |
| 62 | + |
| 63 | + /** |
| 64 | + * Optional. Encrypted file with the reverse side of the document, provided by the user. Available for |
| 65 | + * "driver_license" and "identity_card". The file can be decrypted and verified using the accompanying |
| 66 | + * EncryptedCredentials. |
| 67 | + * @var PassportFile |
| 68 | + */ |
| 69 | + public $reverse_side; |
| 70 | + |
| 71 | + /** |
| 72 | + * Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available for |
| 73 | + * "passport", "driver_license", "identity_card" and "internal_passport". The file can be decrypted and verified |
| 74 | + * using the accompanying EncryptedCredentials. |
| 75 | + * @var PassportFile |
| 76 | + */ |
| 77 | + public $selfie; |
| 78 | + |
| 79 | + public function getMandatoryFields(): array |
| 80 | + { |
| 81 | + return [ |
| 82 | + 'type', |
| 83 | + ]; |
| 84 | + } |
| 85 | +} |
0 commit comments