@@ -25,8 +25,8 @@ use Longman\TelegramBot\Entities\Entity;
...
@@ -25,8 +25,8 @@ use Longman\TelegramBot\Entities\Entity;
* @method string getEmail() Optional. User's verified email address, available only for “email” type
* @method string getEmail() Optional. User's verified email address, available only for “email” type
* @method PassportFile getFrontSide() Optional. Encrypted file with the front side of the document, provided by the user. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
* @method PassportFile getFrontSide() Optional. Encrypted file with the front side of the document, provided by the user. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
* @method PassportFile getReverseSide() Optional. Encrypted file with the reverse side of the document, provided by the user. Available for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
* @method PassportFile getReverseSide() Optional. Encrypted file with the reverse side of the document, provided by the user. Available for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
* @method PassportFile getSelfie() Optional. Encrypted file with the selfie of the user holding a document, provided by the user;
* @method PassportFile getSelfie() Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
* available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
* @method string getHash() Base64-encoded element hash for using in PassportElementErrorUnspecified
**/
**/
classEncryptedPassportElementextendsEntity
classEncryptedPassportElementextendsEntity
{
{
...
@@ -40,11 +40,12 @@ class EncryptedPassportElement extends Entity
...
@@ -40,11 +40,12 @@ class EncryptedPassportElement extends Entity
'front_side'=>PassportFile::class,
'front_side'=>PassportFile::class,
'reverse_side'=>PassportFile::class,
'reverse_side'=>PassportFile::class,
'selfie'=>PassportFile::class,
'selfie'=>PassportFile::class,
'translation'=>PassportFile::class,
];
];
}
}
/**
/**
* Array with information about documents and other Telegram Passport elements that was shared with the bot
* Optional. Array of encrypted files with documents provided by the user, available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
*
*
* This method overrides the default getFiles method
* This method overrides the default getFiles method
* and returns a nice array of PassportFile objects.
* and returns a nice array of PassportFile objects.
...
@@ -57,4 +58,19 @@ class EncryptedPassportElement extends Entity
...
@@ -57,4 +58,19 @@ class EncryptedPassportElement extends Entity
returnempty($pretty_array)?null:$pretty_array;
returnempty($pretty_array)?null:$pretty_array;
}
}
/**
* Optional. Array of encrypted files with translated versions of documents provided by the user. Available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
*
* This method overrides the default getTranslation method
* and returns a nice array of PassportFile objects.
* @method string getSource() Error source, must be translation_file
* @method string getType() Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”
* @method string getSource() Error source, must be translation_files
* @method string getType() Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”
* @method string[] getFileHashes() List of base64-encoded file hashes