onfido 3.2.0 → 3.3.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: f7d0e5a36b63c80054591811ae2e6ebe0a221b58352b53130da2e2cb53cf2bee
4
- data.tar.gz: 5cd5f1afa7bb2d2dd82f0db84e407cad430bbe66cc8af3318fb54e9c9d0b10fc
3
+ metadata.gz: 8b1b0a9b1f5e69e278fc7001f2cbbce7c86dbf87857592f0d484f995a30060e7
4
+ data.tar.gz: 558baf4a305a2834ccbe70e70b9170d22bcb5078fa95137b473362913a7512b4
5
5
  SHA512:
6
- metadata.gz: a372a4c0ad74bacd1a065b8b294e35002fd7fa9a5e8f27239ce50d4909c6ce5c481c778a5e7420e087ec1eb3afe673e19ef206ee771c5f5b2c62a7a75e0dbf8f
7
- data.tar.gz: 86303e99596c6b75a194913bdacd6a192d4e00d8eee69e5e18f3105a7e87e262fece2060371237dfeb78c8010107f9a98ccc1d30839ee2f14ace835af0d71e50
6
+ metadata.gz: 1f27173db1bf62e097539f20aac439d28b313d430756e44fee5ab981cc5c540cd1e8292546716db9e43946712361d3434ab20e2388349e2988f89a958f9c235e
7
+ data.tar.gz: c9edc6a9e9ad038140954efca57e884fa46139e27922ffddfe2be8f1a74aa66afbfd224a6d93bd5cda3d9372facffcdd5cc8c0c7f5ad28dcb60d155292ed099c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## v3.2.0 18th July 2024
4
+
5
+ - Release based on Onfido OpenAPI spec version [v3.2.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v3.2.0):
6
+ - [CAT-1289] Document report's properties: Add middle name
7
+ - chore(qes): add documents endpoint
8
+ - [CAT-1297] Webhook Event: remove uuid format from object.id
9
+ - fix(qes): fix download document http method
10
+ - Add started_at_iso8601 field in webhook event
11
+ - add jpeg file type for documents
12
+ - Fix error handling documentation in README file
13
+
3
14
  ## v3.1.0 5th July 2024
4
15
 
5
16
  - Release based on Onfido OpenAPI spec version [v3.1.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v3.1.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, '~> 3.2.0'
17
+ gem onfido, '~> 3.3.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/3.2.0"
37
+ @user_agent = "onfido-ruby/3.3.0"
38
38
  @default_headers = {
39
39
  'Content-Type' => 'application/json',
40
40
  'User-Agent' => @user_agent
@@ -24,6 +24,9 @@ module Onfido
24
24
  # Tags or labels assigned to the workflow run.
25
25
  attr_accessor :tags
26
26
 
27
+ # Customer-provided user identifier.
28
+ attr_accessor :customer_user_id
29
+
27
30
  attr_accessor :link
28
31
 
29
32
  # The date and time when the Workflow Run was created.
@@ -52,6 +55,9 @@ module Onfido
52
55
 
53
56
  attr_accessor :error
54
57
 
58
+ # Client token to use when loading this workflow run in the Onfido SDK.
59
+ attr_accessor :sdk_token
60
+
55
61
  class EnumAttributeValidator
56
62
  attr_reader :datatype
57
63
  attr_reader :allowable_values
@@ -80,6 +86,7 @@ module Onfido
80
86
  :'applicant_id' => :'applicant_id',
81
87
  :'workflow_id' => :'workflow_id',
82
88
  :'tags' => :'tags',
89
+ :'customer_user_id' => :'customer_user_id',
83
90
  :'link' => :'link',
84
91
  :'created_at' => :'created_at',
85
92
  :'updated_at' => :'updated_at',
@@ -89,7 +96,8 @@ module Onfido
89
96
  :'status' => :'status',
90
97
  :'output' => :'output',
91
98
  :'reasons' => :'reasons',
92
- :'error' => :'error'
99
+ :'error' => :'error',
100
+ :'sdk_token' => :'sdk_token'
93
101
  }
94
102
  end
95
103
 
@@ -104,6 +112,7 @@ module Onfido
104
112
  :'applicant_id' => :'String',
105
113
  :'workflow_id' => :'String',
106
114
  :'tags' => :'Array<String>',
115
+ :'customer_user_id' => :'String',
107
116
  :'link' => :'WorkflowRunSharedLink',
108
117
  :'created_at' => :'Time',
109
118
  :'updated_at' => :'Time',
@@ -113,7 +122,8 @@ module Onfido
113
122
  :'status' => :'String',
114
123
  :'output' => :'Object',
115
124
  :'reasons' => :'Array<String>',
116
- :'error' => :'WorkflowRunResponseError'
125
+ :'error' => :'WorkflowRunResponseError',
126
+ :'sdk_token' => :'String'
117
127
  }
