Skip to content

Commit

Permalink
Merge pull request #67 from onfido/release-upgrade
Browse files Browse the repository at this point in the history
Refresh onfido-php after onfido-openapi-spec update (d180edd)
  • Loading branch information
dvacca-onfido authored Nov 8, 2024
2 parents ecf7f8b + 6925cf2 commit e7aa6e9
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .release.json
Original file line number Diff line number Diff line change
@@ -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"
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "onfido/onfido-php",
"version": "8.0.0",
"version": "8.1.0",
"description": "The Onfido API (v3.6)",
"keywords": [
"openapitools",
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions lib/Model/DocumentProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -1806,7 +1806,7 @@ public function setAddressLines($address_lines)
/**
* Gets barcode
*
* @return \Onfido\Model\DocumentPropertiesBarcodeInner[]|null
* @return \Onfido\Model\DocumentPropertiesBarcode|null
*/
public function getBarcode()
{
Expand All @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* DocumentPropertiesBarcodeInner
* DocumentPropertiesBarcode
*
* PHP version 7.4
*
Expand Down Expand Up @@ -32,15 +32,15 @@
use \Onfido\ObjectSerializer;

/**
* DocumentPropertiesBarcodeInner Class Doc Comment
* DocumentPropertiesBarcode Class Doc Comment
*
* @category Class
* @package Onfido
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class DocumentPropertiesBarcodeInner implements ModelInterface, ArrayAccess, \JsonSerializable
class DocumentPropertiesBarcode implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -1848,7 +1848,7 @@ public function setAddressLines($address_lines)
/**
* Gets barcode
*
* @return \Onfido\Model\DocumentPropertiesBarcodeInner[]|null
* @return \Onfido\Model\DocumentPropertiesBarcode|null
*/
public function getBarcode()
{
Expand All @@ -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
*/
Expand Down
25 changes: 25 additions & 0 deletions test/Resource/ReportSchemasTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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");
}
}

?>

0 comments on commit e7aa6e9

Please sign in to comment.