diff --git a/.release.json b/.release.json index 0c6520c..42f4011 100644 --- a/.release.json +++ b/.release.json @@ -1,9 +1,9 @@ { "source": { "repo_url": "https://github.com/onfido/onfido-openapi-spec", - "short_sha": "2998dd3", - "long_sha": "2998dd3ad2db49a33e0ecf9b41c7cf873909ef0b", - "version": "v4.0.0" + "short_sha": "d180edd", + "long_sha": "d180eddd168dd95bf84bf7c8fe9f8c7e3c0c5494", + "version": "v4.1.0" }, - "release": "v8.0.0" + "release": "v8.1.0" } diff --git a/composer.json b/composer.json index 25d56a6..768d2b3 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "onfido/onfido-php", - "version": "8.0.0", + "version": "8.1.0", "description": "The Onfido API (v3.6)", "keywords": [ "openapitools", diff --git a/composer.lock b/composer.lock index 683275b..c4f526b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d463eafa1c472f70f435129b0cedf403", + "content-hash": "9cced8873e05d93554a29c54bf07e04c", "packages": [ { "name": "guzzlehttp/guzzle", diff --git a/lib/Configuration.php b/lib/Configuration.php index 5567e4f..ec12bd9 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -87,7 +87,7 @@ class Configuration * * @var string */ - protected $userAgent = 'onfido-php/8.0.0'; + protected $userAgent = 'onfido-php/8.1.0'; /** * Debug switch (default set to false) @@ -404,7 +404,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the OpenAPI document: v3.6' . PHP_EOL; - $report .= ' SDK Package Version: 8.0.0' . PHP_EOL; + $report .= ' SDK Package Version: 8.1.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/DocumentProperties.php b/lib/Model/DocumentProperties.php index bf33c47..1095a27 100644 --- a/lib/Model/DocumentProperties.php +++ b/lib/Model/DocumentProperties.php @@ -97,7 +97,7 @@ class DocumentProperties implements ModelInterface, ArrayAccess, \JsonSerializab 'real_id_compliance' => 'bool', 'security_tier' => 'string', 'address_lines' => '\Onfido\Model\DocumentPropertiesAddressLines', - 'barcode' => '\Onfido\Model\DocumentPropertiesBarcodeInner[]', + 'barcode' => '\Onfido\Model\DocumentPropertiesBarcode', 'nfc' => '\Onfido\Model\DocumentPropertiesNfc', 'driving_licence_information' => '\Onfido\Model\DocumentPropertiesDrivingLicenceInformation', 'document_classification' => '\Onfido\Model\DocumentPropertiesDocumentClassification', @@ -1806,7 +1806,7 @@ public function setAddressLines($address_lines) /** * Gets barcode * - * @return \Onfido\Model\DocumentPropertiesBarcodeInner[]|null + * @return \Onfido\Model\DocumentPropertiesBarcode|null */ public function getBarcode() { @@ -1816,7 +1816,7 @@ public function getBarcode() /** * Sets barcode * - * @param \Onfido\Model\DocumentPropertiesBarcodeInner[]|null $barcode barcode + * @param \Onfido\Model\DocumentPropertiesBarcode|null $barcode barcode * * @return self */ diff --git a/lib/Model/DocumentPropertiesBarcodeInner.php b/lib/Model/DocumentPropertiesBarcode.php similarity index 99% rename from lib/Model/DocumentPropertiesBarcodeInner.php rename to lib/Model/DocumentPropertiesBarcode.php index decdfeb..195f070 100644 --- a/lib/Model/DocumentPropertiesBarcodeInner.php +++ b/lib/Model/DocumentPropertiesBarcode.php @@ -1,6 +1,6 @@ */ -class DocumentPropertiesBarcodeInner implements ModelInterface, ArrayAccess, \JsonSerializable +class DocumentPropertiesBarcode implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -49,7 +49,7 @@ class DocumentPropertiesBarcodeInner implements ModelInterface, ArrayAccess, \Js * * @var string */ - protected static $openAPIModelName = 'document_properties_barcode_inner'; + protected static $openAPIModelName = 'document_properties_barcode'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/lib/Model/DocumentWithDriverVerificationReportAllOfProperties.php b/lib/Model/DocumentWithDriverVerificationReportAllOfProperties.php index a2ffb25..8512ae0 100644 --- a/lib/Model/DocumentWithDriverVerificationReportAllOfProperties.php +++ b/lib/Model/DocumentWithDriverVerificationReportAllOfProperties.php @@ -97,7 +97,7 @@ class DocumentWithDriverVerificationReportAllOfProperties implements ModelInterf 'real_id_compliance' => 'bool', 'security_tier' => 'string', 'address_lines' => '\Onfido\Model\DocumentPropertiesAddressLines', - 'barcode' => '\Onfido\Model\DocumentPropertiesBarcodeInner[]', + 'barcode' => '\Onfido\Model\DocumentPropertiesBarcode', 'nfc' => '\Onfido\Model\DocumentPropertiesNfc', 'driving_licence_information' => '\Onfido\Model\DocumentPropertiesDrivingLicenceInformation', 'document_classification' => '\Onfido\Model\DocumentPropertiesDocumentClassification', @@ -1848,7 +1848,7 @@ public function setAddressLines($address_lines) /** * Gets barcode * - * @return \Onfido\Model\DocumentPropertiesBarcodeInner[]|null + * @return \Onfido\Model\DocumentPropertiesBarcode|null */ public function getBarcode() { @@ -1858,7 +1858,7 @@ public function getBarcode() /** * Sets barcode * - * @param \Onfido\Model\DocumentPropertiesBarcodeInner[]|null $barcode barcode + * @param \Onfido\Model\DocumentPropertiesBarcode|null $barcode barcode * * @return self */ diff --git a/test/Resource/ReportSchemasTest.php b/test/Resource/ReportSchemasTest.php index a7273d4..122534c 100644 --- a/test/Resource/ReportSchemasTest.php +++ b/test/Resource/ReportSchemasTest.php @@ -5,6 +5,7 @@ use Onfido\Test\OnfidoTestCase as OnfidoTestCase; use Onfido\Model\DocumentReport as DocumentReport; use Onfido\Model\FacialSimilarityPhotoReport as FacialSimilarityPhotoReport; +use Onfido\Model\DocumentWithAddressInformationReport as DocumentWithAddressInformationReport; use Onfido\Model\ReportName as ReportName; use Onfido\Model\ReportStatus as ReportStatus; @@ -75,6 +76,30 @@ public function testSchemaOfFacialSimilarityReportIsValid(): void $this->assertSame($facialSimilarityReport->getBreakdown()->getVisualAuthenticity() ->getBreakdown()->getSpoofingDetection()->getProperties()->getScore(), 0.9512); } + + public function testSchemaOfDocumentWithAddressInformationReportIsValid(): void + { + $reportId = $this->createCheck( + null, + $this->applicantId, + $this->documentId, + [ReportName::DOCUMENT_WITH_ADDRESS_INFORMATION] + )->getReportIds()[0]; + + $report = $this->repeatRequestUntilStatusChanges( + $this->findReportFn, + [$reportId], + ReportStatus::COMPLETE + ); + + $this->assertInstanceOf( + DocumentWithAddressInformationReport::class, + $report + ); + + $this->assertSame($report->getName(), "document_with_address_information"); + $this->assertSame($report->getProperties()->getBarcode()->getDocumentType(), "driving_licence"); + } } ?> \ No newline at end of file