118
128
  end
119
129
 
@@ -121,6 +131,7 @@ module Onfido
121
131
  def self.openapi_nullable
122
132
  Set.new([
123
133
  :'tags',
134
+ :'sdk_token'
124
135
  ])
125
136
  end
126
137
 
@@ -165,6 +176,10 @@ module Onfido
165
176
  end
166
177
  end
167
178
 
179
+ if attributes.key?(:'customer_user_id')
180
+ self.customer_user_id = attributes[:'customer_user_id']
181
+ end
182
+
168
183
  if attributes.key?(:'link')
169
184
  self.link = attributes[:'link']
170
185
  end
@@ -208,6 +223,10 @@ module Onfido
208
223
  if attributes.key?(:'error')
209
224
  self.error = attributes[:'error']
210
225
  end
226
+
227
+ if attributes.key?(:'sdk_token')
228
+ self.sdk_token = attributes[:'sdk_token']
229
+ end
211
230
  end
212
231
 
213
232
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -227,6 +246,10 @@ module Onfido
227
246
  invalid_properties.push('invalid value for "tags", number of items must be less than or equal to 30.')
228
247
  end
229
248
 
249
+ if !@customer_user_id.nil? && @customer_user_id.to_s.length > 256
250
+ invalid_properties.push('invalid value for "customer_user_id", the character length must be smaller than or equal to 256.')
251
+ end
252
+
230
253
  if @id.nil?
231
254
  invalid_properties.push('invalid value for "id", id cannot be nil.')
232
255
  end
@@ -241,6 +264,7 @@ module Onfido
241
264
  return false if @applicant_id.nil?
242
265
  return false if @workflow_id.nil?
243
266
  return false if !@tags.nil? && @tags.length > 30
267
+ return false if !@customer_user_id.nil? && @customer_user_id.to_s.length > 256
244
268
  return false if @id.nil?
245
269
  status_validator = EnumAttributeValidator.new('String', ["awaiting_input", "processing", "abandoned", "error", "approved", "review", "declined", "unknown_default_open_api"])
246
270
  return false unless status_validator.valid?(@status)
@@ -257,6 +281,20 @@ module Onfido
257
281
  @tags = tags
258
282
  end
259
283
 
284
+ # Custom attribute writer method with validation
285
+ # @param [Object] customer_user_id Value to be assigned
286
+ def customer_user_id=(customer_user_id)
287
+ if customer_user_id.nil?
288
+ fail ArgumentError, 'customer_user_id cannot be nil'
289
+ end
290
+
291
+ if customer_user_id.to_s.length > 256
292
+ fail ArgumentError, 'invalid value for "customer_user_id", the character length must be smaller than or equal to 256.'
293
+ end
294
+
295
+ @customer_user_id = customer_user_id
296
+ end
297
+
260
298
  # Custom attribute writer method checking allowed values (enum).
261
299
  # @param [Object] status Object to be assigned
262
300
  def status=(status)
@@ -275,6 +313,7 @@ module Onfido
275
313
  applicant_id == o.applicant_id &&
276
314
  workflow_id == o.workflow_id &&
277
315
  tags == o.tags &&
316
+ customer_user_id == o.customer_user_id &&
278
317
  link == o.link &&
279
318
  created_at == o.created_at &&
280
319
  updated_at == o.updated_at &&
@@ -284,7 +323,8 @@ module Onfido
284
323
  status == o.status &&
285
324
  output == o.output &&
286
325
  reasons == o.reasons &&
287
- error == o.error
326
+ error == o.error &&
327
+ sdk_token == o.sdk_token
288
328
  end
289
329
 
290
330
  # @see the `==` method
@@ -296,7 +336,7 @@ module Onfido
296
336
  # Calculates hash code according to all attributes.
297
337
  # @return [Integer] Hash code
298
338
  def hash
299
- [applicant_id, workflow_id, tags, link, created_at, updated_at, id, workflow_version_id, dashboard_url, status, output, reasons, error].hash
339
+ [applicant_id, workflow_id, tags, customer_user_id, link, created_at, updated_at, id, workflow_version_id, dashboard_url, status, output, reasons, error, sdk_token].hash
300
340
  end
301
341
 
302
342
  # Builds the object from hash
