Skip to content

Commit

Permalink
Merge pull request #70 from onfido/release-upgrade
Browse files Browse the repository at this point in the history
Refresh onfido-ruby after onfido-openapi-spec update (8c793a1)
  • Loading branch information
dvacca-onfido authored Nov 27, 2024
2 parents 1b6a6f7 + dc97da7 commit f8de862
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 17 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": "c72181c",
"long_sha": "c72181cc5e450bf727fc5eae2639c58ba45831ac",
"version": "v4.2.0"
"short_sha": "8c793a1",
"long_sha": "8c793a1c8307dcd92fa657edb2a1e9b184c15278",
"version": "v4.3.0"
},
"release": "v4.2.0"
"release": "v4.3.0"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This version uses Onfido API v3.6. Refer to our [API versioning guide](https://d
### Installation

```ruby
gem onfido, '~> 4.2.0'
gem onfido, '~> 4.3.0'
```

Configure with your API token, region and optional timeout (default value is 30):
Expand Down
2 changes: 1 addition & 1 deletion lib/onfido.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
require 'onfido/models/document_properties_barcode_inner'
require 'onfido/models/document_properties_document_classification'
require 'onfido/models/document_properties_document_numbers_inner'
require 'onfido/models/document_properties_driving_licence_information'
Expand Down
2 changes: 1 addition & 1 deletion lib/onfido/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.0"
@user_agent = "onfido-ruby/4.3.0"
@default_headers = {
'Content-Type' => 'application/json',
'User-Agent' => @user_agent
Expand Down
6 changes: 4 additions & 2 deletions lib/onfido/models/document_properties.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def self.openapi_types
:'real_id_compliance' => :'Boolean',
:'security_tier' => :'String',
:'address_lines' => :'DocumentPropertiesAddressLines',
:'barcode' => :'DocumentPropertiesBarcode',
:'barcode' => :'Array<DocumentPropertiesBarcodeInner>',
:'nfc' => :'DocumentPropertiesNfc',
:'driving_licence_information' => :'DocumentPropertiesDrivingLicenceInformation',
:'document_classification' => :'DocumentPropertiesDocumentClassification',
Expand Down Expand Up @@ -418,7 +418,9 @@ def initialize(attributes = {})
end

if attributes.key?(:'barcode')
self.barcode = attributes[:'barcode']
if (value = attributes[:'barcode']).is_a?(Array)
self.barcode = value
end
end

if attributes.key?(:'nfc')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
require 'time'

module Onfido
class DocumentPropertiesBarcode
class DocumentPropertiesBarcodeInner
attr_accessor :first_name

attr_accessor :middle_name
Expand Down Expand Up @@ -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::DocumentPropertiesBarcode` initialize method"
fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::DocumentPropertiesBarcodeInner` 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::DocumentPropertiesBarcode`. 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::DocumentPropertiesBarcodeInner`. 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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def self.openapi_types
:'real_id_compliance' => :'Boolean',
:'security_tier' => :'String',
:'address_lines' => :'DocumentPropertiesAddressLines',
:'barcode' => :'DocumentPropertiesBarcode',
:'barcode' => :'Array<DocumentPropertiesBarcodeInner>',
:'nfc' => :'DocumentPropertiesNfc',
:'driving_licence_information' => :'DocumentPropertiesDrivingLicenceInformation',
:'document_classification' => :'DocumentPropertiesDocumentClassification',
Expand Down Expand Up @@ -454,7 +454,9 @@ def initialize(attributes = {})
end

if attributes.key?(:'barcode')
self.barcode = attributes[:'barcode']
if (value = attributes[:'barcode']).is_a?(Array)
self.barcode = value
end
end

if attributes.key?(:'nfc')
Expand Down
2 changes: 1 addition & 1 deletion lib/onfido/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
=end

module Onfido
VERSION = '4.2.0'
VERSION = '4.3.0'
end
4 changes: 2 additions & 2 deletions spec/integrations/report_schema_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
) { onfido_api.find_report(report_id) }

expect(report).to be_an_instance_of Onfido::DocumentWithAddressInformationReport
expect(report.properties.barcode).to be_an_instance_of Onfido::DocumentPropertiesBarcode
expect(report.properties.barcode.document_type).to eq("driving_licence")
expect(report.properties.barcode[0]).to be_an_instance_of Onfido::DocumentPropertiesBarcodeInner
expect(report.properties.barcode[0].document_type).to eq("driving_licence")
end
end
end

0 comments on commit f8de862

Please sign in to comment.