onfido 4.0.0 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1440532a4dd2a2ad41208150fe93557b9d302661b5068548dac11e67b8e3753a
4
- data.tar.gz: 7c36df59da3fc856cda3aa51e0522d14c4866075a16124afd456e2e2076e6032
3
+ metadata.gz: 84c97682271bcf86f213850a497db54f4ca3d89574a9306a543decbfd8b5db29
4
+ data.tar.gz: b6f0a08180cfb57ed019b873776f1f723065e050d9c4e5ff512b0aabf8c73dfd
5
5
  SHA512:
6
- metadata.gz: 7eab059fd49dd484100496de953606242571165688156376d23822434fe2af370f8ee2f9f491939f68f2db582b657b495f050a1dde7faea6ef2a930fa5db633d
7
- data.tar.gz: a9d532d9efa8a25dc7be70bce86eb45f20e53efb928d0b7ce6f456b96e1383f180b2c7fca8ec229b280d6e6203f2fefd7711b93924d58e5045888205c81a5aa5
6
+ metadata.gz: eade09a8e29ab656d8c032e470c81a044f47b791e171b3b610a519ffd8866a22dea53dd9dba5df0c6a75d357299fb47852cd02c2349efece713ea7f812fa2d47
7
+ data.tar.gz: d5e4b6c96bf9c9ef1d189a5f5b14b0f31282fd7fa3178daa75eecb79c962b19940c2d2ffba1d93dde8253330f859dc9857f7c9c6de12d9767f1d683c567c7821
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## v4.0.0 24th October 2024
4
+
5
+ - Release based on Onfido OpenAPI spec version [v4.0.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v4.0.0):
6
+ - [CAT-1379] Add a few missing properties
7
+ - [CAT-1447] Fix applicant consents
8
+ - [CAT-1379] Fix check creation, remove some deprecated properties and deprecate others
9
+ - Use document-type enum for document upload
10
+ - [CAT-1306] Add webhooks event resource
11
+ - Upgrade OpenAPI generator to v7.9.0 (was v7.6.0)
12
+ - [Migration Guide](MIGRATION.md#upgrading-from-3x-to-4x)
13
+
3
14
  ## v3.4.0 20th September 2024
4
15
 
5
16
  - Release based on Onfido OpenAPI spec version [v3.5.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v3.5.0):
data/README.md CHANGED
@@ -14,7 +14,7 @@ This version uses Onfido API v3.6. Refer to our [API versioning guide](https://d
14
14
  ### Installation
15
15
 
16
16
  ```ruby
17
- gem onfido, '~> 4.0.0'
17
+ gem onfido, '~> 4.1.0'
18
18
  ```
19
19
 
20
20
  Configure with your API token, region and optional timeout (default value is 30):
@@ -34,7 +34,7 @@ module Onfido
34
34
  # @option config [Configuration] Configuration for initializing the object, default to Configuration.default
35
35
  def initialize(config = Configuration.default)
36
36
  @config = config
37
- @user_agent = "onfido-ruby/4.0.0"
37
+ @user_agent = "onfido-ruby/4.1.0"
38
38
  @default_headers = {
39
39
  'Content-Type' => 'application/json',
40
40
  'User-Agent' => @user_agent
@@ -226,7 +226,7 @@ module Onfido
226
226
  :'real_id_compliance' => :'Boolean',
227
227
  :'security_tier' => :'String',
228
228
  :'address_lines' => :'DocumentPropertiesAddressLines',
229
- :'barcode' => :'Array<DocumentPropertiesBarcodeInner>',
229
+ :'barcode' => :'DocumentPropertiesBarcode',
230
230
  :'nfc' => :'DocumentPropertiesNfc',
231
231
  :'driving_licence_information' => :'DocumentPropertiesDrivingLicenceInformation',
232
232
  :'document_classification' => :'DocumentPropertiesDocumentClassification',
@@ -418,9 +418,7 @@ module Onfido
418
418
  end
419
419
 
420
420
  if attributes.key?(:'barcode')
421
- if (value = attributes[:'barcode']).is_a?(Array)
422
- self.barcode = value
423
- end
421
+ self.barcode = attributes[:'barcode']
424
422
  end
425
423
 
426
424
  if attributes.key?(:'nfc')
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Onfido
17
- class DocumentPropertiesBarcodeInner
17
+ class DocumentPropertiesBarcode
18
18
  attr_accessor :first_name
19
19
 
20
20
  attr_accessor :middle_name
@@ -114,13 +114,13 @@ module Onfido
114
114
  # @param [Hash] attributes Model attributes in the form of hash
115
115
  def initialize(attributes = {})
116
116
  if (!attributes.is_a?(Hash))
117
- fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::DocumentPropertiesBarcodeInner` initialize method"
117
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::DocumentPropertiesBarcode` initialize method"
118
118
  end
119
119
 
120
120
  # check to see if the attribute exists and convert string to symbol for hash key
121
121
  attributes = attributes.each_with_object({}) { |(k, v), h|
122
122
  if (!self.class.attribute_map.key?(k.to_sym))
123
- 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
123
+ 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
124
124
  end
125
125
  h[k.to_sym] = v
126
126
  }
@@ -249,7 +249,7 @@ module Onfido
249
249
  :'real_id_compliance' => :'Boolean',
250
250
  :'security_tier' => :'String',
251
251
  :'address_lines' => :'DocumentPropertiesAddressLines',
252
- :'barcode' => :'Array<DocumentPropertiesBarcodeInner>',
252
+ :'barcode' => :'DocumentPropertiesBarcode',
253
253
  :'nfc' => :'DocumentPropertiesNfc',
254
254
  :'driving_licence_information' => :'DocumentPropertiesDrivingLicenceInformation',
255
255
  :'document_classification' => :'DocumentPropertiesDocumentClassification',
@@ -454,9 +454,7 @@ module Onfido
454
454
  end
455
455
 
456
456
  if attributes.key?(:'barcode')
457
- if (value = attributes[:'barcode']).is_a?(Array)
458
- self.barcode = value
459
- end
457
+ self.barcode = attributes[:'barcode']
460
458
  end
461
459
 
462
460
  if attributes.key?(:'nfc')
@@ -11,5 +11,5 @@ Generator version: 7.9.0
11
11
  =end
12
12
 
13
13
  module Onfido
14
- VERSION = '4.0.0'
14
+ VERSION = '4.1.0'
15
15
  end
data/lib/onfido.rb CHANGED
@@ -92,7 +92,7 @@ require 'onfido/models/document_iq_reasons'
92
92
  require 'onfido/models/document_odp_reasons'
93
93
  require 'onfido/models/document_properties'
94
94
  require 'onfido/models/document_properties_address_lines'
95
- require 'onfido/models/document_properties_barcode_inner'
95
+ require 'onfido/models/document_properties_barcode'
96
96
  require 'onfido/models/document_properties_document_classification'
97
97
  require 'onfido/models/document_properties_document_numbers_inner'
98
98
  require 'onfido/models/document_properties_driving_licence_information'
@@ -41,5 +41,22 @@ describe Onfido::Report do
41
41
 
42
42
  expect(facial_similarity_report).to be_an_instance_of Onfido::FacialSimilarityPhotoReport
43
43
  end
44
+
45
+ it 'schema of Document With Address Information report is valid' do
46
+ report_id = onfido_api.create_check(
47
+ Onfido::CheckBuilder.new(
48
+ applicant_id: applicant_id,
49
+ document_ids: [document_id],
50
+ report_names: [Onfido::ReportName::DOCUMENT_WITH_ADDRESS_INFORMATION],
51
+ )).report_ids[0]
52
+
53
+ report = repeat_request_until_status_changes(
54
+ Onfido::ReportStatus::COMPLETE
55
+ ) { onfido_api.find_report(report_id) }
56
+
57
+ expect(report).to be_an_instance_of Onfido::DocumentWithAddressInformationReport
58
+ expect(report.properties.barcode).to be_an_instance_of Onfido::DocumentPropertiesBarcode
59
+ expect(report.properties.barcode.document_type).to eq("driving_licence")
60
+ end
44
61
  end
45
62
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onfido
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-24 00:00:00.000000000 Z
11
+ date: 2024-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -213,7 +213,7 @@ files:
213
213
  - lib/onfido/models/document_odp_reasons.rb
214
214
  - lib/onfido/models/document_properties.rb
215
215
  - lib/onfido/models/document_properties_address_lines.rb
216
- - lib/onfido/models/document_properties_barcode_inner.rb
216
+ - lib/onfido/models/document_properties_barcode.rb
217
217
  - lib/onfido/models/document_properties_document_classification.rb
218
218
  - lib/onfido/models/document_properties_document_numbers_inner.rb
219
219
  - lib/onfido/models/document_properties_driving_licence_information.rb