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 +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +1 -1
- data/lib/onfido/api_client.rb +1 -1
- data/lib/onfido/models/document_properties.rb +2 -4
- data/lib/onfido/models/{document_properties_barcode_inner.rb → document_properties_barcode.rb} +3 -3
- data/lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb +2 -4
- data/lib/onfido/version.rb +1 -1
- data/lib/onfido.rb +1 -1
- data/spec/integrations/report_schema_spec.rb +17 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84c97682271bcf86f213850a497db54f4ca3d89574a9306a543decbfd8b5db29
|
4
|
+
data.tar.gz: b6f0a08180cfb57ed019b873776f1f723065e050d9c4e5ff512b0aabf8c73dfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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):
|
data/lib/onfido/api_client.rb
CHANGED
@@ -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.
|
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' => :'
|
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
|
-
|
422
|
-
self.barcode = value
|
423
|
-
end
|
421
|
+
self.barcode = attributes[:'barcode']
|
424
422
|
end
|
425
423
|
|
426
424
|
if attributes.key?(:'nfc')
|
data/lib/onfido/models/{document_properties_barcode_inner.rb → document_properties_barcode.rb}
RENAMED
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Onfido
|
17
|
-
class
|
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::
|
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::
|
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' => :'
|
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
|
-
|
458
|
-
self.barcode = value
|
459
|
-
end
|
457
|
+
self.barcode = attributes[:'barcode']
|
460
458
|
end
|
461
459
|
|
462
460
|
if attributes.key?(:'nfc')
|
data/lib/onfido/version.rb
CHANGED
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/
|
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.
|
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-
|
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/
|
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
|