Skip to content

Commit

Permalink
Merge pull request #64 from onfido/release-upgrade
Browse files Browse the repository at this point in the history
Refresh onfido-php after onfido-openapi-spec update (10f8380)
  • Loading branch information
dvacca-onfido authored Oct 22, 2024
2 parents 446b2c7 + 9a991c5 commit fbd0d03
Show file tree
Hide file tree
Showing 41 changed files with 1,888 additions and 993 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
release:
types:
- published
schedule:
- cron: "0 15 * * 0" # Every Sunday, 3 hours after midday

jobs:
integration-tests:
Expand Down
6 changes: 3 additions & 3 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": "08508b9",
"long_sha": "08508b9517238b3becb4265130633a418a8ee319",
"version": "v3.5.0"
"short_sha": "10f8380",
"long_sha": "10f83806efa080edbf022ac48d5eeac90fbceb0c",
"version": ""
},
"release": "v7.5.0"
}
10 changes: 5 additions & 5 deletions lib/Api/DefaultApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -20961,7 +20961,7 @@ public function updateWebhookRequest($webhook_id, $webhook_updater, string $cont
*
* Upload a document
*
* @param string $type The type of document (required)
* @param \Onfido\Model\DocumentTypes $type The type of document (required)
* @param string $applicant_id The ID of the applicant whose document is being uploaded. (required)
* @param \SplFileObject $file The file to be uploaded. (required)
* @param string $file_type The file type of the uploaded file (optional)
Expand All @@ -20986,7 +20986,7 @@ public function uploadDocument($type, $applicant_id, $file, $file_type = null, $
*
* Upload a document
*
* @param string $type The type of document (required)
* @param \Onfido\Model\DocumentTypes $type The type of document (required)
* @param string $applicant_id The ID of the applicant whose document is being uploaded. (required)
* @param \SplFileObject $file The file to be uploaded. (required)
* @param string $file_type The file type of the uploaded file (optional)
Expand Down Expand Up @@ -21152,7 +21152,7 @@ public function uploadDocumentWithHttpInfo($type, $applicant_id, $file, $file_ty
*
* Upload a document
*
* @param string $type The type of document (required)
* @param \Onfido\Model\DocumentTypes $type The type of document (required)
* @param string $applicant_id The ID of the applicant whose document is being uploaded. (required)
* @param \SplFileObject $file The file to be uploaded. (required)
* @param string $file_type The file type of the uploaded file (optional)
Expand Down Expand Up @@ -21180,7 +21180,7 @@ function ($response) {
*
* Upload a document
*
* @param string $type The type of document (required)
* @param \Onfido\Model\DocumentTypes $type The type of document (required)
* @param string $applicant_id The ID of the applicant whose document is being uploaded. (required)
* @param \SplFileObject $file The file to be uploaded. (required)
* @param string $file_type The file type of the uploaded file (optional)
Expand Down Expand Up @@ -21237,7 +21237,7 @@ function ($exception) {
/**
* Create request for operation 'uploadDocument'
*
* @param string $type The type of document (required)
* @param \Onfido\Model\DocumentTypes $type The type of document (required)
* @param string $applicant_id The ID of the applicant whose document is being uploaded. (required)
* @param \SplFileObject $file The file to be uploaded. (required)
* @param string $file_type The file type of the uploaded file (optional)
Expand Down
6 changes: 3 additions & 3 deletions lib/Model/ApplicantBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ApplicantBuilder implements ModelInterface, ArrayAccess, \JsonSerializable
'dob' => '\DateTime',
'id_numbers' => '\Onfido\Model\IdNumber[]',
'phone_number' => 'string',
'consents' => '\Onfido\Model\ConsentsBuilder',
'consents' => '\Onfido\Model\ApplicantConsentBuilder[]',
'address' => '\Onfido\Model\AddressBuilder',
'location' => '\Onfido\Model\LocationBuilder',
'first_name' => 'string',
Expand Down Expand Up @@ -470,7 +470,7 @@ public function setPhoneNumber($phone_number)
/**
* Gets consents
*
* @return \Onfido\Model\ConsentsBuilder|null
* @return \Onfido\Model\ApplicantConsentBuilder[]|null
*/
public function getConsents()
{
Expand All @@ -480,7 +480,7 @@ public function getConsents()
/**
* Sets consents
*
* @param \Onfido\Model\ConsentsBuilder|null $consents consents
* @param \Onfido\Model\ApplicantConsentBuilder[]|null $consents The applicant's consents
*
* @return self
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* ConsentItem
* ApplicantConsentBuilder
*
* PHP version 7.4
*
Expand Down Expand Up @@ -32,16 +32,15 @@
use \Onfido\ObjectSerializer;

/**
* ConsentItem Class Doc Comment
* ApplicantConsentBuilder Class Doc Comment
*
* @category Class
* @description The applicant&#39;s consents
* @package Onfido
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class ConsentItem implements ModelInterface, ArrayAccess, \JsonSerializable
class ApplicantConsentBuilder implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;

Expand All @@ -50,15 +49,15 @@ class ConsentItem implements ModelInterface, ArrayAccess, \JsonSerializable
*
* @var string
*/
protected static $openAPIModelName = 'Consent_item';
protected static $openAPIModelName = 'applicant_consent_builder';

/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'name' => 'string',
'name' => '\Onfido\Model\ApplicantConsentName',
'granted' => 'bool'
];

Expand Down Expand Up @@ -235,25 +234,6 @@ public function getModelName()
return self::$openAPIModelName;
}

public const NAME_PRIVACY_NOTICES_READ = 'privacy_notices_read';
public const NAME_SSN_VERIFICATION = 'ssn_verification';
public const NAME_PHONE_NUMBER_VERIFICATION = 'phone_number_verification';
public const NAME_UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api';

/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getNameAllowableValues()
{
return [
self::NAME_PRIVACY_NOTICES_READ,
self::NAME_SSN_VERIFICATION,
self::NAME_PHONE_NUMBER_VERIFICATION,
self::NAME_UNKNOWN_DEFAULT_OPEN_API,
];
}

/**
* Associative array for storing property values
Expand Down Expand Up @@ -304,15 +284,6 @@ public function listInvalidProperties()
if ($this->container['name'] === null) {
$invalidProperties[] = "'name' can't be null";
}
$allowedValues = $this->getNameAllowableValues();
if (!is_null($this->container['name']) && !in_array($this->container['name'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
"invalid value '%s' for 'name', must be one of '%s'",
$this->container['name'],
implode("', '", $allowedValues)
);
}

if ($this->container['granted'] === null) {
$invalidProperties[] = "'granted' can't be null";
}
Expand All @@ -334,7 +305,7 @@ public function valid()
/**
* Gets name
*
* @return string
* @return \Onfido\Model\ApplicantConsentName
*/
public function getName()
{
Expand All @@ -344,7 +315,7 @@ public function getName()
/**
* Sets name
*
* @param string $name name
* @param \Onfido\Model\ApplicantConsentName $name name
*
* @return self
*/
Expand All @@ -353,16 +324,6 @@ public function setName($name)
if (is_null($name)) {
throw new \InvalidArgumentException('non-nullable name cannot be null');
}
$allowedValues = $this->getNameAllowableValues();
if (!in_array($name, $allowedValues, true)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value '%s' for 'name', must be one of '%s'",
$name,
implode("', '", $allowedValues)
)
);
}
$this->container['name'] = $name;

return $this;
Expand Down
68 changes: 68 additions & 0 deletions lib/Model/ApplicantConsentName.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?php
/**
* ApplicantConsentName
*
* PHP version 7.4
*
* @category Class
* @package Onfido
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/

/**
* Onfido API v3.6
*
* The Onfido API (v3.6)
*
* The version of the OpenAPI document: v3.6
* Generated by: https://openapi-generator.tech
* Generator version: 7.6.0
*/

/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

namespace Onfido\Model;
use \Onfido\ObjectSerializer;

/**
* ApplicantConsentName Class Doc Comment
*
* @category Class
* @package Onfido
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class ApplicantConsentName
{
/**
* Possible values of this enum
*/
public const PRIVACY_NOTICES_READ = 'privacy_notices_read';

public const SSN_VERIFICATION = 'ssn_verification';

public const PHONE_NUMBER_VERIFICATION = 'phone_number_verification';

public const UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api';

/**
* Gets allowable values of the enum
* @return string[]
*/
public static function getAllowableEnumValues()
{
return [
self::PRIVACY_NOTICES_READ,
self::SSN_VERIFICATION,
self::PHONE_NUMBER_VERIFICATION,
self::UNKNOWN_DEFAULT_OPEN_API
];
}
}


6 changes: 3 additions & 3 deletions lib/Model/ApplicantRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ApplicantRequest implements ModelInterface, ArrayAccess, \JsonSerializable
* @var string[]
*/
protected static $openAPITypes = [
'consents' => '\Onfido\Model\ConsentsBuilder',
'consents' => '\Onfido\Model\ApplicantConsentBuilder[]',
'address' => '\Onfido\Model\AddressBuilder',
'location' => '\Onfido\Model\LocationBuilder'
];
Expand Down Expand Up @@ -306,7 +306,7 @@ public function valid()
/**
* Gets consents
*
* @return \Onfido\Model\ConsentsBuilder|null
* @return \Onfido\Model\ApplicantConsentBuilder[]|null
*/
public function getConsents()
{
Expand All @@ -316,7 +316,7 @@ public function getConsents()
/**
* Sets consents
*
* @param \Onfido\Model\ConsentsBuilder|null $consents consents
* @param \Onfido\Model\ApplicantConsentBuilder[]|null $consents The applicant's consents
*
* @return self
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/Model/ApplicantUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ApplicantUpdater implements ModelInterface, ArrayAccess, \JsonSerializable
'dob' => '\DateTime',
'id_numbers' => '\Onfido\Model\IdNumber[]',
'phone_number' => 'string',
'consents' => '\Onfido\Model\ConsentsBuilder',
'consents' => '\Onfido\Model\ApplicantConsentBuilder[]',
'address' => '\Onfido\Model\AddressBuilder',
'location' => '\Onfido\Model\LocationBuilder',
'first_name' => 'string',
Expand Down Expand Up @@ -464,7 +464,7 @@ public function setPhoneNumber($phone_number)
/**
* Gets consents
*
* @return \Onfido\Model\ConsentsBuilder|null
* @return \Onfido\Model\ApplicantConsentBuilder[]|null
*/
public function getConsents()
{
Expand All @@ -474,7 +474,7 @@ public function getConsents()
/**
* Sets consents
*
* @param \Onfido\Model\ConsentsBuilder|null $consents consents
* @param \Onfido\Model\ApplicantConsentBuilder[]|null $consents The applicant's consents
*
* @return self
*/
Expand Down
Loading

0 comments on commit fbd0d03

Please sign in to comment.