@@ -24,6 +24,9 @@ module Onfido
24
24
  # Tags or labels assigned to the workflow run.
25
25
  attr_accessor :tags
26
26
 
27
+ # Customer-provided user identifier.
28
+ attr_accessor :customer_user_id
29
+
27
30
  attr_accessor :link
28
31
 
29
32
  # The date and time when the Workflow Run was created.
@@ -41,6 +44,7 @@ module Onfido
41
44
  :'applicant_id' => :'applicant_id',
42
45
  :'workflow_id' => :'workflow_id',
43
46
  :'tags' => :'tags',
47
+ :'customer_user_id' => :'customer_user_id',
44
48
  :'link' => :'link',
45
49
  :'created_at' => :'created_at',
46
50
  :'updated_at' => :'updated_at',
@@ -59,6 +63,7 @@ module Onfido
59
63
  :'applicant_id' => :'String',
60
64
  :'workflow_id' => :'String',
61
65
  :'tags' => :'Array<String>',
66
+ :'customer_user_id' => :'String',
62
67
  :'link' => :'WorkflowRunSharedLink',
63
68
  :'created_at' => :'Time',
64
69
  :'updated_at' => :'Time',
@@ -114,6 +119,10 @@ module Onfido
114
119
  end
115
120
  end
116
121
 
122
+ if attributes.key?(:'customer_user_id')
123
+ self.customer_user_id = attributes[:'customer_user_id']
124
+ end
125
+
117
126
  if attributes.key?(:'link')
118
127
  self.link = attributes[:'link']
119
128
  end
@@ -150,6 +159,10 @@ module Onfido
150
159
  invalid_properties.push('invalid value for "tags", number of items must be less than or equal to 30.')
151
160
  end
152
161
 
162
+ if !@customer_user_id.nil? && @customer_user_id.to_s.length > 256
163
+ invalid_properties.push('invalid value for "customer_user_id", the character length must be smaller than or equal to 256.')
164
+ end
165
+
153
166
  invalid_properties
154
167
  end
155
168
 
@@ -160,6 +173,7 @@ module Onfido
160
173
  return false if @applicant_id.nil?
161
174
  return false if @workflow_id.nil?
162
175
  return false if !@tags.nil? && @tags.length > 30
176
+ return false if !@customer_user_id.nil? && @customer_user_id.to_s.length > 256
163
177
  true
164
178
  end
165
179
 
@@ -173,6 +187,20 @@ module Onfido
173
187
  @tags = tags
174
188
  end
175
189
 
190
+ # Custom attribute writer method with validation
191
+ # @param [Object] customer_user_id Value to be assigned
192
+ def customer_user_id=(customer_user_id)
193
+ if customer_user_id.nil?
194
+ fail ArgumentError, 'customer_user_id cannot be nil'
195
+ end
196
+
197
+ if customer_user_id.to_s.length > 256
198
+ fail ArgumentError, 'invalid value for "customer_user_id", the character length must be smaller than or equal to 256.'
199
+ end
200
+
201
+ @customer_user_id = customer_user_id
202
+ end
203
+
176
204
  # Checks equality by comparing each attribute.
177
205
  # @param [Object] Object to be compared
178
206
  def ==(o)
@@ -181,6 +209,7 @@ module Onfido
181
209
  applicant_id == o.applicant_id &&
182
210
  workflow_id == o.workflow_id &&
183
211
  tags == o.tags &&
212
+ customer_user_id == o.customer_user_id &&
184
213
  link == o.link &&
185
214
  created_at == o.created_at &&
186
215
  updated_at == o.updated_at &&
@@ -196,7 +225,7 @@ module Onfido
196
225
  # Calculates hash code according to all attributes.
197
226
  # @return [Integer] Hash code
198
227
  def hash
199
- [applicant_id, workflow_id, tags, link, created_at, updated_at, custom_data].hash
228
+ [applicant_id, workflow_id, tags, customer_user_id, link, created_at, updated_at, custom_data].hash
200
229
  end
201
230
 
202
231
  # Builds the object from hash
@@ -35,6 +35,9 @@ module Onfido
35
35
 
36
36
  attr_accessor :error
37
37
 
38
+ # Client token to use when loading this workflow run in the Onfido SDK.
39
+ attr_accessor :sdk_token
40
+
38
41
  class EnumAttributeValidator
39
42
  attr_reader :datatype
40
43
  attr_reader :allowable_values
@@ -66,7 +69,8 @@ module Onfido
66
69
  :'status' => :'status',
67
70
  :'output' => :'output',
