From 0e3a2ac22063da84ab2201c0773dbe3224bba4f5 Mon Sep 17 00:00:00 2001 From: dvacca-onfido <134616519+dvacca-onfido@users.noreply.github.com> Date: Mon, 13 Jul 2026 09:15:08 +0000 Subject: [PATCH] Upgrade after onfido-openapi-spec change ad80494 --- .release.json | 4 +- lib/Api/DefaultApi.php | 60 +-- lib/Model/BiometricToken.php | 78 +++- ...esponse.php => BiometricTokenResponse.php} | 8 +- ...nsList.php => BiometricTokensResponse.php} | 8 +- .../InvalidatedBiometricTokenResponse.php | 412 ++++++++++++++++++ .../InvalidatedBiometricTokenSummary.php | 41 +- ...=> InvalidatedBiometricTokensResponse.php} | 8 +- lib/Model/UpdatedBiometricTokenResponse.php | 412 ++++++++++++++++++ 9 files changed, 947 insertions(+), 84 deletions(-) rename lib/Model/{UpdateBiometricToken200Response.php => BiometricTokenResponse.php} (97%) rename lib/Model/{BiometricTokensList.php => BiometricTokensResponse.php} (97%) create mode 100644 lib/Model/InvalidatedBiometricTokenResponse.php rename lib/Model/{InvalidatedBiometricTokensSummary.php => InvalidatedBiometricTokensResponse.php} (97%) create mode 100644 lib/Model/UpdatedBiometricTokenResponse.php diff --git a/.release.json b/.release.json index 4c24b84..2261420 100644 --- a/.release.json +++ b/.release.json @@ -1,8 +1,8 @@ { "source": { "repo_url": "https://github.com/onfido/onfido-openapi-spec", - "short_sha": "d9d749d", - "long_sha": "d9d749dfbd3873524400efe236f7d398bb9e948e", + "short_sha": "ad80494", + "long_sha": "ad8049477731f42993257dd8cbbbd4a193f06c92", "version": "v6.2.0" }, "release": "v10.3.0" diff --git a/lib/Api/DefaultApi.php b/lib/Api/DefaultApi.php index cd9a1f0..b3c3d16 100644 --- a/lib/Api/DefaultApi.php +++ b/lib/Api/DefaultApi.php @@ -9716,7 +9716,7 @@ public function findApplicantConsentsRequest($applicant_id, string $contentType * * @throws \Onfido\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \Onfido\Model\BiometricToken|\Onfido\Model\Error + * @return \Onfido\Model\BiometricTokenResponse|\Onfido\Model\Error */ public function findBiometricToken($user_id, $token_uuid, string $contentType = self::contentTypes['findBiometricToken'][0]) { @@ -9735,7 +9735,7 @@ public function findBiometricToken($user_id, $token_uuid, string $contentType = * * @throws \Onfido\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \Onfido\Model\BiometricToken|\Onfido\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \Onfido\Model\BiometricTokenResponse|\Onfido\Model\Error, HTTP status code, HTTP response headers (array of strings) */ public function findBiometricTokenWithHttpInfo($user_id, $token_uuid, string $contentType = self::contentTypes['findBiometricToken'][0]) { @@ -9767,7 +9767,7 @@ public function findBiometricTokenWithHttpInfo($user_id, $token_uuid, string $co switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\Onfido\Model\BiometricToken', + '\Onfido\Model\BiometricTokenResponse', $request, $response, ); @@ -9795,7 +9795,7 @@ public function findBiometricTokenWithHttpInfo($user_id, $token_uuid, string $co } return $this->handleResponseWithDataType( - '\Onfido\Model\BiometricToken', + '\Onfido\Model\BiometricTokenResponse', $request, $response, ); @@ -9804,7 +9804,7 @@ public function findBiometricTokenWithHttpInfo($user_id, $token_uuid, string $co case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Onfido\Model\BiometricToken', + '\Onfido\Model\BiometricTokenResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -9860,7 +9860,7 @@ function ($response) { */ public function findBiometricTokenAsyncWithHttpInfo($user_id, $token_uuid, string $contentType = self::contentTypes['findBiometricToken'][0]) { - $returnType = '\Onfido\Model\BiometricToken'; + $returnType = '\Onfido\Model\BiometricTokenResponse'; $request = $this->findBiometricTokenRequest($user_id, $token_uuid, $contentType); return $this->client @@ -14686,7 +14686,7 @@ public function generateSdkTokenRequest($sdk_token_builder, string $contentType * * @throws \Onfido\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \Onfido\Model\InvalidatedBiometricTokenSummary|\Onfido\Model\Error + * @return \Onfido\Model\InvalidatedBiometricTokenResponse|\Onfido\Model\Error */ public function invalidateBiometricToken($user_id, $token_uuid, string $contentType = self::contentTypes['invalidateBiometricToken'][0]) { @@ -14705,7 +14705,7 @@ public function invalidateBiometricToken($user_id, $token_uuid, string $contentT * * @throws \Onfido\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \Onfido\Model\InvalidatedBiometricTokenSummary|\Onfido\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \Onfido\Model\InvalidatedBiometricTokenResponse|\Onfido\Model\Error, HTTP status code, HTTP response headers (array of strings) */ public function invalidateBiometricTokenWithHttpInfo($user_id, $token_uuid, string $contentType = self::contentTypes['invalidateBiometricToken'][0]) { @@ -14737,7 +14737,7 @@ public function invalidateBiometricTokenWithHttpInfo($user_id, $token_uuid, stri switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\Onfido\Model\InvalidatedBiometricTokenSummary', + '\Onfido\Model\InvalidatedBiometricTokenResponse', $request, $response, ); @@ -14765,7 +14765,7 @@ public function invalidateBiometricTokenWithHttpInfo($user_id, $token_uuid, stri } return $this->handleResponseWithDataType( - '\Onfido\Model\InvalidatedBiometricTokenSummary', + '\Onfido\Model\InvalidatedBiometricTokenResponse', $request, $response, ); @@ -14774,7 +14774,7 @@ public function invalidateBiometricTokenWithHttpInfo($user_id, $token_uuid, stri case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Onfido\Model\InvalidatedBiometricTokenSummary', + '\Onfido\Model\InvalidatedBiometricTokenResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -14830,7 +14830,7 @@ function ($response) { */ public function invalidateBiometricTokenAsyncWithHttpInfo($user_id, $token_uuid, string $contentType = self::contentTypes['invalidateBiometricToken'][0]) { - $returnType = '\Onfido\Model\InvalidatedBiometricTokenSummary'; + $returnType = '\Onfido\Model\InvalidatedBiometricTokenResponse'; $request = $this->invalidateBiometricTokenRequest($user_id, $token_uuid, $contentType); return $this->client @@ -14996,7 +14996,7 @@ public function invalidateBiometricTokenRequest($user_id, $token_uuid, string $c * * @throws \Onfido\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \Onfido\Model\InvalidatedBiometricTokensSummary|\Onfido\Model\Error + * @return \Onfido\Model\InvalidatedBiometricTokensResponse|\Onfido\Model\Error */ public function invalidateBiometricTokens($user_id, string $contentType = self::contentTypes['invalidateBiometricTokens'][0]) { @@ -15014,7 +15014,7 @@ public function invalidateBiometricTokens($user_id, string $contentType = self:: * * @throws \Onfido\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \Onfido\Model\InvalidatedBiometricTokensSummary|\Onfido\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \Onfido\Model\InvalidatedBiometricTokensResponse|\Onfido\Model\Error, HTTP status code, HTTP response headers (array of strings) */ public function invalidateBiometricTokensWithHttpInfo($user_id, string $contentType = self::contentTypes['invalidateBiometricTokens'][0]) { @@ -15046,7 +15046,7 @@ public function invalidateBiometricTokensWithHttpInfo($user_id, string $contentT switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\Onfido\Model\InvalidatedBiometricTokensSummary', + '\Onfido\Model\InvalidatedBiometricTokensResponse', $request, $response, ); @@ -15074,7 +15074,7 @@ public function invalidateBiometricTokensWithHttpInfo($user_id, string $contentT } return $this->handleResponseWithDataType( - '\Onfido\Model\InvalidatedBiometricTokensSummary', + '\Onfido\Model\InvalidatedBiometricTokensResponse', $request, $response, ); @@ -15083,7 +15083,7 @@ public function invalidateBiometricTokensWithHttpInfo($user_id, string $contentT case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Onfido\Model\InvalidatedBiometricTokensSummary', + '\Onfido\Model\InvalidatedBiometricTokensResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -15137,7 +15137,7 @@ function ($response) { */ public function invalidateBiometricTokensAsyncWithHttpInfo($user_id, string $contentType = self::contentTypes['invalidateBiometricTokens'][0]) { - $returnType = '\Onfido\Model\InvalidatedBiometricTokensSummary'; + $returnType = '\Onfido\Model\InvalidatedBiometricTokensResponse'; $request = $this->invalidateBiometricTokensRequest($user_id, $contentType); return $this->client @@ -15603,7 +15603,7 @@ public function listApplicantsRequest($page = 1, $per_page = 20, $include_delete * * @throws \Onfido\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \Onfido\Model\BiometricTokensList|\Onfido\Model\Error + * @return \Onfido\Model\BiometricTokensResponse|\Onfido\Model\Error */ public function listBiometricTokens($user_id, string $contentType = self::contentTypes['listBiometricTokens'][0]) { @@ -15621,7 +15621,7 @@ public function listBiometricTokens($user_id, string $contentType = self::conten * * @throws \Onfido\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \Onfido\Model\BiometricTokensList|\Onfido\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \Onfido\Model\BiometricTokensResponse|\Onfido\Model\Error, HTTP status code, HTTP response headers (array of strings) */ public function listBiometricTokensWithHttpInfo($user_id, string $contentType = self::contentTypes['listBiometricTokens'][0]) { @@ -15653,7 +15653,7 @@ public function listBiometricTokensWithHttpInfo($user_id, string $contentType = switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\Onfido\Model\BiometricTokensList', + '\Onfido\Model\BiometricTokensResponse', $request, $response, ); @@ -15681,7 +15681,7 @@ public function listBiometricTokensWithHttpInfo($user_id, string $contentType = } return $this->handleResponseWithDataType( - '\Onfido\Model\BiometricTokensList', + '\Onfido\Model\BiometricTokensResponse', $request, $response, ); @@ -15690,7 +15690,7 @@ public function listBiometricTokensWithHttpInfo($user_id, string $contentType = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Onfido\Model\BiometricTokensList', + '\Onfido\Model\BiometricTokensResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -15744,7 +15744,7 @@ function ($response) { */ public function listBiometricTokensAsyncWithHttpInfo($user_id, string $contentType = self::contentTypes['listBiometricTokens'][0]) { - $returnType = '\Onfido\Model\BiometricTokensList'; + $returnType = '\Onfido\Model\BiometricTokensResponse'; $request = $this->listBiometricTokensRequest($user_id, $contentType); return $this->client @@ -22146,7 +22146,7 @@ public function updateApplicantRequest($applicant_id, $applicant_updater, string * * @throws \Onfido\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \Onfido\Model\UpdateBiometricToken200Response|\Onfido\Model\Error + * @return \Onfido\Model\UpdatedBiometricTokenResponse|\Onfido\Model\Error */ public function updateBiometricToken($user_id, $token_uuid, $biometric_token_updater, string $contentType = self::contentTypes['updateBiometricToken'][0]) { @@ -22166,7 +22166,7 @@ public function updateBiometricToken($user_id, $token_uuid, $biometric_token_upd * * @throws \Onfido\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \Onfido\Model\UpdateBiometricToken200Response|\Onfido\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \Onfido\Model\UpdatedBiometricTokenResponse|\Onfido\Model\Error, HTTP status code, HTTP response headers (array of strings) */ public function updateBiometricTokenWithHttpInfo($user_id, $token_uuid, $biometric_token_updater, string $contentType = self::contentTypes['updateBiometricToken'][0]) { @@ -22198,7 +22198,7 @@ public function updateBiometricTokenWithHttpInfo($user_id, $token_uuid, $biometr switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\Onfido\Model\UpdateBiometricToken200Response', + '\Onfido\Model\UpdatedBiometricTokenResponse', $request, $response, ); @@ -22226,7 +22226,7 @@ public function updateBiometricTokenWithHttpInfo($user_id, $token_uuid, $biometr } return $this->handleResponseWithDataType( - '\Onfido\Model\UpdateBiometricToken200Response', + '\Onfido\Model\UpdatedBiometricTokenResponse', $request, $response, ); @@ -22235,7 +22235,7 @@ public function updateBiometricTokenWithHttpInfo($user_id, $token_uuid, $biometr case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Onfido\Model\UpdateBiometricToken200Response', + '\Onfido\Model\UpdatedBiometricTokenResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -22293,7 +22293,7 @@ function ($response) { */ public function updateBiometricTokenAsyncWithHttpInfo($user_id, $token_uuid, $biometric_token_updater, string $contentType = self::contentTypes['updateBiometricToken'][0]) { - $returnType = '\Onfido\Model\UpdateBiometricToken200Response'; + $returnType = '\Onfido\Model\UpdatedBiometricTokenResponse'; $request = $this->updateBiometricTokenRequest($user_id, $token_uuid, $biometric_token_updater, $contentType); return $this->client diff --git a/lib/Model/BiometricToken.php b/lib/Model/BiometricToken.php index b5e3325..bf1e23e 100644 --- a/lib/Model/BiometricToken.php +++ b/lib/Model/BiometricToken.php @@ -35,6 +35,7 @@ * BiometricToken Class Doc Comment * * @category Class + * @description Biometric token. * @package Onfido * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -49,7 +50,7 @@ class BiometricToken implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'Biometric_token'; + protected static $openAPIModelName = 'biometric_token'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +58,8 @@ class BiometricToken implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'biometric_token' => '\Onfido\Model\BiometricToken' + 'uuid' => 'string', + 'data' => '\Onfido\Model\BiometricTokenData' ]; /** @@ -68,7 +70,8 @@ class BiometricToken implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'biometric_token' => null + 'uuid' => 'uuid', + 'data' => null ]; /** @@ -77,7 +80,8 @@ class BiometricToken implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'biometric_token' => false + 'uuid' => false, + 'data' => false ]; /** @@ -166,7 +170,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'biometric_token' => 'biometric_token' + 'uuid' => 'uuid', + 'data' => 'data' ]; /** @@ -175,7 +180,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'biometric_token' => 'setBiometricToken' + 'uuid' => 'setUuid', + 'data' => 'setData' ]; /** @@ -184,7 +190,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'biometric_token' => 'getBiometricToken' + 'uuid' => 'getUuid', + 'data' => 'getData' ]; /** @@ -244,7 +251,8 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('biometric_token', $data ?? [], null); + $this->setIfExists('uuid', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); } /** @@ -274,8 +282,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['biometric_token'] === null) { - $invalidProperties[] = "'biometric_token' can't be null"; + if ($this->container['uuid'] === null) { + $invalidProperties[] = "'uuid' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; } return $invalidProperties; } @@ -293,28 +304,55 @@ public function valid() /** - * Gets biometric_token + * Gets uuid + * + * @return string + */ + public function getUuid() + { + return $this->container['uuid']; + } + + /** + * Sets uuid + * + * @param string $uuid The biometric token's unique identifier. + * + * @return self + */ + public function setUuid($uuid) + { + if (is_null($uuid)) { + throw new \InvalidArgumentException('non-nullable uuid cannot be null'); + } + $this->container['uuid'] = $uuid; + + return $this; + } + + /** + * Gets data * - * @return \Onfido\Model\BiometricToken + * @return \Onfido\Model\BiometricTokenData */ - public function getBiometricToken() + public function getData() { - return $this->container['biometric_token']; + return $this->container['data']; } /** - * Sets biometric_token + * Sets data * - * @param \Onfido\Model\BiometricToken $biometric_token biometric_token + * @param \Onfido\Model\BiometricTokenData $data data * * @return self */ - public function setBiometricToken($biometric_token) + public function setData($data) { - if (is_null($biometric_token)) { - throw new \InvalidArgumentException('non-nullable biometric_token cannot be null'); + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); } - $this->container['biometric_token'] = $biometric_token; + $this->container['data'] = $data; return $this; } diff --git a/lib/Model/UpdateBiometricToken200Response.php b/lib/Model/BiometricTokenResponse.php similarity index 97% rename from lib/Model/UpdateBiometricToken200Response.php rename to lib/Model/BiometricTokenResponse.php index d3c0f00..4f66e29 100644 --- a/lib/Model/UpdateBiometricToken200Response.php +++ b/lib/Model/BiometricTokenResponse.php @@ -1,6 +1,6 @@ */ -class UpdateBiometricToken200Response implements ModelInterface, ArrayAccess, \JsonSerializable +class BiometricTokenResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -49,7 +49,7 @@ class UpdateBiometricToken200Response implements ModelInterface, ArrayAccess, \J * * @var string */ - protected static $openAPIModelName = 'update_biometric_token_200_response'; + protected static $openAPIModelName = 'Biometric_token_response'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/lib/Model/BiometricTokensList.php b/lib/Model/BiometricTokensResponse.php similarity index 97% rename from lib/Model/BiometricTokensList.php rename to lib/Model/BiometricTokensResponse.php index 7d2c2d0..92e2676 100644 --- a/lib/Model/BiometricTokensList.php +++ b/lib/Model/BiometricTokensResponse.php @@ -1,6 +1,6 @@ */ -class BiometricTokensList implements ModelInterface, ArrayAccess, \JsonSerializable +class BiometricTokensResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -49,7 +49,7 @@ class BiometricTokensList implements ModelInterface, ArrayAccess, \JsonSerializa * * @var string */ - protected static $openAPIModelName = 'Biometric_tokens_list'; + protected static $openAPIModelName = 'Biometric_tokens_response'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/lib/Model/InvalidatedBiometricTokenResponse.php b/lib/Model/InvalidatedBiometricTokenResponse.php new file mode 100644 index 0000000..292349f --- /dev/null +++ b/lib/Model/InvalidatedBiometricTokenResponse.php @@ -0,0 +1,412 @@ + + */ +class InvalidatedBiometricTokenResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Invalidated_biometric_token_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'biometric_token' => '\Onfido\Model\InvalidatedBiometricTokenSummary' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'biometric_token' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'biometric_token' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'biometric_token' => 'biometric_token' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'biometric_token' => 'setBiometricToken' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'biometric_token' => 'getBiometricToken' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('biometric_token', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['biometric_token'] === null) { + $invalidProperties[] = "'biometric_token' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets biometric_token + * + * @return \Onfido\Model\InvalidatedBiometricTokenSummary + */ + public function getBiometricToken() + { + return $this->container['biometric_token']; + } + + /** + * Sets biometric_token + * + * @param \Onfido\Model\InvalidatedBiometricTokenSummary $biometric_token biometric_token + * + * @return self + */ + public function setBiometricToken($biometric_token) + { + if (is_null($biometric_token)) { + throw new \InvalidArgumentException('non-nullable biometric_token cannot be null'); + } + $this->container['biometric_token'] = $biometric_token; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/InvalidatedBiometricTokenSummary.php b/lib/Model/InvalidatedBiometricTokenSummary.php index 6cf7e04..25094d2 100644 --- a/lib/Model/InvalidatedBiometricTokenSummary.php +++ b/lib/Model/InvalidatedBiometricTokenSummary.php @@ -35,6 +35,7 @@ * InvalidatedBiometricTokenSummary Class Doc Comment * * @category Class + * @description Invalidated biometric tokens response payload. * @package Onfido * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -49,7 +50,7 @@ class InvalidatedBiometricTokenSummary implements ModelInterface, ArrayAccess, \ * * @var string */ - protected static $openAPIModelName = 'Invalidated_biometric_token_summary'; + protected static $openAPIModelName = 'invalidated_biometric_token_summary'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +58,7 @@ class InvalidatedBiometricTokenSummary implements ModelInterface, ArrayAccess, \ * @var string[] */ protected static $openAPITypes = [ - 'biometric_token' => '\Onfido\Model\InvalidatedBiometricTokenSummary' + 'deleted_items' => '\Onfido\Model\InvalidatedBiometricTokenSummaryDeletedItems' ]; /** @@ -68,7 +69,7 @@ class InvalidatedBiometricTokenSummary implements ModelInterface, ArrayAccess, \ * @psalm-var array */ protected static $openAPIFormats = [ - 'biometric_token' => null + 'deleted_items' => null ]; /** @@ -77,7 +78,7 @@ class InvalidatedBiometricTokenSummary implements ModelInterface, ArrayAccess, \ * @var boolean[] */ protected static array $openAPINullables = [ - 'biometric_token' => false + 'deleted_items' => false ]; /** @@ -166,7 +167,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'biometric_token' => 'biometric_token' + 'deleted_items' => 'deleted_items' ]; /** @@ -175,7 +176,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'biometric_token' => 'setBiometricToken' + 'deleted_items' => 'setDeletedItems' ]; /** @@ -184,7 +185,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'biometric_token' => 'getBiometricToken' + 'deleted_items' => 'getDeletedItems' ]; /** @@ -244,7 +245,7 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('biometric_token', $data ?? [], null); + $this->setIfExists('deleted_items', $data ?? [], null); } /** @@ -274,8 +275,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['biometric_token'] === null) { - $invalidProperties[] = "'biometric_token' can't be null"; + if ($this->container['deleted_items'] === null) { + $invalidProperties[] = "'deleted_items' can't be null"; } return $invalidProperties; } @@ -293,28 +294,28 @@ public function valid() /** - * Gets biometric_token + * Gets deleted_items * - * @return \Onfido\Model\InvalidatedBiometricTokenSummary + * @return \Onfido\Model\InvalidatedBiometricTokenSummaryDeletedItems */ - public function getBiometricToken() + public function getDeletedItems() { - return $this->container['biometric_token']; + return $this->container['deleted_items']; } /** - * Sets biometric_token + * Sets deleted_items * - * @param \Onfido\Model\InvalidatedBiometricTokenSummary $biometric_token biometric_token + * @param \Onfido\Model\InvalidatedBiometricTokenSummaryDeletedItems $deleted_items deleted_items * * @return self */ - public function setBiometricToken($biometric_token) + public function setDeletedItems($deleted_items) { - if (is_null($biometric_token)) { - throw new \InvalidArgumentException('non-nullable biometric_token cannot be null'); + if (is_null($deleted_items)) { + throw new \InvalidArgumentException('non-nullable deleted_items cannot be null'); } - $this->container['biometric_token'] = $biometric_token; + $this->container['deleted_items'] = $deleted_items; return $this; } diff --git a/lib/Model/InvalidatedBiometricTokensSummary.php b/lib/Model/InvalidatedBiometricTokensResponse.php similarity index 97% rename from lib/Model/InvalidatedBiometricTokensSummary.php rename to lib/Model/InvalidatedBiometricTokensResponse.php index bbbc791..edcc3a8 100644 --- a/lib/Model/InvalidatedBiometricTokensSummary.php +++ b/lib/Model/InvalidatedBiometricTokensResponse.php @@ -1,6 +1,6 @@ */ -class InvalidatedBiometricTokensSummary implements ModelInterface, ArrayAccess, \JsonSerializable +class InvalidatedBiometricTokensResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -49,7 +49,7 @@ class InvalidatedBiometricTokensSummary implements ModelInterface, ArrayAccess, * * @var string */ - protected static $openAPIModelName = 'Invalidated_biometric_tokens_summary'; + protected static $openAPIModelName = 'Invalidated_biometric_tokens_response'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/lib/Model/UpdatedBiometricTokenResponse.php b/lib/Model/UpdatedBiometricTokenResponse.php new file mode 100644 index 0000000..529b00c --- /dev/null +++ b/lib/Model/UpdatedBiometricTokenResponse.php @@ -0,0 +1,412 @@ + + */ +class UpdatedBiometricTokenResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Updated_biometric_token_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'biometric_token' => '\Onfido\Model\BiometricToken' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'biometric_token' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'biometric_token' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'biometric_token' => 'biometric_token' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'biometric_token' => 'setBiometricToken' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'biometric_token' => 'getBiometricToken' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('biometric_token', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['biometric_token'] === null) { + $invalidProperties[] = "'biometric_token' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets biometric_token + * + * @return \Onfido\Model\BiometricToken + */ + public function getBiometricToken() + { + return $this->container['biometric_token']; + } + + /** + * Sets biometric_token + * + * @param \Onfido\Model\BiometricToken $biometric_token biometric_token + * + * @return self + */ + public function setBiometricToken($biometric_token) + { + if (is_null($biometric_token)) { + throw new \InvalidArgumentException('non-nullable biometric_token cannot be null'); + } + $this->container['biometric_token'] = $biometric_token; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer|string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + +