From 804431163e85cf447f084a264b35f7fc96f397bd Mon Sep 17 00:00:00 2001 From: dvacca-onfido <134616519+dvacca-onfido@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:11:24 +0000 Subject: [PATCH] Upgrade after onfido-openapi-spec change d180edd --- .release.json | 8 ++++---- README.md | 2 +- lib/onfido.rb | 2 +- lib/onfido/api_client.rb | 2 +- lib/onfido/models/document_properties.rb | 6 ++---- ...es_barcode_inner.rb => document_properties_barcode.rb} | 6 +++--- ...t_with_driver_verification_report_all_of_properties.rb | 6 ++---- lib/onfido/version.rb | 2 +- 8 files changed, 15 insertions(+), 19 deletions(-) rename lib/onfido/models/{document_properties_barcode_inner.rb => document_properties_barcode.rb} (97%) diff --git a/.release.json b/.release.json index f7538e4..e6a0583 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": "v4.0.0" + "release": "v4.1.0" } diff --git a/README.md b/README.md index 7307931..e20393e 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ This version uses Onfido API v3.6. Refer to our [API versioning guide](https://d ### Installation ```ruby -gem onfido, '~> 4.0.0' +gem onfido, '~> 4.1.0' ``` Configure with your API token, region and optional timeout (default value is 30): diff --git a/lib/onfido.rb b/lib/onfido.rb index 67ea190..6444ef9 100644 --- a/lib/onfido.rb +++ b/lib/onfido.rb @@ -92,7 +92,7 @@ require 'onfido/models/document_odp_reasons' require 'onfido/models/document_properties' require 'onfido/models/document_properties_address_lines' -require 'onfido/models/document_properties_barcode_inner' +require 'onfido/models/document_properties_barcode' require 'onfido/models/document_properties_document_classification' require 'onfido/models/document_properties_document_numbers_inner' require 'onfido/models/document_properties_driving_licence_information' diff --git a/lib/onfido/api_client.rb b/lib/onfido/api_client.rb index 8917277..5f4eaea 100644 --- a/lib/onfido/api_client.rb +++ b/lib/onfido/api_client.rb @@ -34,7 +34,7 @@ class ApiClient # @option config [Configuration] Configuration for initializing the object, default to Configuration.default def initialize(config = Configuration.default) @config = config - @user_agent = "onfido-ruby/4.0.0" + @user_agent = "onfido-ruby/4.1.0" @default_headers = { 'Content-Type' => 'application/json', 'User-Agent' => @user_agent diff --git a/lib/onfido/models/document_properties.rb b/lib/onfido/models/document_properties.rb index 4dec5d2..89cadf2 100644 --- a/lib/onfido/models/document_properties.rb +++ b/lib/onfido/models/document_properties.rb @@ -226,7 +226,7 @@ def self.openapi_types :'real_id_compliance' => :'Boolean', :'security_tier' => :'String', :'address_lines' => :'DocumentPropertiesAddressLines', - :'barcode' => :'Array', + :'barcode' => :'DocumentPropertiesBarcode', :'nfc' => :'DocumentPropertiesNfc', :'driving_licence_information' => :'DocumentPropertiesDrivingLicenceInformation', :'document_classification' => :'DocumentPropertiesDocumentClassification', @@ -418,9 +418,7 @@ def initialize(attributes = {}) end if attributes.key?(:'barcode') - if (value = attributes[:'barcode']).is_a?(Array) - self.barcode = value - end + self.barcode = attributes[:'barcode'] end if attributes.key?(:'nfc') diff --git a/lib/onfido/models/document_properties_barcode_inner.rb b/lib/onfido/models/document_properties_barcode.rb similarity index 97% rename from lib/onfido/models/document_properties_barcode_inner.rb rename to lib/onfido/models/document_properties_barcode.rb index fa9614a..8ae3be6 100644 --- a/lib/onfido/models/document_properties_barcode_inner.rb +++ b/lib/onfido/models/document_properties_barcode.rb @@ -14,7 +14,7 @@ require 'time' module Onfido - class DocumentPropertiesBarcodeInner + class DocumentPropertiesBarcode attr_accessor :first_name attr_accessor :middle_name @@ -114,13 +114,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::DocumentPropertiesBarcodeInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::DocumentPropertiesBarcode` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::DocumentPropertiesBarcodeInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::DocumentPropertiesBarcode`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb b/lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb index 4da1a50..b8eda61 100644 --- a/lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb +++ b/lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb @@ -249,7 +249,7 @@ def self.openapi_types :'real_id_compliance' => :'Boolean', :'security_tier' => :'String', :'address_lines' => :'DocumentPropertiesAddressLines', - :'barcode' => :'Array', + :'barcode' => :'DocumentPropertiesBarcode', :'nfc' => :'DocumentPropertiesNfc', :'driving_licence_information' => :'DocumentPropertiesDrivingLicenceInformation', :'document_classification' => :'DocumentPropertiesDocumentClassification', @@ -454,9 +454,7 @@ def initialize(attributes = {}) end if attributes.key?(:'barcode') - if (value = attributes[:'barcode']).is_a?(Array) - self.barcode = value - end + self.barcode = attributes[:'barcode'] end if attributes.key?(:'nfc') diff --git a/lib/onfido/version.rb b/lib/onfido/version.rb index be14852..d742dc4 100644 --- a/lib/onfido/version.rb +++ b/lib/onfido/version.rb @@ -11,5 +11,5 @@ =end module Onfido - VERSION = '4.0.0' + VERSION = '4.1.0' end