68
71
  :'reasons' => :'reasons',
69
- :'error' => :'error'
72
+ :'error' => :'error',
73
+ :'sdk_token' => :'sdk_token'
70
74
  }
71
75
  end
72
76
 
@@ -84,13 +88,15 @@ module Onfido
84
88
  :'status' => :'String',
85
89
  :'output' => :'Object',
86
90
  :'reasons' => :'Array<String>',
87
- :'error' => :'WorkflowRunResponseError'
91
+ :'error' => :'WorkflowRunResponseError',
92
+ :'sdk_token' => :'String'
88
93
  }
89
94
  end
90
95
 
91
96
  # List of attributes with nullable: true
92
97
  def self.openapi_nullable
93
98
  Set.new([
99
+ :'sdk_token'
94
100
  ])
95
101
  end
96
102
 
@@ -140,6 +146,10 @@ module Onfido
140
146
  if attributes.key?(:'error')
141
147
  self.error = attributes[:'error']
142
148
  end
149
+
150
+ if attributes.key?(:'sdk_token')
151
+ self.sdk_token = attributes[:'sdk_token']
152
+ end
143
153
  end
144
154
 
145
155
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -185,7 +195,8 @@ module Onfido
185
195
  status == o.status &&
186
196
  output == o.output &&
187
197
  reasons == o.reasons &&
188
- error == o.error
198
+ error == o.error &&
199
+ sdk_token == o.sdk_token
189
200
  end
190
201
 
191
202
  # @see the `==` method
@@ -197,7 +208,7 @@ module Onfido
197
208
  # Calculates hash code according to all attributes.
198
209
  # @return [Integer] Hash code
199
210
  def hash
200
- [id, workflow_version_id, dashboard_url, status, output, reasons, error].hash
211
+ [id, workflow_version_id, dashboard_url, status, output, reasons, error, sdk_token].hash
201
212
  end
202
213
 
203
214
  # Builds the object from hash
@@ -24,6 +24,9 @@ module Onfido
24
24
  # Tags or labels assigned to the workflow run.
25
25
  attr_accessor :tags
26
26
 
27
+ # Customer-provided user identifier.
28
+ attr_accessor :customer_user_id
29
+
27
30
  attr_accessor :link
28
31
 
29
32
  # The date and time when the Workflow Run was created.
@@ -38,6 +41,7 @@ module Onfido
38
41
  :'applicant_id' => :'applicant_id',
39
42
  :'workflow_id' => :'workflow_id',
40
43
  :'tags' => :'tags',
44
+ :'customer_user_id' => :'customer_user_id',
41
45
  :'link' => :'link',
42
46
  :'created_at' => :'created_at',
43
47
  :'updated_at' => :'updated_at'
@@ -55,6 +59,7 @@ module Onfido
55
59
  :'applicant_id' => :'String',
56
60
  :'workflow_id' => :'String',
57
61
  :'tags' => :'Array<String>',
62
+ :'customer_user_id' => :'String',
58
63
  :'link' => :'WorkflowRunSharedLink',
59
64
  :'created_at' => :'Time',
60
65
  :'updated_at' => :'Time'
@@ -101,6 +106,10 @@ module Onfido
101
106
  end
102
107
  end
103
108
 
109
+ if attributes.key?(:'customer_user_id')
110
+ self.customer_user_id = attributes[:'customer_user_id']
111
+ end
112
+
104
113
  if attributes.key?(:'link')
105
114
  self.link = attributes[:'link']
106
115
  end
@@ -131,6 +140,10 @@ module Onfido
131
140
  invalid_properties.push('invalid value for "tags", number of items must be less than or equal to 30.')
132
141
  end
133
142
 
143
+ if !@customer_user_id.nil? && @customer_user_id.to_s.length > 256
144
+ invalid_properties.push('invalid value for "customer_user_id", the character length must be smaller than or equal to 256.')
145
+ end
146
+
134
147
  invalid_properties
135
148
  end
136
149
 
@@ -141,6 +154,7 @@ module Onfido
141
154
  return false if @applicant_id.nil?
142
155
  return false if @workflow_id.nil?
143
156
  return false if !@tags.nil? && @tags.length > 30
157
+ return false if !@customer_user_id.nil? && @customer_user_id.to_s.length > 256
144
158
  true
145
159
  end
146
160
 
@@ -154,6 +168,20 @@ module Onfido
154
168
  @tags = tags
155
169
  end
156
170
 
171
+ # Custom attribute writer method with validation
172
+ # @param [Object] customer_user_id Value to be assigned
173
+ def customer_user_id=(customer_user_id)
174
+ if customer_user_id.nil?
175
+ fail ArgumentError, 'customer_user_id cannot be nil'
176
+ end
177
+
178
+ if customer_user_id.to_s.length > 256
179
+ fail ArgumentError, 'invalid value for "customer_user_id", the character length must be smaller than or equal to 256.'
180
+ end
181
+
182
+ @customer_user_id = customer_user_id
183
+ end
184
+
157
185
  # Checks equality by comparing each attribute.
158
186
  # @param [Object] Object to be compared
159
187
  def ==(o)
@@ -162,6 +190,7 @@ module Onfido
162
190
  applicant_id == o.applicant_id &&
163
191
  workflow_id == o.workflow_id &&
164
192
  tags == o.tags &&
193
+ customer_user_id == o.customer_user_id &&
165
194
  link == o.link &&
166
195
  created_at == o.created_at &&
167
196
  updated_at == o.updated_at
@@ -176,7 +205,7 @@ module Onfido
176
205
  # Calculates hash code according to all attributes.
177
206
  # @return [Integer] Hash code
178
207
  def hash
179
- [applicant_id, workflow_id, tags, link, created_at, updated_at].hash
208
+ [applicant_id, workflow_id, tags, customer_user_id, link, created_at, updated_at].hash
180
209
  end
181
210
 
182
211
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.6.0
11
11
  =end
12
12
 
13
13
  module Onfido
14
- VERSION = '3.2.0'
14
+ VERSION = '3.3.0'
15
15
  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: 3.2.0
4
+ version: 3.3.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-07-18 00:00:00.000000000 Z
11
+ date: 2024-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -453,31 +453,31 @@ signing_key:
453
453
  specification_version: 4
454
454
  summary: The official Ruby library for integrating with the Onfido API.
455
455
  test_files:
456
- - spec/integrations/id_photo_spec.rb
456
+ - spec/integrations/live_photo_spec.rb
457
+ - spec/integrations/sdk_token_spec.rb
458
+ - spec/integrations/watchlist_monitor_spec.rb
459
+ - spec/integrations/live_video_spec.rb
460
+ - spec/integrations/qualified_electronic_signature_spec.rb
457
461
  - spec/integrations/workflow_run_spec.rb
458
- - spec/integrations/media/sample_driving_licence.png
459
- - spec/integrations/media/sample_photo.png
460
- - spec/integrations/webhook_spec.rb
461
- - spec/integrations/report_spec.rb
462
- - spec/integrations/workflow_run_output_spec.rb
462
+ - spec/integrations/applicant_spec.rb
463
463
  - spec/integrations/check_spec.rb
464
- - spec/integrations/tasks_spec.rb
464
+ - spec/integrations/motion_capture_spec.rb
465
465
  - spec/integrations/extraction_spec.rb
466
- - spec/integrations/watchlist_monitor_spec.rb
466
+ - spec/integrations/webhook_spec.rb
467
467
  - spec/integrations/address_picker_spec.rb
468
- - spec/integrations/applicant_spec.rb
469
- - spec/integrations/motion_capture_spec.rb
470
- - spec/integrations/live_photo_spec.rb
471
468
  - spec/integrations/report_schema_spec.rb
472
- - spec/integrations/qualified_electronic_signature_spec.rb
473
- - spec/integrations/sdk_token_spec.rb
469
+ - spec/integrations/media/sample_photo.png
470
+ - spec/integrations/media/sample_driving_licence.png
471
+ - spec/integrations/report_spec.rb
472
+ - spec/integrations/tasks_spec.rb
474
473
  - spec/integrations/document_spec.rb
475
- - spec/integrations/live_video_spec.rb
476
- - spec/shared_contexts/with_workflow_run.rb
477
- - spec/shared_contexts/with_live_photo.rb
478
- - spec/shared_contexts/with_onfido.rb
474
+ - spec/integrations/id_photo_spec.rb
475
+ - spec/integrations/workflow_run_output_spec.rb
476
+ - spec/shared_contexts/with_applicant.rb
479
477
  - spec/shared_contexts/with_document.rb
478
+ - spec/shared_contexts/with_onfido.rb
479
+ - spec/shared_contexts/with_live_photo.rb
480
480
  - spec/shared_contexts/with_check.rb
481
- - spec/shared_contexts/with_applicant.rb
481
+ - spec/shared_contexts/with_workflow_run.rb
482
482
  - spec/spec_helper.rb
483
483
  - spec/webhook_event_verifier_spec.rb