Class: Onfido::DefaultApi

Inherits:
Object
  • Object
show all
Defined in:
lib/onfido/api/default_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DefaultApi

Returns a new instance of DefaultApi.



19
20
21
# File 'lib/onfido/api/default_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/onfido/api/default_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#cancel_report(report_id, opts = {}) ⇒ nil

Cancel report Cancels single paused reports.

Parameters:

  • report_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


27
28
29
30
# File 'lib/onfido/api/default_api.rb', line 27

def cancel_report(report_id, opts = {})
  cancel_report_with_http_info(report_id, opts)
  nil
end

#cancel_report_with_http_info(report_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Cancel report Cancels single paused reports.

Parameters:

  • report_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/onfido/api/default_api.rb', line 37

def cancel_report_with_http_info(report_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.cancel_report ...'
  end
  # verify the required parameter 'report_id' is set
  if @api_client.config.client_side_validation && report_id.nil?
    fail ArgumentError, "Missing the required parameter 'report_id' when calling DefaultApi.cancel_report"
  end
  # resource path
  local_var_path = '/reports/{report_id}/cancel'.sub('{' + 'report_id' + '}', CGI.escape(report_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.cancel_report",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#cancel_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#complete_task(workflow_run_id, task_id, complete_task_builder, opts = {}) ⇒ nil

Complete Task Completes a Send / Receive Data Task.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run to which the Task belongs.

  • task_id (String)

    The identifier of the Task you want to complete.

  • complete_task_builder (CompleteTaskBuilder)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


92
93
94
95
# File 'lib/onfido/api/default_api.rb', line 92

def complete_task(workflow_run_id, task_id, complete_task_builder, opts = {})
  complete_task_with_http_info(workflow_run_id, task_id, complete_task_builder, opts)
  nil
end

#complete_task_with_http_info(workflow_run_id, task_id, complete_task_builder, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Complete Task Completes a Send / Receive Data Task.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run to which the Task belongs.

  • task_id (String)

    The identifier of the Task you want to complete.

  • complete_task_builder (CompleteTaskBuilder)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/onfido/api/default_api.rb', line 104

def complete_task_with_http_info(workflow_run_id, task_id, complete_task_builder, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.complete_task ...'
  end
  # verify the required parameter 'workflow_run_id' is set
  if @api_client.config.client_side_validation && workflow_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_run_id' when calling DefaultApi.complete_task"
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling DefaultApi.complete_task"
  end
  # verify the required parameter 'complete_task_builder' is set
  if @api_client.config.client_side_validation && complete_task_builder.nil?
    fail ArgumentError, "Missing the required parameter 'complete_task_builder' when calling DefaultApi.complete_task"
  end
  # resource path
  local_var_path = '/workflow_runs/{workflow_run_id}/tasks/{task_id}/complete'.sub('{' + 'workflow_run_id' + '}', CGI.escape(workflow_run_id.to_s)).sub('{' + 'task_id' + '}', CGI.escape(task_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(complete_task_builder)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.complete_task",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#complete_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_applicant(applicant_builder, opts = {}) ⇒ Applicant

Create Applicant Creates a single applicant. Returns an applicant object.

Parameters:

  • applicant_builder (ApplicantBuilder)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



170
171
172
173
# File 'lib/onfido/api/default_api.rb', line 170

def create_applicant(applicant_builder, opts = {})
  data, _status_code, _headers = create_applicant_with_http_info(applicant_builder, opts)
  data
end

#create_applicant_with_http_info(applicant_builder, opts = {}) ⇒ Array<(Applicant, Integer, Hash)>

Create Applicant Creates a single applicant. Returns an applicant object.

Parameters:

  • applicant_builder (ApplicantBuilder)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Applicant, Integer, Hash)>)

    Applicant data, response status code and response headers



180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/onfido/api/default_api.rb', line 180

def create_applicant_with_http_info(applicant_builder, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_applicant ...'
  end
  # verify the required parameter 'applicant_builder' is set
  if @api_client.config.client_side_validation && applicant_builder.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_builder' when calling DefaultApi.create_applicant"
  end
  # resource path
  local_var_path = '/applicants'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(applicant_builder)

  # return_type
  return_type = opts[:debug_return_type] || 'Applicant'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.create_applicant",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#create_applicant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_check(check_builder, opts = {}) ⇒ Check

Create a check Initiates a check for an applicant, which can contain one or more reports. Returns a check object.

Parameters:

  • check_builder (CheckBuilder)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



238
239
240
241
# File 'lib/onfido/api/default_api.rb', line 238

def create_check(check_builder, opts = {})
  data, _status_code, _headers = create_check_with_http_info(check_builder, opts)
  data
end

#create_check_with_http_info(check_builder, opts = {}) ⇒ Array<(Check, Integer, Hash)>

Create a check Initiates a check for an applicant, which can contain one or more reports. Returns a check object.

Parameters:

  • check_builder (CheckBuilder)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Check, Integer, Hash)>)

    Check data, response status code and response headers



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
# File 'lib/onfido/api/default_api.rb', line 248

def create_check_with_http_info(check_builder, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_check ...'
  end
  # verify the required parameter 'check_builder' is set
  if @api_client.config.client_side_validation && check_builder.nil?
    fail ArgumentError, "Missing the required parameter 'check_builder' when calling DefaultApi.create_check"
  end
  # resource path
  local_var_path = '/checks'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(check_builder)

  # return_type
  return_type = opts[:debug_return_type] || 'Check'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.create_check",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#create_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_timeline_file(workflow_run_id, opts = {}) ⇒ TimelineFileReference

Create Timeline File for Workflow Run Triggers the generation of the Timeline File for the designated Workflow Run.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



306
307
308
309
# File 'lib/onfido/api/default_api.rb', line 306

def create_timeline_file(workflow_run_id, opts = {})
  data, _status_code, _headers = create_timeline_file_with_http_info(workflow_run_id, opts)
  data
end

#create_timeline_file_with_http_info(workflow_run_id, opts = {}) ⇒ Array<(TimelineFileReference, Integer, Hash)>

Create Timeline File for Workflow Run Triggers the generation of the Timeline File for the designated Workflow Run.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TimelineFileReference, Integer, Hash)>)

    TimelineFileReference data, response status code and response headers



316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/onfido/api/default_api.rb', line 316

def create_timeline_file_with_http_info(workflow_run_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_timeline_file ...'
  end
  # verify the required parameter 'workflow_run_id' is set
  if @api_client.config.client_side_validation && workflow_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_run_id' when calling DefaultApi.create_timeline_file"
  end
  # resource path
  local_var_path = '/workflow_runs/{workflow_run_id}/timeline_file'.sub('{' + 'workflow_run_id' + '}', CGI.escape(workflow_run_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'TimelineFileReference'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.create_timeline_file",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#create_timeline_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_watchlist_monitor(watchlist_monitor_builder, opts = {}) ⇒ WatchlistMonitor

Create monitor Creates a new monitor for the applicant

Parameters:

Returns:



369
370
371
372
# File 'lib/onfido/api/default_api.rb', line 369

def create_watchlist_monitor(watchlist_monitor_builder, opts = {})
  data, _status_code, _headers = create_watchlist_monitor_with_http_info(watchlist_monitor_builder, opts)
  data
end

#create_watchlist_monitor_with_http_info(watchlist_monitor_builder, opts = {}) ⇒ Array<(WatchlistMonitor, Integer, Hash)>

Create monitor Creates a new monitor for the applicant

Parameters:

Returns:

  • (Array<(WatchlistMonitor, Integer, Hash)>)

    WatchlistMonitor data, response status code and response headers



379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
# File 'lib/onfido/api/default_api.rb', line 379

def create_watchlist_monitor_with_http_info(watchlist_monitor_builder, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_watchlist_monitor ...'
  end
  # verify the required parameter 'watchlist_monitor_builder' is set
  if @api_client.config.client_side_validation && watchlist_monitor_builder.nil?
    fail ArgumentError, "Missing the required parameter 'watchlist_monitor_builder' when calling DefaultApi.create_watchlist_monitor"
  end
  # resource path
  local_var_path = '/watchlist_monitors'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_monitor_builder)

  # return_type
  return_type = opts[:debug_return_type] || 'WatchlistMonitor'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.create_watchlist_monitor",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#create_watchlist_monitor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_webhook(webhook_builder, opts = {}) ⇒ Webhook

Register webhook Registers a webhook. Returns a webhook object.

Parameters:

  • webhook_builder (WebhookBuilder)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



437
438
439
440
# File 'lib/onfido/api/default_api.rb', line 437

def create_webhook(webhook_builder, opts = {})
  data, _status_code, _headers = create_webhook_with_http_info(webhook_builder, opts)
  data
end

#create_webhook_with_http_info(webhook_builder, opts = {}) ⇒ Array<(Webhook, Integer, Hash)>

Register webhook Registers a webhook. Returns a webhook object.

Parameters:

  • webhook_builder (WebhookBuilder)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Webhook, Integer, Hash)>)

    Webhook data, response status code and response headers



447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
# File 'lib/onfido/api/default_api.rb', line 447

def create_webhook_with_http_info(webhook_builder, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_webhook ...'
  end
  # verify the required parameter 'webhook_builder' is set
  if @api_client.config.client_side_validation && webhook_builder.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_builder' when calling DefaultApi.create_webhook"
  end
  # resource path
  local_var_path = '/webhooks'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(webhook_builder)

  # return_type
  return_type = opts[:debug_return_type] || 'Webhook'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.create_webhook",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#create_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_workflow_run(workflow_run_builder, opts = {}) ⇒ WorkflowRun

Create a Workflow Run Creates and starts a Workflow Run. Returns a Workflow Run object.

Parameters:

  • workflow_run_builder (WorkflowRunBuilder)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



505
506
507
508
# File 'lib/onfido/api/default_api.rb', line 505

def create_workflow_run(workflow_run_builder, opts = {})
  data, _status_code, _headers = create_workflow_run_with_http_info(workflow_run_builder, opts)
  data
end

#create_workflow_run_with_http_info(workflow_run_builder, opts = {}) ⇒ Array<(WorkflowRun, Integer, Hash)>

Create a Workflow Run Creates and starts a Workflow Run. Returns a Workflow Run object.

Parameters:

  • workflow_run_builder (WorkflowRunBuilder)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WorkflowRun, Integer, Hash)>)

    WorkflowRun data, response status code and response headers



515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
# File 'lib/onfido/api/default_api.rb', line 515

def create_workflow_run_with_http_info(workflow_run_builder, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_workflow_run ...'
  end
  # verify the required parameter 'workflow_run_builder' is set
  if @api_client.config.client_side_validation && workflow_run_builder.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_run_builder' when calling DefaultApi.create_workflow_run"
  end
  # resource path
  local_var_path = '/workflow_runs'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(workflow_run_builder)

  # return_type
  return_type = opts[:debug_return_type] || 'WorkflowRun'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.create_workflow_run",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#create_workflow_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_applicant(applicant_id, opts = {}) ⇒ nil

Delete Applicant Deletes a single applicant.

Parameters:

  • applicant_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


573
574
575
576
# File 'lib/onfido/api/default_api.rb', line 573

def delete_applicant(applicant_id, opts = {})
  delete_applicant_with_http_info(applicant_id, opts)
  nil
end

#delete_applicant_with_http_info(applicant_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete Applicant Deletes a single applicant.

Parameters:

  • applicant_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
# File 'lib/onfido/api/default_api.rb', line 583

def delete_applicant_with_http_info(applicant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.delete_applicant ...'
  end
  # verify the required parameter 'applicant_id' is set
  if @api_client.config.client_side_validation && applicant_id.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_id' when calling DefaultApi.delete_applicant"
  end
  # resource path
  local_var_path = '/applicants/{applicant_id}'.sub('{' + 'applicant_id' + '}', CGI.escape(applicant_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.delete_applicant",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#delete_applicant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_passkey(username, passkey_id, opts = {}) ⇒ nil

Delete passkey Deletes a passkey.

Parameters:

  • username (String)

    Username that owns the passkey.

  • passkey_id (String)

    Passkey ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


637
638
639
640
# File 'lib/onfido/api/default_api.rb', line 637

def delete_passkey(username, passkey_id, opts = {})
  delete_passkey_with_http_info(username, passkey_id, opts)
  nil
end

#delete_passkey_with_http_info(username, passkey_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete passkey Deletes a passkey.

Parameters:

  • username (String)

    Username that owns the passkey.

  • passkey_id (String)

    Passkey ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
# File 'lib/onfido/api/default_api.rb', line 648

def delete_passkey_with_http_info(username, passkey_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.delete_passkey ...'
  end
  # verify the required parameter 'username' is set
  if @api_client.config.client_side_validation && username.nil?
    fail ArgumentError, "Missing the required parameter 'username' when calling DefaultApi.delete_passkey"
  end
  # verify the required parameter 'passkey_id' is set
  if @api_client.config.client_side_validation && passkey_id.nil?
    fail ArgumentError, "Missing the required parameter 'passkey_id' when calling DefaultApi.delete_passkey"
  end
  # resource path
  local_var_path = '/passkeys/{username}/{passkey_id}'.sub('{' + 'username' + '}', CGI.escape(username.to_s)).sub('{' + 'passkey_id' + '}', CGI.escape(passkey_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.delete_passkey",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#delete_passkey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_passkeys(username, opts = {}) ⇒ nil

Delete passkeys Removes every passkey for the username.

Parameters:

  • username (String)

    Username whose passkeys will be deleted.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


705
706
707
708
# File 'lib/onfido/api/default_api.rb', line 705

def delete_passkeys(username, opts = {})
  delete_passkeys_with_http_info(username, opts)
  nil
end

#delete_passkeys_with_http_info(username, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete passkeys Removes every passkey for the username.

Parameters:

  • username (String)

    Username whose passkeys will be deleted.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
# File 'lib/onfido/api/default_api.rb', line 715

def delete_passkeys_with_http_info(username, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.delete_passkeys ...'
  end
  # verify the required parameter 'username' is set
  if @api_client.config.client_side_validation && username.nil?
    fail ArgumentError, "Missing the required parameter 'username' when calling DefaultApi.delete_passkeys"
  end
  # resource path
  local_var_path = '/passkeys/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.delete_passkeys",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#delete_passkeys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_watchlist_monitor(monitor_id, opts = {}) ⇒ nil

Delete monitor Deactivates the given monitor

Parameters:

  • monitor_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


768
769
770
771
# File 'lib/onfido/api/default_api.rb', line 768

def delete_watchlist_monitor(monitor_id, opts = {})
  delete_watchlist_monitor_with_http_info(monitor_id, opts)
  nil
end

#delete_watchlist_monitor_with_http_info(monitor_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete monitor Deactivates the given monitor

Parameters:

  • monitor_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
# File 'lib/onfido/api/default_api.rb', line 778

def delete_watchlist_monitor_with_http_info(monitor_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.delete_watchlist_monitor ...'
  end
  # verify the required parameter 'monitor_id' is set
  if @api_client.config.client_side_validation && monitor_id.nil?
    fail ArgumentError, "Missing the required parameter 'monitor_id' when calling DefaultApi.delete_watchlist_monitor"
  end
  # resource path
  local_var_path = '/watchlist_monitors/{monitor_id}'.sub('{' + 'monitor_id' + '}', CGI.escape(monitor_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.delete_watchlist_monitor",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#delete_watchlist_monitor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_webhook(webhook_id, opts = {}) ⇒ nil

Delete a webhook Deletes a webhook.

Parameters:

  • webhook_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


831
832
833
834
# File 'lib/onfido/api/default_api.rb', line 831

def delete_webhook(webhook_id, opts = {})
  delete_webhook_with_http_info(webhook_id, opts)
  nil
end

#delete_webhook_with_http_info(webhook_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a webhook Deletes a webhook.

Parameters:

  • webhook_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
# File 'lib/onfido/api/default_api.rb', line 841

def delete_webhook_with_http_info(webhook_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.delete_webhook ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling DefaultApi.delete_webhook"
  end
  # resource path
  local_var_path = '/webhooks/{webhook_id}'.sub('{' + 'webhook_id' + '}', CGI.escape(webhook_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.delete_webhook",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#delete_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_aes_document(workflow_run_id, id, opts = {}) ⇒ File

Retrieves the signed document or signing transaction receipt Retrieves the signed document or signing transaction receipt depending on the id provided.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run for which you want to retrieve the signed document.

  • id (String)

    The unique identifier of the file which you want to retrieve.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


895
896
897
898
# File 'lib/onfido/api/default_api.rb', line 895

def download_aes_document(workflow_run_id, id, opts = {})
  data, _status_code, _headers = download_aes_document_with_http_info(workflow_run_id, id, opts)
  data
end

#download_aes_document_with_http_info(workflow_run_id, id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Retrieves the signed document or signing transaction receipt Retrieves the signed document or signing transaction receipt depending on the id provided.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run for which you want to retrieve the signed document.

  • id (String)

    The unique identifier of the file which you want to retrieve.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
# File 'lib/onfido/api/default_api.rb', line 906

def download_aes_document_with_http_info(workflow_run_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.download_aes_document ...'
  end
  # verify the required parameter 'workflow_run_id' is set
  if @api_client.config.client_side_validation && workflow_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_run_id' when calling DefaultApi.download_aes_document"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.download_aes_document"
  end
  # resource path
  local_var_path = '/advanced_electronic_signature/documents'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'workflow_run_id'] = workflow_run_id
  query_params[:'id'] = id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.download_aes_document",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download_aes_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_check(check_id, opts = {}) ⇒ File

Download check Downloads a PDF of a check with a given check ID. Returns the binary data representing the PDF.

Parameters:

  • check_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


965
966
967
968
# File 'lib/onfido/api/default_api.rb', line 965

def download_check(check_id, opts = {})
  data, _status_code, _headers = download_check_with_http_info(check_id, opts)
  data
end

#download_check_with_http_info(check_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Download check Downloads a PDF of a check with a given check ID. Returns the binary data representing the PDF.

Parameters:

  • check_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
# File 'lib/onfido/api/default_api.rb', line 975

def download_check_with_http_info(check_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.download_check ...'
  end
  # verify the required parameter 'check_id' is set
  if @api_client.config.client_side_validation && check_id.nil?
    fail ArgumentError, "Missing the required parameter 'check_id' when calling DefaultApi.download_check"
  end
  # resource path
  local_var_path = '/checks/{check_id}/download'.sub('{' + 'check_id' + '}', CGI.escape(check_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.download_check",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_document(document_id, opts = {}) ⇒ File

Download document Downloads specific documents belonging to an applicant. If successful, the response will be the binary data representing the image.

Parameters:

  • document_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1028
1029
1030
1031
# File 'lib/onfido/api/default_api.rb', line 1028

def download_document(document_id, opts = {})
  data, _status_code, _headers = download_document_with_http_info(document_id, opts)
  data
end

#download_document_video(document_id, opts = {}) ⇒ File

Download document video Downloads a document video. If successful, the response will be the binary data representing the video.

Parameters:

  • document_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1091
1092
1093
1094
# File 'lib/onfido/api/default_api.rb', line 1091

def download_document_video(document_id, opts = {})
  data, _status_code, _headers = download_document_video_with_http_info(document_id, opts)
  data
end

#download_document_video_with_http_info(document_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Download document video Downloads a document video. If successful, the response will be the binary data representing the video.

Parameters:

  • document_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
# File 'lib/onfido/api/default_api.rb', line 1101

def download_document_video_with_http_info(document_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.download_document_video ...'
  end
  # verify the required parameter 'document_id' is set
  if @api_client.config.client_side_validation && document_id.nil?
    fail ArgumentError, "Missing the required parameter 'document_id' when calling DefaultApi.download_document_video"
  end
  # resource path
  local_var_path = '/documents/{document_id}/video/download'.sub('{' + 'document_id' + '}', CGI.escape(document_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.download_document_video",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download_document_video\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_document_with_http_info(document_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Download document Downloads specific documents belonging to an applicant. If successful, the response will be the binary data representing the image.

Parameters:

  • document_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
# File 'lib/onfido/api/default_api.rb', line 1038

def download_document_with_http_info(document_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.download_document ...'
  end
  # verify the required parameter 'document_id' is set
  if @api_client.config.client_side_validation && document_id.nil?
    fail ArgumentError, "Missing the required parameter 'document_id' when calling DefaultApi.download_document"
  end
  # resource path
  local_var_path = '/documents/{document_id}/download'.sub('{' + 'document_id' + '}', CGI.escape(document_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.download_document",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_evidence_folder(workflow_run_id, opts = {}) ⇒ File

Retrieve Workflow Run Evidence Folder Retrieves the evidence folder for the designated Workflow Run

Parameters:

  • workflow_run_id (String)

    Workflow Run ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1154
1155
1156
1157
# File 'lib/onfido/api/default_api.rb', line 1154

def download_evidence_folder(workflow_run_id, opts = {})
  data, _status_code, _headers = download_evidence_folder_with_http_info(workflow_run_id, opts)
  data
end

#download_evidence_folder_with_http_info(workflow_run_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Retrieve Workflow Run Evidence Folder Retrieves the evidence folder for the designated Workflow Run

Parameters:

  • workflow_run_id (String)

    Workflow Run ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
# File 'lib/onfido/api/default_api.rb', line 1164

def download_evidence_folder_with_http_info(workflow_run_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.download_evidence_folder ...'
  end
  # verify the required parameter 'workflow_run_id' is set
  if @api_client.config.client_side_validation && workflow_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_run_id' when calling DefaultApi.download_evidence_folder"
  end
  # resource path
  local_var_path = '/workflow_runs/{workflow_run_id}/evidence_folder'.sub('{' + 'workflow_run_id' + '}', CGI.escape(workflow_run_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/zip', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.download_evidence_folder",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download_evidence_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_id_photo(id_photo_id, opts = {}) ⇒ File

Download ID photo ID photos are downloaded using this endpoint.

Parameters:

  • id_photo_id (String)

    The ID photo&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1217
1218
1219
1220
# File 'lib/onfido/api/default_api.rb', line 1217

def download_id_photo(id_photo_id, opts = {})
  data, _status_code, _headers = download_id_photo_with_http_info(id_photo_id, opts)
  data
end

#download_id_photo_with_http_info(id_photo_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Download ID photo ID photos are downloaded using this endpoint.

Parameters:

  • id_photo_id (String)

    The ID photo&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
# File 'lib/onfido/api/default_api.rb', line 1227

def download_id_photo_with_http_info(id_photo_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.download_id_photo ...'
  end
  # verify the required parameter 'id_photo_id' is set
  if @api_client.config.client_side_validation && id_photo_id.nil?
    fail ArgumentError, "Missing the required parameter 'id_photo_id' when calling DefaultApi.download_id_photo"
  end
  # resource path
  local_var_path = '/id_photos/{id_photo_id}/download'.sub('{' + 'id_photo_id' + '}', CGI.escape(id_photo_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.download_id_photo",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download_id_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_live_photo(live_photo_id, opts = {}) ⇒ File

Download live photo Live photos are downloaded using this endpoint.

Parameters:

  • live_photo_id (String)

    The live photo&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1280
1281
1282
1283
# File 'lib/onfido/api/default_api.rb', line 1280

def download_live_photo(live_photo_id, opts = {})
  data, _status_code, _headers = download_live_photo_with_http_info(live_photo_id, opts)
  data
end

#download_live_photo_with_http_info(live_photo_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Download live photo Live photos are downloaded using this endpoint.

Parameters:

  • live_photo_id (String)

    The live photo&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
# File 'lib/onfido/api/default_api.rb', line 1290

def download_live_photo_with_http_info(live_photo_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.download_live_photo ...'
  end
  # verify the required parameter 'live_photo_id' is set
  if @api_client.config.client_side_validation && live_photo_id.nil?
    fail ArgumentError, "Missing the required parameter 'live_photo_id' when calling DefaultApi.download_live_photo"
  end
  # resource path
  local_var_path = '/live_photos/{live_photo_id}/download'.sub('{' + 'live_photo_id' + '}', CGI.escape(live_photo_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.download_live_photo",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download_live_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_live_video(live_video_id, opts = {}) ⇒ File

Download live video Live videos are downloaded using this endpoint.

Parameters:

  • live_video_id (String)

    The live video&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1343
1344
1345
1346
# File 'lib/onfido/api/default_api.rb', line 1343

def download_live_video(live_video_id, opts = {})
  data, _status_code, _headers = download_live_video_with_http_info(live_video_id, opts)
  data
end

#download_live_video_frame(live_video_id, opts = {}) ⇒ File

Download live video frame Returns the binary data representing a single frame from a live video.

Parameters:

  • live_video_id (String)

    The live video&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1406
1407
1408
1409
# File 'lib/onfido/api/default_api.rb', line 1406

def download_live_video_frame(live_video_id, opts = {})
  data, _status_code, _headers = download_live_video_frame_with_http_info(live_video_id, opts)
  data
end

#download_live_video_frame_with_http_info(live_video_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Download live video frame Returns the binary data representing a single frame from a live video.

Parameters:

  • live_video_id (String)

    The live video&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
# File 'lib/onfido/api/default_api.rb', line 1416

def download_live_video_frame_with_http_info(live_video_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.download_live_video_frame ...'
  end
  # verify the required parameter 'live_video_id' is set
  if @api_client.config.client_side_validation && live_video_id.nil?
    fail ArgumentError, "Missing the required parameter 'live_video_id' when calling DefaultApi.download_live_video_frame"
  end
  # resource path
  local_var_path = '/live_videos/{live_video_id}/frame'.sub('{' + 'live_video_id' + '}', CGI.escape(live_video_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.download_live_video_frame",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download_live_video_frame\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_live_video_with_http_info(live_video_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Download live video Live videos are downloaded using this endpoint.

Parameters:

  • live_video_id (String)

    The live video&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
# File 'lib/onfido/api/default_api.rb', line 1353

def download_live_video_with_http_info(live_video_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.download_live_video ...'
  end
  # verify the required parameter 'live_video_id' is set
  if @api_client.config.client_side_validation && live_video_id.nil?
    fail ArgumentError, "Missing the required parameter 'live_video_id' when calling DefaultApi.download_live_video"
  end
  # resource path
  local_var_path = '/live_videos/{live_video_id}/download'.sub('{' + 'live_video_id' + '}', CGI.escape(live_video_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.download_live_video",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download_live_video\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_motion_capture(motion_capture_id, opts = {}) ⇒ File

Download motion capture Motion captures are downloaded using this endpoint.

Parameters:

  • motion_capture_id (String)

    The motion capture&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1469
1470
1471
1472
# File 'lib/onfido/api/default_api.rb', line 1469

def download_motion_capture(motion_capture_id, opts = {})
  data, _status_code, _headers = download_motion_capture_with_http_info(motion_capture_id, opts)
  data
end

#download_motion_capture_frame(motion_capture_id, opts = {}) ⇒ File

Download motion capture frame Instead of the whole capture binary, a single frame can be downloaded using this endpoint. Returns the binary data representing the frame.

Parameters:

  • motion_capture_id (String)

    The motion capture&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1532
1533
1534
1535
# File 'lib/onfido/api/default_api.rb', line 1532

def download_motion_capture_frame(motion_capture_id, opts = {})
  data, _status_code, _headers = download_motion_capture_frame_with_http_info(motion_capture_id, opts)
  data
end

#download_motion_capture_frame_with_http_info(motion_capture_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Download motion capture frame Instead of the whole capture binary, a single frame can be downloaded using this endpoint. Returns the binary data representing the frame.

Parameters:

  • motion_capture_id (String)

    The motion capture&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
# File 'lib/onfido/api/default_api.rb', line 1542

def download_motion_capture_frame_with_http_info(motion_capture_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.download_motion_capture_frame ...'
  end
  # verify the required parameter 'motion_capture_id' is set
  if @api_client.config.client_side_validation && motion_capture_id.nil?
    fail ArgumentError, "Missing the required parameter 'motion_capture_id' when calling DefaultApi.download_motion_capture_frame"
  end
  # resource path
  local_var_path = '/motion_captures/{motion_capture_id}/frame'.sub('{' + 'motion_capture_id' + '}', CGI.escape(motion_capture_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.download_motion_capture_frame",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download_motion_capture_frame\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_motion_capture_with_http_info(motion_capture_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Download motion capture Motion captures are downloaded using this endpoint.

Parameters:

  • motion_capture_id (String)

    The motion capture&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
# File 'lib/onfido/api/default_api.rb', line 1479

def download_motion_capture_with_http_info(motion_capture_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.download_motion_capture ...'
  end
  # verify the required parameter 'motion_capture_id' is set
  if @api_client.config.client_side_validation && motion_capture_id.nil?
    fail ArgumentError, "Missing the required parameter 'motion_capture_id' when calling DefaultApi.download_motion_capture"
  end
  # resource path
  local_var_path = '/motion_captures/{motion_capture_id}/download'.sub('{' + 'motion_capture_id' + '}', CGI.escape(motion_capture_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.download_motion_capture",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download_motion_capture\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_nfc_face(document_id, opts = {}) ⇒ File

Download NFC face Downloads digital photos extracted from specific documents belonging to an applicant. If successful, the response will be the binary data representing the image.

Parameters:

  • document_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1595
1596
1597
1598
# File 'lib/onfido/api/default_api.rb', line 1595

def download_nfc_face(document_id, opts = {})
  data, _status_code, _headers = download_nfc_face_with_http_info(document_id, opts)
  data
end

#download_nfc_face_with_http_info(document_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Download NFC face Downloads digital photos extracted from specific documents belonging to an applicant. If successful, the response will be the binary data representing the image.

Parameters:

  • document_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
# File 'lib/onfido/api/default_api.rb', line 1605

def download_nfc_face_with_http_info(document_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.download_nfc_face ...'
  end
  # verify the required parameter 'document_id' is set
  if @api_client.config.client_side_validation && document_id.nil?
    fail ArgumentError, "Missing the required parameter 'document_id' when calling DefaultApi.download_nfc_face"
  end
  # resource path
  local_var_path = '/documents/{document_id}/nfc_face'.sub('{' + 'document_id' + '}', CGI.escape(document_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.download_nfc_face",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download_nfc_face\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_qes_document(workflow_run_id, file_id, opts = {}) ⇒ File

Retrieves the signed document or application form Retrieves the signed document or application form depending on the file_id provided.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run for which you want to retrieve the signed document.

  • file_id (String)

    The unique identifier of the file which you want to retrieve.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1659
1660
1661
1662
# File 'lib/onfido/api/default_api.rb', line 1659

def download_qes_document(workflow_run_id, file_id, opts = {})
  data, _status_code, _headers = download_qes_document_with_http_info(workflow_run_id, file_id, opts)
  data
end

#download_qes_document_with_http_info(workflow_run_id, file_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Retrieves the signed document or application form Retrieves the signed document or application form depending on the file_id provided.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run for which you want to retrieve the signed document.

  • file_id (String)

    The unique identifier of the file which you want to retrieve.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
# File 'lib/onfido/api/default_api.rb', line 1670

def download_qes_document_with_http_info(workflow_run_id, file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.download_qes_document ...'
  end
  # verify the required parameter 'workflow_run_id' is set
  if @api_client.config.client_side_validation && workflow_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_run_id' when calling DefaultApi.download_qes_document"
  end
  # verify the required parameter 'file_id' is set
  if @api_client.config.client_side_validation && file_id.nil?
    fail ArgumentError, "Missing the required parameter 'file_id' when calling DefaultApi.download_qes_document"
  end
  # resource path
  local_var_path = '/qualified_electronic_signature/documents'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'workflow_run_id'] = workflow_run_id
  query_params[:'file_id'] = file_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.download_qes_document",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download_qes_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_ses_document(workflow_run_id, id, opts = {}) ⇒ File

Retrieves the signed document or signing transaction receipt Retrieves the signed document or signing transaction receipt depending on the id provided.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run for which you want to retrieve the signed document.

  • id (String)

    The unique identifier of the file which you want to retrieve.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1730
1731
1732
1733
# File 'lib/onfido/api/default_api.rb', line 1730

def download_ses_document(workflow_run_id, id, opts = {})
  data, _status_code, _headers = download_ses_document_with_http_info(workflow_run_id, id, opts)
  data
end

#download_ses_document_with_http_info(workflow_run_id, id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Retrieves the signed document or signing transaction receipt Retrieves the signed document or signing transaction receipt depending on the id provided.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run for which you want to retrieve the signed document.

  • id (String)

    The unique identifier of the file which you want to retrieve.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
# File 'lib/onfido/api/default_api.rb', line 1741

def download_ses_document_with_http_info(workflow_run_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.download_ses_document ...'
  end
  # verify the required parameter 'workflow_run_id' is set
  if @api_client.config.client_side_validation && workflow_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_run_id' when calling DefaultApi.download_ses_document"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.download_ses_document"
  end
  # resource path
  local_var_path = '/simple_electronic_signature/documents'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'workflow_run_id'] = workflow_run_id
  query_params[:'id'] = id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.download_ses_document",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download_ses_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_signed_evidence_file(workflow_run_id, opts = {}) ⇒ File

Retrieve Workflow Run Evidence Summary File Retrieves the signed evidence file for the designated Workflow Run

Parameters:

  • workflow_run_id (String)

    Workflow Run ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1800
1801
1802
1803
# File 'lib/onfido/api/default_api.rb', line 1800

def download_signed_evidence_file(workflow_run_id, opts = {})
  data, _status_code, _headers = download_signed_evidence_file_with_http_info(workflow_run_id, opts)
  data
end

#download_signed_evidence_file_with_http_info(workflow_run_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Retrieve Workflow Run Evidence Summary File Retrieves the signed evidence file for the designated Workflow Run

Parameters:

  • workflow_run_id (String)

    Workflow Run ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
# File 'lib/onfido/api/default_api.rb', line 1810

def download_signed_evidence_file_with_http_info(workflow_run_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.download_signed_evidence_file ...'
  end
  # verify the required parameter 'workflow_run_id' is set
  if @api_client.config.client_side_validation && workflow_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_run_id' when calling DefaultApi.download_signed_evidence_file"
  end
  # resource path
  local_var_path = '/workflow_runs/{workflow_run_id}/signed_evidence_file'.sub('{' + 'workflow_run_id' + '}', CGI.escape(workflow_run_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.download_signed_evidence_file",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download_signed_evidence_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_signing_document(signing_document_id, opts = {}) ⇒ File

Download signing document Downloads specific signing documents belonging to an applicant. If successful, the response will be the binary data representing the pdf.

Parameters:

  • signing_document_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1863
1864
1865
1866
# File 'lib/onfido/api/default_api.rb', line 1863

def download_signing_document(signing_document_id, opts = {})
  data, _status_code, _headers = download_signing_document_with_http_info(signing_document_id, opts)
  data
end

#download_signing_document_with_http_info(signing_document_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Download signing document Downloads specific signing documents belonging to an applicant. If successful, the response will be the binary data representing the pdf.

Parameters:

  • signing_document_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
# File 'lib/onfido/api/default_api.rb', line 1873

def download_signing_document_with_http_info(signing_document_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.download_signing_document ...'
  end
  # verify the required parameter 'signing_document_id' is set
  if @api_client.config.client_side_validation && signing_document_id.nil?
    fail ArgumentError, "Missing the required parameter 'signing_document_id' when calling DefaultApi.download_signing_document"
  end
  # resource path
  local_var_path = '/signing_documents/{signing_document_id}/download'.sub('{' + 'signing_document_id' + '}', CGI.escape(signing_document_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.download_signing_document",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download_signing_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#extract(extract_request, opts = {}) ⇒ Extraction

Autofill Extract information from a document

Parameters:

  • extract_request (ExtractRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1926
1927
1928
1929
# File 'lib/onfido/api/default_api.rb', line 1926

def extract(extract_request, opts = {})
  data, _status_code, _headers = extract_with_http_info(extract_request, opts)
  data
end

#extract_with_http_info(extract_request, opts = {}) ⇒ Array<(Extraction, Integer, Hash)>

Autofill Extract information from a document

Parameters:

  • extract_request (ExtractRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Extraction, Integer, Hash)>)

    Extraction data, response status code and response headers



1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
# File 'lib/onfido/api/default_api.rb', line 1936

def extract_with_http_info(extract_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.extract ...'
  end
  # verify the required parameter 'extract_request' is set
  if @api_client.config.client_side_validation && extract_request.nil?
    fail ArgumentError, "Missing the required parameter 'extract_request' when calling DefaultApi.extract"
  end
  # resource path
  local_var_path = '/extractions'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(extract_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Extraction'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.extract",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#extract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_addresses(postcode, opts = {}) ⇒ AddressesList

Address Picker Search for addresses by postcode

Parameters:

  • postcode (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1994
1995
1996
1997
# File 'lib/onfido/api/default_api.rb', line 1994

def find_addresses(postcode, opts = {})
  data, _status_code, _headers = find_addresses_with_http_info(postcode, opts)
  data
end

#find_addresses_with_http_info(postcode, opts = {}) ⇒ Array<(AddressesList, Integer, Hash)>

Address Picker Search for addresses by postcode

Parameters:

  • postcode (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AddressesList, Integer, Hash)>)

    AddressesList data, response status code and response headers



2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
# File 'lib/onfido/api/default_api.rb', line 2004

def find_addresses_with_http_info(postcode, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_addresses ...'
  end
  # verify the required parameter 'postcode' is set
  if @api_client.config.client_side_validation && postcode.nil?
    fail ArgumentError, "Missing the required parameter 'postcode' when calling DefaultApi.find_addresses"
  end
  # resource path
  local_var_path = '/addresses/pick'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'postcode'] = postcode

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AddressesList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_addresses",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_applicant(applicant_id, opts = {}) ⇒ Applicant

Retrieve Applicant Retrieves a single applicant. Returns an applicant object.

Parameters:

  • applicant_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2058
2059
2060
2061
# File 'lib/onfido/api/default_api.rb', line 2058

def find_applicant(applicant_id, opts = {})
  data, _status_code, _headers = find_applicant_with_http_info(applicant_id, opts)
  data
end

#find_applicant_consents(applicant_id, opts = {}) ⇒ Array<ApplicantConsent>

Retrieve Applicant Consents Retrieves consents for single applicant.

Parameters:

  • applicant_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2121
2122
2123
2124
# File 'lib/onfido/api/default_api.rb', line 2121

def find_applicant_consents(applicant_id, opts = {})
  data, _status_code, _headers = find_applicant_consents_with_http_info(applicant_id, opts)
  data
end

#find_applicant_consents_with_http_info(applicant_id, opts = {}) ⇒ Array<(Array<ApplicantConsent>, Integer, Hash)>

Retrieve Applicant Consents Retrieves consents for single applicant.

Parameters:

  • applicant_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<ApplicantConsent>, Integer, Hash)>)

    Array<ApplicantConsent> data, response status code and response headers



2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
# File 'lib/onfido/api/default_api.rb', line 2131

def find_applicant_consents_with_http_info(applicant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_applicant_consents ...'
  end
  # verify the required parameter 'applicant_id' is set
  if @api_client.config.client_side_validation && applicant_id.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_id' when calling DefaultApi.find_applicant_consents"
  end
  # resource path
  local_var_path = '/applicants/{applicant_id}/consents'.sub('{' + 'applicant_id' + '}', CGI.escape(applicant_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<ApplicantConsent>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_applicant_consents",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_applicant_consents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_applicant_with_http_info(applicant_id, opts = {}) ⇒ Array<(Applicant, Integer, Hash)>

Retrieve Applicant Retrieves a single applicant. Returns an applicant object.

Parameters:

  • applicant_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Applicant, Integer, Hash)>)

    Applicant data, response status code and response headers



2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
# File 'lib/onfido/api/default_api.rb', line 2068

def find_applicant_with_http_info(applicant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_applicant ...'
  end
  # verify the required parameter 'applicant_id' is set
  if @api_client.config.client_side_validation && applicant_id.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_id' when calling DefaultApi.find_applicant"
  end
  # resource path
  local_var_path = '/applicants/{applicant_id}'.sub('{' + 'applicant_id' + '}', CGI.escape(applicant_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Applicant'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_applicant",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_applicant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_check(check_id, opts = {}) ⇒ Check

Retrieve a Check Retrieves a single check. Returns a check object.

Parameters:

  • check_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2184
2185
2186
2187
# File 'lib/onfido/api/default_api.rb', line 2184

def find_check(check_id, opts = {})
  data, _status_code, _headers = find_check_with_http_info(check_id, opts)
  data
end

#find_check_with_http_info(check_id, opts = {}) ⇒ Array<(Check, Integer, Hash)>

Retrieve a Check Retrieves a single check. Returns a check object.

Parameters:

  • check_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Check, Integer, Hash)>)

    Check data, response status code and response headers



2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
# File 'lib/onfido/api/default_api.rb', line 2194

def find_check_with_http_info(check_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_check ...'
  end
  # verify the required parameter 'check_id' is set
  if @api_client.config.client_side_validation && check_id.nil?
    fail ArgumentError, "Missing the required parameter 'check_id' when calling DefaultApi.find_check"
  end
  # resource path
  local_var_path = '/checks/{check_id}'.sub('{' + 'check_id' + '}', CGI.escape(check_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Check'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_check",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_document(document_id, opts = {}) ⇒ Document

Retrieve document A single document can be retrieved by calling this endpoint with the document’s unique identifier.

Parameters:

  • document_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2247
2248
2249
2250
# File 'lib/onfido/api/default_api.rb', line 2247

def find_document(document_id, opts = {})
  data, _status_code, _headers = find_document_with_http_info(document_id, opts)
  data
end

#find_document_with_http_info(document_id, opts = {}) ⇒ Array<(Document, Integer, Hash)>

Retrieve document A single document can be retrieved by calling this endpoint with the document&#39;s unique identifier.

Parameters:

  • document_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Document, Integer, Hash)>)

    Document data, response status code and response headers



2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
# File 'lib/onfido/api/default_api.rb', line 2257

def find_document_with_http_info(document_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_document ...'
  end
  # verify the required parameter 'document_id' is set
  if @api_client.config.client_side_validation && document_id.nil?
    fail ArgumentError, "Missing the required parameter 'document_id' when calling DefaultApi.find_document"
  end
  # resource path
  local_var_path = '/documents/{document_id}'.sub('{' + 'document_id' + '}', CGI.escape(document_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Document'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_document",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_id_photo(id_photo_id, opts = {}) ⇒ IdPhoto

Retrieve ID photo Retrieves a single ID photo. Returns a ID photo object.

Parameters:

  • id_photo_id (String)

    The ID photo&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2310
2311
2312
2313
# File 'lib/onfido/api/default_api.rb', line 2310

def find_id_photo(id_photo_id, opts = {})
  data, _status_code, _headers = find_id_photo_with_http_info(id_photo_id, opts)
  data
end

#find_id_photo_with_http_info(id_photo_id, opts = {}) ⇒ Array<(IdPhoto, Integer, Hash)>

Retrieve ID photo Retrieves a single ID photo. Returns a ID photo object.

Parameters:

  • id_photo_id (String)

    The ID photo&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(IdPhoto, Integer, Hash)>)

    IdPhoto data, response status code and response headers



2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
# File 'lib/onfido/api/default_api.rb', line 2320

def find_id_photo_with_http_info(id_photo_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_id_photo ...'
  end
  # verify the required parameter 'id_photo_id' is set
  if @api_client.config.client_side_validation && id_photo_id.nil?
    fail ArgumentError, "Missing the required parameter 'id_photo_id' when calling DefaultApi.find_id_photo"
  end
  # resource path
  local_var_path = '/id_photos/{id_photo_id}'.sub('{' + 'id_photo_id' + '}', CGI.escape(id_photo_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'IdPhoto'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_id_photo",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_id_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_live_photo(live_photo_id, opts = {}) ⇒ LivePhoto

Retrieve live photo Retrieves a single live photo. Returns a live photo object.

Parameters:

  • live_photo_id (String)

    The live photo&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2373
2374
2375
2376
# File 'lib/onfido/api/default_api.rb', line 2373

def find_live_photo(live_photo_id, opts = {})
  data, _status_code, _headers = find_live_photo_with_http_info(live_photo_id, opts)
  data
end

#find_live_photo_with_http_info(live_photo_id, opts = {}) ⇒ Array<(LivePhoto, Integer, Hash)>

Retrieve live photo Retrieves a single live photo. Returns a live photo object.

Parameters:

  • live_photo_id (String)

    The live photo&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LivePhoto, Integer, Hash)>)

    LivePhoto data, response status code and response headers



2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
# File 'lib/onfido/api/default_api.rb', line 2383

def find_live_photo_with_http_info(live_photo_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_live_photo ...'
  end
  # verify the required parameter 'live_photo_id' is set
  if @api_client.config.client_side_validation && live_photo_id.nil?
    fail ArgumentError, "Missing the required parameter 'live_photo_id' when calling DefaultApi.find_live_photo"
  end
  # resource path
  local_var_path = '/live_photos/{live_photo_id}'.sub('{' + 'live_photo_id' + '}', CGI.escape(live_photo_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LivePhoto'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_live_photo",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_live_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_live_video(live_video_id, opts = {}) ⇒ LiveVideo

Retrieve live video Retrieves a single live video. Returns the corresponding live video object.

Parameters:

  • live_video_id (String)

    The live video&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2436
2437
2438
2439
# File 'lib/onfido/api/default_api.rb', line 2436

def find_live_video(live_video_id, opts = {})
  data, _status_code, _headers = find_live_video_with_http_info(live_video_id, opts)
  data
end

#find_live_video_with_http_info(live_video_id, opts = {}) ⇒ Array<(LiveVideo, Integer, Hash)>

Retrieve live video Retrieves a single live video. Returns the corresponding live video object.

Parameters:

  • live_video_id (String)

    The live video&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LiveVideo, Integer, Hash)>)

    LiveVideo data, response status code and response headers



2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
# File 'lib/onfido/api/default_api.rb', line 2446

def find_live_video_with_http_info(live_video_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_live_video ...'
  end
  # verify the required parameter 'live_video_id' is set
  if @api_client.config.client_side_validation && live_video_id.nil?
    fail ArgumentError, "Missing the required parameter 'live_video_id' when calling DefaultApi.find_live_video"
  end
  # resource path
  local_var_path = '/live_videos/{live_video_id}'.sub('{' + 'live_video_id' + '}', CGI.escape(live_video_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LiveVideo'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_live_video",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_live_video\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_motion_capture(motion_capture_id, opts = {}) ⇒ MotionCapture

Retrieve motion capture Retrieves a single motion capture. Returns the corresponding motion capture object.

Parameters:

  • motion_capture_id (String)

    The motion capture&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2499
2500
2501
2502
# File 'lib/onfido/api/default_api.rb', line 2499

def find_motion_capture(motion_capture_id, opts = {})
  data, _status_code, _headers = find_motion_capture_with_http_info(motion_capture_id, opts)
  data
end

#find_motion_capture_with_http_info(motion_capture_id, opts = {}) ⇒ Array<(MotionCapture, Integer, Hash)>

Retrieve motion capture Retrieves a single motion capture. Returns the corresponding motion capture object.

Parameters:

  • motion_capture_id (String)

    The motion capture&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(MotionCapture, Integer, Hash)>)

    MotionCapture data, response status code and response headers



2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
# File 'lib/onfido/api/default_api.rb', line 2509

def find_motion_capture_with_http_info(motion_capture_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_motion_capture ...'
  end
  # verify the required parameter 'motion_capture_id' is set
  if @api_client.config.client_side_validation && motion_capture_id.nil?
    fail ArgumentError, "Missing the required parameter 'motion_capture_id' when calling DefaultApi.find_motion_capture"
  end
  # resource path
  local_var_path = '/motion_captures/{motion_capture_id}'.sub('{' + 'motion_capture_id' + '}', CGI.escape(motion_capture_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'MotionCapture'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_motion_capture",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_motion_capture\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_passkey(username, passkey_id, opts = {}) ⇒ Passkey

Retrieve passkey Returns a passkey’s details.

Parameters:

  • username (String)

    Username that owns the passkey.

  • passkey_id (String)

    Passkey ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2563
2564
2565
2566
# File 'lib/onfido/api/default_api.rb', line 2563

def find_passkey(username, passkey_id, opts = {})
  data, _status_code, _headers = find_passkey_with_http_info(username, passkey_id, opts)
  data
end

#find_passkey_with_http_info(username, passkey_id, opts = {}) ⇒ Array<(Passkey, Integer, Hash)>

Retrieve passkey Returns a passkey&#39;s details.

Parameters:

  • username (String)

    Username that owns the passkey.

  • passkey_id (String)

    Passkey ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Passkey, Integer, Hash)>)

    Passkey data, response status code and response headers



2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
# File 'lib/onfido/api/default_api.rb', line 2574

def find_passkey_with_http_info(username, passkey_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_passkey ...'
  end
  # verify the required parameter 'username' is set
  if @api_client.config.client_side_validation && username.nil?
    fail ArgumentError, "Missing the required parameter 'username' when calling DefaultApi.find_passkey"
  end
  # verify the required parameter 'passkey_id' is set
  if @api_client.config.client_side_validation && passkey_id.nil?
    fail ArgumentError, "Missing the required parameter 'passkey_id' when calling DefaultApi.find_passkey"
  end
  # resource path
  local_var_path = '/passkeys/{username}/{passkey_id}'.sub('{' + 'username' + '}', CGI.escape(username.to_s)).sub('{' + 'passkey_id' + '}', CGI.escape(passkey_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Passkey'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_passkey",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_passkey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_report(report_id, opts = {}) ⇒ Report

Retrieve report A single report can be retrieved using this endpoint with the corresponding unique identifier.

Parameters:

  • report_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2631
2632
2633
2634
# File 'lib/onfido/api/default_api.rb', line 2631

def find_report(report_id, opts = {})
  data, _status_code, _headers = find_report_with_http_info(report_id, opts)
  data
end

#find_report_with_http_info(report_id, opts = {}) ⇒ Array<(Report, Integer, Hash)>

Retrieve report A single report can be retrieved using this endpoint with the corresponding unique identifier.

Parameters:

  • report_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Report, Integer, Hash)>)

    Report data, response status code and response headers



2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
# File 'lib/onfido/api/default_api.rb', line 2641

def find_report_with_http_info(report_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_report ...'
  end
  # verify the required parameter 'report_id' is set
  if @api_client.config.client_side_validation && report_id.nil?
    fail ArgumentError, "Missing the required parameter 'report_id' when calling DefaultApi.find_report"
  end
  # resource path
  local_var_path = '/reports/{report_id}'.sub('{' + 'report_id' + '}', CGI.escape(report_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Report'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_report",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_signing_document(signing_document_id, opts = {}) ⇒ SigningDocument

Retrieve signing document A single signing document can be retrieved by calling this endpoint with the signing document’s unique identifier.

Parameters:

  • signing_document_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2694
2695
2696
2697
# File 'lib/onfido/api/default_api.rb', line 2694

def find_signing_document(signing_document_id, opts = {})
  data, _status_code, _headers = find_signing_document_with_http_info(signing_document_id, opts)
  data
end

#find_signing_document_with_http_info(signing_document_id, opts = {}) ⇒ Array<(SigningDocument, Integer, Hash)>

Retrieve signing document A single signing document can be retrieved by calling this endpoint with the signing document&#39;s unique identifier.

Parameters:

  • signing_document_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SigningDocument, Integer, Hash)>)

    SigningDocument data, response status code and response headers



2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
# File 'lib/onfido/api/default_api.rb', line 2704

def find_signing_document_with_http_info(signing_document_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_signing_document ...'
  end
  # verify the required parameter 'signing_document_id' is set
  if @api_client.config.client_side_validation && signing_document_id.nil?
    fail ArgumentError, "Missing the required parameter 'signing_document_id' when calling DefaultApi.find_signing_document"
  end
  # resource path
  local_var_path = '/signing_documents/{signing_document_id}'.sub('{' + 'signing_document_id' + '}', CGI.escape(signing_document_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SigningDocument'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_signing_document",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_signing_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_task(workflow_run_id, task_id, opts = {}) ⇒ Task

Retrieve Task A single task can be retrieved by calling this endpoint with the unique identifier of the Task and Workflow Run.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run to which the Task belongs.

  • task_id (String)

    The identifier of the Task you want to retrieve.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2758
2759
2760
2761
# File 'lib/onfido/api/default_api.rb', line 2758

def find_task(workflow_run_id, task_id, opts = {})
  data, _status_code, _headers = find_task_with_http_info(workflow_run_id, task_id, opts)
  data
end

#find_task_with_http_info(workflow_run_id, task_id, opts = {}) ⇒ Array<(Task, Integer, Hash)>

Retrieve Task A single task can be retrieved by calling this endpoint with the unique identifier of the Task and Workflow Run.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run to which the Task belongs.

  • task_id (String)

    The identifier of the Task you want to retrieve.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Task, Integer, Hash)>)

    Task data, response status code and response headers



2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
# File 'lib/onfido/api/default_api.rb', line 2769

def find_task_with_http_info(workflow_run_id, task_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_task ...'
  end
  # verify the required parameter 'workflow_run_id' is set
  if @api_client.config.client_side_validation && workflow_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_run_id' when calling DefaultApi.find_task"
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling DefaultApi.find_task"
  end
  # resource path
  local_var_path = '/workflow_runs/{workflow_run_id}/tasks/{task_id}'.sub('{' + 'workflow_run_id' + '}', CGI.escape(workflow_run_id.to_s)).sub('{' + 'task_id' + '}', CGI.escape(task_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Task'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_task",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_timeline_file(workflow_run_id, timeline_file_id, opts = {}) ⇒ File

Retrieve Timeline File for Workflow Run Retrieves the Timeline File for the designated Workflow Run.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run.

  • timeline_file_id (String)

    The unique identifier for the Timefile File.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


2827
2828
2829
2830
# File 'lib/onfido/api/default_api.rb', line 2827

def find_timeline_file(workflow_run_id, timeline_file_id, opts = {})
  data, _status_code, _headers = find_timeline_file_with_http_info(workflow_run_id, timeline_file_id, opts)
  data
end

#find_timeline_file_with_http_info(workflow_run_id, timeline_file_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Retrieve Timeline File for Workflow Run Retrieves the Timeline File for the designated Workflow Run.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run.

  • timeline_file_id (String)

    The unique identifier for the Timefile File.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
# File 'lib/onfido/api/default_api.rb', line 2838

def find_timeline_file_with_http_info(workflow_run_id, timeline_file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_timeline_file ...'
  end
  # verify the required parameter 'workflow_run_id' is set
  if @api_client.config.client_side_validation && workflow_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_run_id' when calling DefaultApi.find_timeline_file"
  end
  # verify the required parameter 'timeline_file_id' is set
  if @api_client.config.client_side_validation && timeline_file_id.nil?
    fail ArgumentError, "Missing the required parameter 'timeline_file_id' when calling DefaultApi.find_timeline_file"
  end
  # resource path
  local_var_path = '/workflow_runs/{workflow_run_id}/timeline_file/{timeline_file_id}'.sub('{' + 'workflow_run_id' + '}', CGI.escape(workflow_run_id.to_s)).sub('{' + 'timeline_file_id' + '}', CGI.escape(timeline_file_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_timeline_file",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_timeline_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_watchlist_monitor(monitor_id, opts = {}) ⇒ WatchlistMonitor

Retrieve monitor Retrieves a single monitor

Parameters:

  • monitor_id (String)

    The watchlist monitor&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2895
2896
2897
2898
# File 'lib/onfido/api/default_api.rb', line 2895

def find_watchlist_monitor(monitor_id, opts = {})
  data, _status_code, _headers = find_watchlist_monitor_with_http_info(monitor_id, opts)
  data
end

#find_watchlist_monitor_with_http_info(monitor_id, opts = {}) ⇒ Array<(WatchlistMonitor, Integer, Hash)>

Retrieve monitor Retrieves a single monitor

Parameters:

  • monitor_id (String)

    The watchlist monitor&#39;s unique identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WatchlistMonitor, Integer, Hash)>)

    WatchlistMonitor data, response status code and response headers



2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
# File 'lib/onfido/api/default_api.rb', line 2905

def find_watchlist_monitor_with_http_info(monitor_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_watchlist_monitor ...'
  end
  # verify the required parameter 'monitor_id' is set
  if @api_client.config.client_side_validation && monitor_id.nil?
    fail ArgumentError, "Missing the required parameter 'monitor_id' when calling DefaultApi.find_watchlist_monitor"
  end
  # resource path
  local_var_path = '/watchlist_monitors/{monitor_id}'.sub('{' + 'monitor_id' + '}', CGI.escape(monitor_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'WatchlistMonitor'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_watchlist_monitor",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_watchlist_monitor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_webhook(webhook_id, opts = {}) ⇒ Webhook

Retrieve a Webhook Retrieves a single webhook. Returns a webhook object.

Parameters:

  • webhook_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2958
2959
2960
2961
# File 'lib/onfido/api/default_api.rb', line 2958

def find_webhook(webhook_id, opts = {})
  data, _status_code, _headers = find_webhook_with_http_info(webhook_id, opts)
  data
end

#find_webhook_with_http_info(webhook_id, opts = {}) ⇒ Array<(Webhook, Integer, Hash)>

Retrieve a Webhook Retrieves a single webhook. Returns a webhook object.

Parameters:

  • webhook_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Webhook, Integer, Hash)>)

    Webhook data, response status code and response headers



2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
# File 'lib/onfido/api/default_api.rb', line 2968

def find_webhook_with_http_info(webhook_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_webhook ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling DefaultApi.find_webhook"
  end
  # resource path
  local_var_path = '/webhooks/{webhook_id}'.sub('{' + 'webhook_id' + '}', CGI.escape(webhook_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Webhook'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_webhook",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_workflow_run(workflow_run_id, opts = {}) ⇒ WorkflowRun

Retrieve Workflow Run A single workflow run can be retrieved by calling this endpoint with the unique identifier of the Workflow Run.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3021
3022
3023
3024
# File 'lib/onfido/api/default_api.rb', line 3021

def find_workflow_run(workflow_run_id, opts = {})
  data, _status_code, _headers = find_workflow_run_with_http_info(workflow_run_id, opts)
  data
end

#find_workflow_run_with_http_info(workflow_run_id, opts = {}) ⇒ Array<(WorkflowRun, Integer, Hash)>

Retrieve Workflow Run A single workflow run can be retrieved by calling this endpoint with the unique identifier of the Workflow Run.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WorkflowRun, Integer, Hash)>)

    WorkflowRun data, response status code and response headers



3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
# File 'lib/onfido/api/default_api.rb', line 3031

def find_workflow_run_with_http_info(workflow_run_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.find_workflow_run ...'
  end
  # verify the required parameter 'workflow_run_id' is set
  if @api_client.config.client_side_validation && workflow_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_run_id' when calling DefaultApi.find_workflow_run"
  end
  # resource path
  local_var_path = '/workflow_runs/{workflow_run_id}'.sub('{' + 'workflow_run_id' + '}', CGI.escape(workflow_run_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'WorkflowRun'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.find_workflow_run",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#find_workflow_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#force_report_creation_from_watchlist_monitor(monitor_id, opts = {}) ⇒ nil

Force new report creation (BETA) Triggers a new check with an updated report to be generated by the monitor, as if the monitor had received an update.

Parameters:

  • monitor_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


3084
3085
3086
3087
# File 'lib/onfido/api/default_api.rb', line 3084

def force_report_creation_from_watchlist_monitor(monitor_id, opts = {})
  force_report_creation_from_watchlist_monitor_with_http_info(monitor_id, opts)
  nil
end

#force_report_creation_from_watchlist_monitor_with_http_info(monitor_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Force new report creation (BETA) Triggers a new check with an updated report to be generated by the monitor, as if the monitor had received an update.

Parameters:

  • monitor_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
# File 'lib/onfido/api/default_api.rb', line 3094

def force_report_creation_from_watchlist_monitor_with_http_info(monitor_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.force_report_creation_from_watchlist_monitor ...'
  end
  # verify the required parameter 'monitor_id' is set
  if @api_client.config.client_side_validation && monitor_id.nil?
    fail ArgumentError, "Missing the required parameter 'monitor_id' when calling DefaultApi.force_report_creation_from_watchlist_monitor"
  end
  # resource path
  local_var_path = '/watchlist_monitors/{monitor_id}/new_report'.sub('{' + 'monitor_id' + '}', CGI.escape(monitor_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.force_report_creation_from_watchlist_monitor",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#force_report_creation_from_watchlist_monitor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#generate_sdk_token(sdk_token_builder, opts = {}) ⇒ SdkToken

Generate a SDK token Generates an SDK token. Returns a token object containing the SDK token.

Parameters:

  • sdk_token_builder (SdkTokenBuilder)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3147
3148
3149
3150
# File 'lib/onfido/api/default_api.rb', line 3147

def generate_sdk_token(sdk_token_builder, opts = {})
  data, _status_code, _headers = generate_sdk_token_with_http_info(sdk_token_builder, opts)
  data
end

#generate_sdk_token_with_http_info(sdk_token_builder, opts = {}) ⇒ Array<(SdkToken, Integer, Hash)>

Generate a SDK token Generates an SDK token. Returns a token object containing the SDK token.

Parameters:

  • sdk_token_builder (SdkTokenBuilder)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SdkToken, Integer, Hash)>)

    SdkToken data, response status code and response headers



3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
# File 'lib/onfido/api/default_api.rb', line 3157

def generate_sdk_token_with_http_info(sdk_token_builder, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.generate_sdk_token ...'
  end
  # verify the required parameter 'sdk_token_builder' is set
  if @api_client.config.client_side_validation && sdk_token_builder.nil?
    fail ArgumentError, "Missing the required parameter 'sdk_token_builder' when calling DefaultApi.generate_sdk_token"
  end
  # resource path
  local_var_path = '/sdk_token'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(sdk_token_builder)

  # return_type
  return_type = opts[:debug_return_type] || 'SdkToken'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.generate_sdk_token",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#generate_sdk_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_applicants(opts = {}) ⇒ ApplicantsList

List Applicants Lists all applicants you’ve created, sorted by creation date in descending order.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page to return. The first page is &#x60;page&#x3D;1&#x60; (default to 1)

  • :per_page (Integer)

    The number of objects per page. (default to 20)

  • :include_deleted (Boolean)

    Whether to also include applicants scheduled for deletion. (default to false)

Returns:



3217
3218
3219
3220
# File 'lib/onfido/api/default_api.rb', line 3217

def list_applicants(opts = {})
  data, _status_code, _headers = list_applicants_with_http_info(opts)
  data
end

#list_applicants_with_http_info(opts = {}) ⇒ Array<(ApplicantsList, Integer, Hash)>

List Applicants Lists all applicants you&#39;ve created, sorted by creation date in descending order.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page to return. The first page is &#x60;page&#x3D;1&#x60; (default to 1)

  • :per_page (Integer)

    The number of objects per page. (default to 20)

  • :include_deleted (Boolean)

    Whether to also include applicants scheduled for deletion. (default to false)

Returns:

  • (Array<(ApplicantsList, Integer, Hash)>)

    ApplicantsList data, response status code and response headers



3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
# File 'lib/onfido/api/default_api.rb', line 3229

def list_applicants_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_applicants ...'
  end
  # resource path
  local_var_path = '/applicants'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
  query_params[:'include_deleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ApplicantsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.list_applicants",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_applicants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_checks(applicant_id, opts = {}) ⇒ ChecksList

Retrieve Checks Retrieves a single check. Returns a check object.

Parameters:

  • applicant_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3281
3282
3283
3284
# File 'lib/onfido/api/default_api.rb', line 3281

def list_checks(applicant_id, opts = {})
  data, _status_code, _headers = list_checks_with_http_info(applicant_id, opts)
  data
end

#list_checks_with_http_info(applicant_id, opts = {}) ⇒ Array<(ChecksList, Integer, Hash)>

Retrieve Checks Retrieves a single check. Returns a check object.

Parameters:

  • applicant_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ChecksList, Integer, Hash)>)

    ChecksList data, response status code and response headers



3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
# File 'lib/onfido/api/default_api.rb', line 3291

def list_checks_with_http_info(applicant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_checks ...'
  end
  # verify the required parameter 'applicant_id' is set
  if @api_client.config.client_side_validation && applicant_id.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_id' when calling DefaultApi.list_checks"
  end
  # resource path
  local_var_path = '/checks'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'applicant_id'] = applicant_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ChecksList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.list_checks",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_checks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_documents(applicant_id, opts = {}) ⇒ DocumentsList

List documents All documents belonging to an applicant can be listed from this endpoint

Parameters:

  • applicant_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3345
3346
3347
3348
# File 'lib/onfido/api/default_api.rb', line 3345

def list_documents(applicant_id, opts = {})
  data, _status_code, _headers = list_documents_with_http_info(applicant_id, opts)
  data
end

#list_documents_with_http_info(applicant_id, opts = {}) ⇒ Array<(DocumentsList, Integer, Hash)>

List documents All documents belonging to an applicant can be listed from this endpoint

Parameters:

  • applicant_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DocumentsList, Integer, Hash)>)

    DocumentsList data, response status code and response headers



3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
# File 'lib/onfido/api/default_api.rb', line 3355

def list_documents_with_http_info(applicant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_documents ...'
  end
  # verify the required parameter 'applicant_id' is set
  if @api_client.config.client_side_validation && applicant_id.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_id' when calling DefaultApi.list_documents"
  end
  # resource path
  local_var_path = '/documents'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'applicant_id'] = applicant_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DocumentsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.list_documents",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_id_photos(applicant_id, opts = {}) ⇒ IdPhotosList

List ID photos Lists the ID photos that belong to an applicant.

Parameters:

  • applicant_id (String)

    The id of the applicant the ID photos belong to.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3409
3410
3411
3412
# File 'lib/onfido/api/default_api.rb', line 3409

def list_id_photos(applicant_id, opts = {})
  data, _status_code, _headers = list_id_photos_with_http_info(applicant_id, opts)
  data
end

#list_id_photos_with_http_info(applicant_id, opts = {}) ⇒ Array<(IdPhotosList, Integer, Hash)>

List ID photos Lists the ID photos that belong to an applicant.

Parameters:

  • applicant_id (String)

    The id of the applicant the ID photos belong to.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(IdPhotosList, Integer, Hash)>)

    IdPhotosList data, response status code and response headers



3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
# File 'lib/onfido/api/default_api.rb', line 3419

def list_id_photos_with_http_info(applicant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_id_photos ...'
  end
  # verify the required parameter 'applicant_id' is set
  if @api_client.config.client_side_validation && applicant_id.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_id' when calling DefaultApi.list_id_photos"
  end
  # resource path
  local_var_path = '/id_photos'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'applicant_id'] = applicant_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'IdPhotosList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.list_id_photos",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_id_photos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_live_photos(applicant_id, opts = {}) ⇒ LivePhotosList

List live photos Lists the live photos that belong to an applicant.

Parameters:

  • applicant_id (String)

    The id of the applicant the live photos belong to.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3473
3474
3475
3476
# File 'lib/onfido/api/default_api.rb', line 3473

def list_live_photos(applicant_id, opts = {})
  data, _status_code, _headers = list_live_photos_with_http_info(applicant_id, opts)
  data
end

#list_live_photos_with_http_info(applicant_id, opts = {}) ⇒ Array<(LivePhotosList, Integer, Hash)>

List live photos Lists the live photos that belong to an applicant.

Parameters:

  • applicant_id (String)

    The id of the applicant the live photos belong to.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LivePhotosList, Integer, Hash)>)

    LivePhotosList data, response status code and response headers



3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
# File 'lib/onfido/api/default_api.rb', line 3483

def list_live_photos_with_http_info(applicant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_live_photos ...'
  end
  # verify the required parameter 'applicant_id' is set
  if @api_client.config.client_side_validation && applicant_id.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_id' when calling DefaultApi.list_live_photos"
  end
  # resource path
  local_var_path = '/live_photos'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'applicant_id'] = applicant_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LivePhotosList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.list_live_photos",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_live_photos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_live_videos(applicant_id, opts = {}) ⇒ LiveVideosList

List live videos Lists all the live videos that belong to an applicant.

Parameters:

  • applicant_id (String)

    The id of the applicant the live videos belong to.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3537
3538
3539
3540
# File 'lib/onfido/api/default_api.rb', line 3537

def list_live_videos(applicant_id, opts = {})
  data, _status_code, _headers = list_live_videos_with_http_info(applicant_id, opts)
  data
end

#list_live_videos_with_http_info(applicant_id, opts = {}) ⇒ Array<(LiveVideosList, Integer, Hash)>

List live videos Lists all the live videos that belong to an applicant.

Parameters:

  • applicant_id (String)

    The id of the applicant the live videos belong to.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LiveVideosList, Integer, Hash)>)

    LiveVideosList data, response status code and response headers



3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
# File 'lib/onfido/api/default_api.rb', line 3547

def list_live_videos_with_http_info(applicant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_live_videos ...'
  end
  # verify the required parameter 'applicant_id' is set
  if @api_client.config.client_side_validation && applicant_id.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_id' when calling DefaultApi.list_live_videos"
  end
  # resource path
  local_var_path = '/live_videos'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'applicant_id'] = applicant_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LiveVideosList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.list_live_videos",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_live_videos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_motion_captures(applicant_id, opts = {}) ⇒ MotionCapturesList

List motion captures Lists all the motion captures that belong to an applicant.

Parameters:

  • applicant_id (String)

    The id of the applicant the motion captures belong to.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3601
3602
3603
3604
# File 'lib/onfido/api/default_api.rb', line 3601

def list_motion_captures(applicant_id, opts = {})
  data, _status_code, _headers = list_motion_captures_with_http_info(applicant_id, opts)
  data
end

#list_motion_captures_with_http_info(applicant_id, opts = {}) ⇒ Array<(MotionCapturesList, Integer, Hash)>

List motion captures Lists all the motion captures that belong to an applicant.

Parameters:

  • applicant_id (String)

    The id of the applicant the motion captures belong to.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(MotionCapturesList, Integer, Hash)>)

    MotionCapturesList data, response status code and response headers



3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
# File 'lib/onfido/api/default_api.rb', line 3611

def list_motion_captures_with_http_info(applicant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_motion_captures ...'
  end
  # verify the required parameter 'applicant_id' is set
  if @api_client.config.client_side_validation && applicant_id.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_id' when calling DefaultApi.list_motion_captures"
  end
  # resource path
  local_var_path = '/motion_captures'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'applicant_id'] = applicant_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'MotionCapturesList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.list_motion_captures",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_motion_captures\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_passkeys(username, opts = {}) ⇒ PasskeysList

List passkeys Returns every passkey registered under the supplied username.

Parameters:

  • username (String)

    Username that owns the passkeys.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3665
3666
3667
3668
# File 'lib/onfido/api/default_api.rb', line 3665

def list_passkeys(username, opts = {})
  data, _status_code, _headers = list_passkeys_with_http_info(username, opts)
  data
end

#list_passkeys_with_http_info(username, opts = {}) ⇒ Array<(PasskeysList, Integer, Hash)>

List passkeys Returns every passkey registered under the supplied username.

Parameters:

  • username (String)

    Username that owns the passkeys.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PasskeysList, Integer, Hash)>)

    PasskeysList data, response status code and response headers



3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
# File 'lib/onfido/api/default_api.rb', line 3675

def list_passkeys_with_http_info(username, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_passkeys ...'
  end
  # verify the required parameter 'username' is set
  if @api_client.config.client_side_validation && username.nil?
    fail ArgumentError, "Missing the required parameter 'username' when calling DefaultApi.list_passkeys"
  end
  # resource path
  local_var_path = '/passkeys/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'PasskeysList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.list_passkeys",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_passkeys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_repeat_attempts(report_id, opts = {}) ⇒ RepeatAttemptsList

Retrieve repeat attempts Returns all repeat attempts for a given Document report

Parameters:

  • report_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3728
3729
3730
3731
# File 'lib/onfido/api/default_api.rb', line 3728

def list_repeat_attempts(report_id, opts = {})
  data, _status_code, _headers = list_repeat_attempts_with_http_info(report_id, opts)
  data
end

#list_repeat_attempts_with_http_info(report_id, opts = {}) ⇒ Array<(RepeatAttemptsList, Integer, Hash)>

Retrieve repeat attempts Returns all repeat attempts for a given Document report

Parameters:

  • report_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RepeatAttemptsList, Integer, Hash)>)

    RepeatAttemptsList data, response status code and response headers



3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
# File 'lib/onfido/api/default_api.rb', line 3738

def list_repeat_attempts_with_http_info(report_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_repeat_attempts ...'
  end
  # verify the required parameter 'report_id' is set
  if @api_client.config.client_side_validation && report_id.nil?
    fail ArgumentError, "Missing the required parameter 'report_id' when calling DefaultApi.list_repeat_attempts"
  end
  # resource path
  local_var_path = '/repeat_attempts/{report_id}'.sub('{' + 'report_id' + '}', CGI.escape(report_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'RepeatAttemptsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.list_repeat_attempts",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_repeat_attempts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_reports(check_id, opts = {}) ⇒ ReportsList

List reports All the reports belonging to a particular check can be listed from this endpoint.

Parameters:

  • check_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3791
3792
3793
3794
# File 'lib/onfido/api/default_api.rb', line 3791

def list_reports(check_id, opts = {})
  data, _status_code, _headers = list_reports_with_http_info(check_id, opts)
  data
end

#list_reports_with_http_info(check_id, opts = {}) ⇒ Array<(ReportsList, Integer, Hash)>

List reports All the reports belonging to a particular check can be listed from this endpoint.

Parameters:

  • check_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ReportsList, Integer, Hash)>)

    ReportsList data, response status code and response headers



3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
# File 'lib/onfido/api/default_api.rb', line 3801

def list_reports_with_http_info(check_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_reports ...'
  end
  # verify the required parameter 'check_id' is set
  if @api_client.config.client_side_validation && check_id.nil?
    fail ArgumentError, "Missing the required parameter 'check_id' when calling DefaultApi.list_reports"
  end
  # resource path
  local_var_path = '/reports'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'check_id'] = check_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ReportsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.list_reports",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_signing_documents(applicant_id, opts = {}) ⇒ SigningDocumentsList

List signing documents All signing documents belonging to an applicant can be listed from this endpoint

Parameters:

  • applicant_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3855
3856
3857
3858
# File 'lib/onfido/api/default_api.rb', line 3855

def list_signing_documents(applicant_id, opts = {})
  data, _status_code, _headers = list_signing_documents_with_http_info(applicant_id, opts)
  data
end

#list_signing_documents_with_http_info(applicant_id, opts = {}) ⇒ Array<(SigningDocumentsList, Integer, Hash)>

List signing documents All signing documents belonging to an applicant can be listed from this endpoint

Parameters:

  • applicant_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SigningDocumentsList, Integer, Hash)>)

    SigningDocumentsList data, response status code and response headers



3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
# File 'lib/onfido/api/default_api.rb', line 3865

def list_signing_documents_with_http_info(applicant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_signing_documents ...'
  end
  # verify the required parameter 'applicant_id' is set
  if @api_client.config.client_side_validation && applicant_id.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_id' when calling DefaultApi.list_signing_documents"
  end
  # resource path
  local_var_path = '/signing_documents'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'applicant_id'] = applicant_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SigningDocumentsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.list_signing_documents",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_signing_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_tasks(workflow_run_id, opts = {}) ⇒ Array<TaskItem>

List Tasks The tasks of a Workflow can be retrieved by calling this endpoint with the unique identifier of the Workflow Run.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run to which the Tasks belong.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3919
3920
3921
3922
# File 'lib/onfido/api/default_api.rb', line 3919

def list_tasks(workflow_run_id, opts = {})
  data, _status_code, _headers = list_tasks_with_http_info(workflow_run_id, opts)
  data
end

#list_tasks_with_http_info(workflow_run_id, opts = {}) ⇒ Array<(Array<TaskItem>, Integer, Hash)>

List Tasks The tasks of a Workflow can be retrieved by calling this endpoint with the unique identifier of the Workflow Run.

Parameters:

  • workflow_run_id (String)

    The unique identifier of the Workflow Run to which the Tasks belong.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<TaskItem>, Integer, Hash)>)

    Array<TaskItem> data, response status code and response headers



3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
# File 'lib/onfido/api/default_api.rb', line 3929

def list_tasks_with_http_info(workflow_run_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_tasks ...'
  end
  # verify the required parameter 'workflow_run_id' is set
  if @api_client.config.client_side_validation && workflow_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_run_id' when calling DefaultApi.list_tasks"
  end
  # resource path
  local_var_path = '/workflow_runs/{workflow_run_id}/tasks'.sub('{' + 'workflow_run_id' + '}', CGI.escape(workflow_run_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<TaskItem>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.list_tasks",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_watchlist_monitor_matches(monitor_id, opts = {}) ⇒ WatchlistMonitorMatchesList

List matches (BETA) List match IDs on this monitor, as well as their enabled/disabled status

Parameters:

  • monitor_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3982
3983
3984
3985
# File 'lib/onfido/api/default_api.rb', line 3982

def list_watchlist_monitor_matches(monitor_id, opts = {})
  data, _status_code, _headers = list_watchlist_monitor_matches_with_http_info(monitor_id, opts)
  data
end

#list_watchlist_monitor_matches_with_http_info(monitor_id, opts = {}) ⇒ Array<(WatchlistMonitorMatchesList, Integer, Hash)>

List matches (BETA) List match IDs on this monitor, as well as their enabled/disabled status

Parameters:

  • monitor_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WatchlistMonitorMatchesList, Integer, Hash)>)

    WatchlistMonitorMatchesList data, response status code and response headers



3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
# File 'lib/onfido/api/default_api.rb', line 3992

def list_watchlist_monitor_matches_with_http_info(monitor_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_watchlist_monitor_matches ...'
  end
  # verify the required parameter 'monitor_id' is set
  if @api_client.config.client_side_validation && monitor_id.nil?
    fail ArgumentError, "Missing the required parameter 'monitor_id' when calling DefaultApi.list_watchlist_monitor_matches"
  end
  # resource path
  local_var_path = '/watchlist_monitors/{monitor_id}/matches'.sub('{' + 'monitor_id' + '}', CGI.escape(monitor_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'WatchlistMonitorMatchesList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.list_watchlist_monitor_matches",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_watchlist_monitor_matches\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_watchlist_monitors(applicant_id, opts = {}) ⇒ WatchlistMonitorsList

List monitors List all available monitors for an applicant

Parameters:

  • applicant_id (String)

    The id of the applicant the watchlist monitors belong to. If omitted, all monitors for the account will be listed.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_deleted (Boolean)

    Whether to also include deleted (inactive) monitors. (default to false)

Returns:



4046
4047
4048
4049
# File 'lib/onfido/api/default_api.rb', line 4046

def list_watchlist_monitors(applicant_id, opts = {})
  data, _status_code, _headers = list_watchlist_monitors_with_http_info(applicant_id, opts)
  data
end

#list_watchlist_monitors_with_http_info(applicant_id, opts = {}) ⇒ Array<(WatchlistMonitorsList, Integer, Hash)>

List monitors List all available monitors for an applicant

Parameters:

  • applicant_id (String)

    The id of the applicant the watchlist monitors belong to. If omitted, all monitors for the account will be listed.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_deleted (Boolean)

    Whether to also include deleted (inactive) monitors. (default to false)

Returns:

  • (Array<(WatchlistMonitorsList, Integer, Hash)>)

    WatchlistMonitorsList data, response status code and response headers



4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
# File 'lib/onfido/api/default_api.rb', line 4057

def list_watchlist_monitors_with_http_info(applicant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_watchlist_monitors ...'
  end
  # verify the required parameter 'applicant_id' is set
  if @api_client.config.client_side_validation && applicant_id.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_id' when calling DefaultApi.list_watchlist_monitors"
  end
  # resource path
  local_var_path = '/watchlist_monitors'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'applicant_id'] = applicant_id
  query_params[:'include_deleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'WatchlistMonitorsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.list_watchlist_monitors",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_watchlist_monitors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_webhooks(opts = {}) ⇒ WebhooksList

List webhooks Lists all webhooks you’ve created.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4111
4112
4113
4114
# File 'lib/onfido/api/default_api.rb', line 4111

def list_webhooks(opts = {})
  data, _status_code, _headers = list_webhooks_with_http_info(opts)
  data
end

#list_webhooks_with_http_info(opts = {}) ⇒ Array<(WebhooksList, Integer, Hash)>

List webhooks Lists all webhooks you&#39;ve created.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhooksList, Integer, Hash)>)

    WebhooksList data, response status code and response headers



4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
# File 'lib/onfido/api/default_api.rb', line 4120

def list_webhooks_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_webhooks ...'
  end
  # resource path
  local_var_path = '/webhooks'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'WebhooksList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.list_webhooks",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_workflow_runs(opts = {}) ⇒ Array<WorkflowRun>

List Workflow Runs Retrieves the Workflow Runs of the client. Returns a list of Workflow Run objects.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The number of the page to be retrieved. If not specified, defaults to 1. (default to 1)

  • :status (String)

    A list of comma separated status values to filter the results. Possible values are &#39;processing&#39;, &#39;awaiting_input&#39;, &#39;approved&#39;, &#39;declined&#39;, &#39;review&#39;, &#39;abandoned&#39; and &#39;error&#39;.

  • :created_at_gt (Date)

    A ISO-8601 date to filter results with a created date greater than (after) the one provided.

  • :created_at_lt (Date)

    A ISO-8601 date to filter results with a created date less than (before) the one provided.

  • :sort (String)

    A string with the value &#39;desc&#39; or &#39;asc&#39; that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to &#39;desc&#39;. (default to ‘desc’)

  • :applicant_id (String)

    the applicant&#39;s id.

  • :tags (Array<String>)

    A list of tags to filter the results.

Returns:



4175
4176
4177
4178
# File 'lib/onfido/api/default_api.rb', line 4175

def list_workflow_runs(opts = {})
  data, _status_code, _headers = list_workflow_runs_with_http_info(opts)
  data
end

#list_workflow_runs_with_http_info(opts = {}) ⇒ Array<(Array<WorkflowRun>, Integer, Hash)>

List Workflow Runs Retrieves the Workflow Runs of the client. Returns a list of Workflow Run objects.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The number of the page to be retrieved. If not specified, defaults to 1. (default to 1)

  • :status (String)

    A list of comma separated status values to filter the results. Possible values are &#39;processing&#39;, &#39;awaiting_input&#39;, &#39;approved&#39;, &#39;declined&#39;, &#39;review&#39;, &#39;abandoned&#39; and &#39;error&#39;.

  • :created_at_gt (Date)

    A ISO-8601 date to filter results with a created date greater than (after) the one provided.

  • :created_at_lt (Date)

    A ISO-8601 date to filter results with a created date less than (before) the one provided.

  • :sort (String)

    A string with the value &#39;desc&#39; or &#39;asc&#39; that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to &#39;desc&#39;. (default to ‘desc’)

  • :applicant_id (String)

    the applicant&#39;s id.

  • :tags (Array<String>)

    A list of tags to filter the results.

Returns:

  • (Array<(Array<WorkflowRun>, Integer, Hash)>)

    Array<WorkflowRun> data, response status code and response headers



4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
# File 'lib/onfido/api/default_api.rb', line 4191

def list_workflow_runs_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_workflow_runs ...'
  end
  allowable_values = ["desc", "asc", "unknown_default_open_api"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/workflow_runs'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'created_at_gt'] = opts[:'created_at_gt'] if !opts[:'created_at_gt'].nil?
  query_params[:'created_at_lt'] = opts[:'created_at_lt'] if !opts[:'created_at_lt'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'applicant_id'] = opts[:'applicant_id'] if !opts[:'applicant_id'].nil?
  query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :csv) if !opts[:'tags'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<WorkflowRun>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.list_workflow_runs",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_workflow_runs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#ping(opts = {}) ⇒ String

Ping Run a health check on the Onfido API

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


4250
4251
4252
4253
# File 'lib/onfido/api/default_api.rb', line 4250

def ping(opts = {})
  data, _status_code, _headers = ping_with_http_info(opts)
  data
end

#ping_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>

Ping Run a health check on the Onfido API

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Integer, Hash)>)

    String data, response status code and response headers



4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
# File 'lib/onfido/api/default_api.rb', line 4259

def ping_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.ping ...'
  end
  # resource path
  local_var_path = '/ping'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'String'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.ping",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#ping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_results_feedback(results_feedback, opts = {}) ⇒ ResultsFeedback

Fraud reporting (ALPHA) Create Feedback on checks and reports

Parameters:

  • results_feedback (ResultsFeedback)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4308
4309
4310
4311
# File 'lib/onfido/api/default_api.rb', line 4308

def post_results_feedback(results_feedback, opts = {})
  data, _status_code, _headers = post_results_feedback_with_http_info(results_feedback, opts)
  data
end

#post_results_feedback_with_http_info(results_feedback, opts = {}) ⇒ Array<(ResultsFeedback, Integer, Hash)>

Fraud reporting (ALPHA) Create Feedback on checks and reports

Parameters:

  • results_feedback (ResultsFeedback)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ResultsFeedback, Integer, Hash)>)

    ResultsFeedback data, response status code and response headers



4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
# File 'lib/onfido/api/default_api.rb', line 4318

def post_results_feedback_with_http_info(results_feedback, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.post_results_feedback ...'
  end
  # verify the required parameter 'results_feedback' is set
  if @api_client.config.client_side_validation && results_feedback.nil?
    fail ArgumentError, "Missing the required parameter 'results_feedback' when calling DefaultApi.post_results_feedback"
  end
  # resource path
  local_var_path = '/results_feedback'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(results_feedback)

  # return_type
  return_type = opts[:debug_return_type] || 'ResultsFeedback'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.post_results_feedback",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#post_results_feedback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#resend_webhooks(webhook_resend, opts = {}) ⇒ nil

Resends webhooks Resends events to all webhooks registered with a matching environment in your account.

Parameters:

  • webhook_resend (WebhookResend)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


4376
4377
4378
4379
# File 'lib/onfido/api/default_api.rb', line 4376

def resend_webhooks(webhook_resend, opts = {})
  resend_webhooks_with_http_info(webhook_resend, opts)
  nil
end

#resend_webhooks_with_http_info(webhook_resend, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Resends webhooks Resends events to all webhooks registered with a matching environment in your account.

Parameters:

  • webhook_resend (WebhookResend)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
# File 'lib/onfido/api/default_api.rb', line 4386

def resend_webhooks_with_http_info(webhook_resend, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.resend_webhooks ...'
  end
  # verify the required parameter 'webhook_resend' is set
  if @api_client.config.client_side_validation && webhook_resend.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_resend' when calling DefaultApi.resend_webhooks"
  end
  # resource path
  local_var_path = '/webhooks/resend'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(webhook_resend)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.resend_webhooks",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#resend_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#restore_applicant(applicant_id, opts = {}) ⇒ nil

Restore Applicant Restores a single applicant scheduled for deletion.

Parameters:

  • applicant_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


4444
4445
4446
4447
# File 'lib/onfido/api/default_api.rb', line 4444

def restore_applicant(applicant_id, opts = {})
  restore_applicant_with_http_info(applicant_id, opts)
  nil
end

#restore_applicant_with_http_info(applicant_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Restore Applicant Restores a single applicant scheduled for deletion.

Parameters:

  • applicant_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
# File 'lib/onfido/api/default_api.rb', line 4454

def restore_applicant_with_http_info(applicant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.restore_applicant ...'
  end
  # verify the required parameter 'applicant_id' is set
  if @api_client.config.client_side_validation && applicant_id.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_id' when calling DefaultApi.restore_applicant"
  end
  # resource path
  local_var_path = '/applicants/{applicant_id}/restore'.sub('{' + 'applicant_id' + '}', CGI.escape(applicant_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.restore_applicant",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#restore_applicant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#resume_check(check_id, opts = {}) ⇒ nil

Resume a Check Resumes a paused check.

Parameters:

  • check_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


4507
4508
4509
4510
# File 'lib/onfido/api/default_api.rb', line 4507

def resume_check(check_id, opts = {})
  resume_check_with_http_info(check_id, opts)
  nil
end

#resume_check_with_http_info(check_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Resume a Check Resumes a paused check.

Parameters:

  • check_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
# File 'lib/onfido/api/default_api.rb', line 4517

def resume_check_with_http_info(check_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.resume_check ...'
  end
  # verify the required parameter 'check_id' is set
  if @api_client.config.client_side_validation && check_id.nil?
    fail ArgumentError, "Missing the required parameter 'check_id' when calling DefaultApi.resume_check"
  end
  # resource path
  local_var_path = '/checks/{check_id}/resume'.sub('{' + 'check_id' + '}', CGI.escape(check_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.resume_check",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#resume_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#resume_report(report_id, opts = {}) ⇒ nil

Resume report Resumes a single paused report.

Parameters:

  • report_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


4570
4571
4572
4573
# File 'lib/onfido/api/default_api.rb', line 4570

def resume_report(report_id, opts = {})
  resume_report_with_http_info(report_id, opts)
  nil
end

#resume_report_with_http_info(report_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Resume report Resumes a single paused report.

Parameters:

  • report_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
# File 'lib/onfido/api/default_api.rb', line 4580

def resume_report_with_http_info(report_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.resume_report ...'
  end
  # verify the required parameter 'report_id' is set
  if @api_client.config.client_side_validation && report_id.nil?
    fail ArgumentError, "Missing the required parameter 'report_id' when calling DefaultApi.resume_report"
  end
  # resource path
  local_var_path = '/reports/{report_id}/resume'.sub('{' + 'report_id' + '}', CGI.escape(report_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.resume_report",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#resume_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_applicant(applicant_id, applicant_updater, opts = {}) ⇒ Applicant

Update Applicant Allows updating applicant’s information before any checks is created. - Partial updates - Addresses and ID numbers present will replace existing ones - Same applicant validations to create applicant

Parameters:

  • applicant_id (String)
  • applicant_updater (ApplicantUpdater)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4634
4635
4636
4637
# File 'lib/onfido/api/default_api.rb', line 4634

def update_applicant(applicant_id, applicant_updater, opts = {})
  data, _status_code, _headers = update_applicant_with_http_info(applicant_id, applicant_updater, opts)
  data
end

#update_applicant_with_http_info(applicant_id, applicant_updater, opts = {}) ⇒ Array<(Applicant, Integer, Hash)>

Update Applicant Allows updating applicant&#39;s information before any checks is created. - Partial updates - Addresses and ID numbers present will replace existing ones - Same applicant validations to create applicant

Parameters:

  • applicant_id (String)
  • applicant_updater (ApplicantUpdater)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Applicant, Integer, Hash)>)

    Applicant data, response status code and response headers



4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
# File 'lib/onfido/api/default_api.rb', line 4645

def update_applicant_with_http_info(applicant_id, applicant_updater, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.update_applicant ...'
  end
  # verify the required parameter 'applicant_id' is set
  if @api_client.config.client_side_validation && applicant_id.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_id' when calling DefaultApi.update_applicant"
  end
  # verify the required parameter 'applicant_updater' is set
  if @api_client.config.client_side_validation && applicant_updater.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_updater' when calling DefaultApi.update_applicant"
  end
  # resource path
  local_var_path = '/applicants/{applicant_id}'.sub('{' + 'applicant_id' + '}', CGI.escape(applicant_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(applicant_updater)

  # return_type
  return_type = opts[:debug_return_type] || 'Applicant'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.update_applicant",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#update_applicant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_passkey(username, passkey_id, passkey_updater, opts = {}) ⇒ Passkey

Update passkey Updates a passkey’s state.

Parameters:

  • username (String)

    Username that owns the passkey.

  • passkey_id (String)

    Passkey ID.

  • passkey_updater (PasskeyUpdater)

    Passkey update payload.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4709
4710
4711
4712
# File 'lib/onfido/api/default_api.rb', line 4709

def update_passkey(username, passkey_id, passkey_updater, opts = {})
  data, _status_code, _headers = update_passkey_with_http_info(username, passkey_id, passkey_updater, opts)
  data
end

#update_passkey_with_http_info(username, passkey_id, passkey_updater, opts = {}) ⇒ Array<(Passkey, Integer, Hash)>

Update passkey Updates a passkey&#39;s state.

Parameters:

  • username (String)

    Username that owns the passkey.

  • passkey_id (String)

    Passkey ID.

  • passkey_updater (PasskeyUpdater)

    Passkey update payload.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Passkey, Integer, Hash)>)

    Passkey data, response status code and response headers



4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
# File 'lib/onfido/api/default_api.rb', line 4721

def update_passkey_with_http_info(username, passkey_id, passkey_updater, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.update_passkey ...'
  end
  # verify the required parameter 'username' is set
  if @api_client.config.client_side_validation && username.nil?
    fail ArgumentError, "Missing the required parameter 'username' when calling DefaultApi.update_passkey"
  end
  # verify the required parameter 'passkey_id' is set
  if @api_client.config.client_side_validation && passkey_id.nil?
    fail ArgumentError, "Missing the required parameter 'passkey_id' when calling DefaultApi.update_passkey"
  end
  # verify the required parameter 'passkey_updater' is set
  if @api_client.config.client_side_validation && passkey_updater.nil?
    fail ArgumentError, "Missing the required parameter 'passkey_updater' when calling DefaultApi.update_passkey"
  end
  # resource path
  local_var_path = '/passkeys/{username}/{passkey_id}'.sub('{' + 'username' + '}', CGI.escape(username.to_s)).sub('{' + 'passkey_id' + '}', CGI.escape(passkey_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(passkey_updater)

  # return_type
  return_type = opts[:debug_return_type] || 'Passkey'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.update_passkey",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#update_passkey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_watchlist_monitor_match(monitor_id, watchlist_monitor_matches_updater, opts = {}) ⇒ WatchlistMonitorMatchesList

Set match status (BETA) Update the status of the given matches

Parameters:

Returns:



4788
4789
4790
4791
# File 'lib/onfido/api/default_api.rb', line 4788

def update_watchlist_monitor_match(monitor_id, watchlist_monitor_matches_updater, opts = {})
  data, _status_code, _headers = update_watchlist_monitor_match_with_http_info(monitor_id, watchlist_monitor_matches_updater, opts)
  data
end

#update_watchlist_monitor_match_with_http_info(monitor_id, watchlist_monitor_matches_updater, opts = {}) ⇒ Array<(WatchlistMonitorMatchesList, Integer, Hash)>

Set match status (BETA) Update the status of the given matches

Parameters:

Returns:

  • (Array<(WatchlistMonitorMatchesList, Integer, Hash)>)

    WatchlistMonitorMatchesList data, response status code and response headers



4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
# File 'lib/onfido/api/default_api.rb', line 4799

def update_watchlist_monitor_match_with_http_info(monitor_id, watchlist_monitor_matches_updater, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.update_watchlist_monitor_match ...'
  end
  # verify the required parameter 'monitor_id' is set
  if @api_client.config.client_side_validation && monitor_id.nil?
    fail ArgumentError, "Missing the required parameter 'monitor_id' when calling DefaultApi.update_watchlist_monitor_match"
  end
  # verify the required parameter 'watchlist_monitor_matches_updater' is set
  if @api_client.config.client_side_validation && watchlist_monitor_matches_updater.nil?
    fail ArgumentError, "Missing the required parameter 'watchlist_monitor_matches_updater' when calling DefaultApi.update_watchlist_monitor_match"
  end
  # resource path
  local_var_path = '/watchlist_monitors/{monitor_id}/matches'.sub('{' + 'monitor_id' + '}', CGI.escape(monitor_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_monitor_matches_updater)

  # return_type
  return_type = opts[:debug_return_type] || 'WatchlistMonitorMatchesList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.update_watchlist_monitor_match",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#update_watchlist_monitor_match\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_webhook(webhook_id, webhook_updater, opts = {}) ⇒ Webhook

Edit a webhook Edits a webhook. Returns the updated webhook object.

Parameters:

  • webhook_id (String)
  • webhook_updater (WebhookUpdater)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4862
4863
4864
4865
# File 'lib/onfido/api/default_api.rb', line 4862

def update_webhook(webhook_id, webhook_updater, opts = {})
  data, _status_code, _headers = update_webhook_with_http_info(webhook_id, webhook_updater, opts)
  data
end

#update_webhook_with_http_info(webhook_id, webhook_updater, opts = {}) ⇒ Array<(Webhook, Integer, Hash)>

Edit a webhook Edits a webhook. Returns the updated webhook object.

Parameters:

  • webhook_id (String)
  • webhook_updater (WebhookUpdater)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Webhook, Integer, Hash)>)

    Webhook data, response status code and response headers



4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
# File 'lib/onfido/api/default_api.rb', line 4873

def update_webhook_with_http_info(webhook_id, webhook_updater, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.update_webhook ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling DefaultApi.update_webhook"
  end
  # verify the required parameter 'webhook_updater' is set
  if @api_client.config.client_side_validation && webhook_updater.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_updater' when calling DefaultApi.update_webhook"
  end
  # resource path
  local_var_path = '/webhooks/{webhook_id}'.sub('{' + 'webhook_id' + '}', CGI.escape(webhook_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(webhook_updater)

  # return_type
  return_type = opts[:debug_return_type] || 'Webhook'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.update_webhook",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#update_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#upload_document(type, applicant_id, file, opts = {}) ⇒ Document

Upload a document Documents are uploaded using this endpoint. Along with the file upload the relevant document type must be specified. Documents must be uploaded as a multipart form. The valid file types are: jpg, png and pdf. The file size must be between 2KB and 3MB.

Parameters:

  • type (DocumentTypes)

    The type of document

  • applicant_id (String)

    The ID of the applicant whose document is being uploaded.

  • file (File)

    The file to be uploaded.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :file_type (String)

    The file type of the uploaded file

  • :side (String)

    The side of the document, if applicable. The possible values are front and back

  • :issuing_country (CountryCodes)

    The issuing country of the document, a 3-letter ISO code.

  • :validate_image_quality (Boolean)

    Defaults to false. When true the submitted image will undergo an image quality validation which may take up to 5 seconds.

  • :location (LocationBuilder)

Returns:



4942
4943
4944
4945
# File 'lib/onfido/api/default_api.rb', line 4942

def upload_document(type, applicant_id, file, opts = {})
  data, _status_code, _headers = upload_document_with_http_info(type, applicant_id, file, opts)
  data
end

#upload_document_with_http_info(type, applicant_id, file, opts = {}) ⇒ Array<(Document, Integer, Hash)>

Upload a document Documents are uploaded using this endpoint. Along with the file upload the relevant document type must be specified. Documents must be uploaded as a multipart form. The valid file types are: jpg, png and pdf. The file size must be between 2KB and 3MB.

Parameters:

  • type (DocumentTypes)

    The type of document

  • applicant_id (String)

    The ID of the applicant whose document is being uploaded.

  • file (File)

    The file to be uploaded.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :file_type (String)

    The file type of the uploaded file

  • :side (String)

    The side of the document, if applicable. The possible values are front and back

  • :issuing_country (CountryCodes)

    The issuing country of the document, a 3-letter ISO code.

  • :validate_image_quality (Boolean)

    Defaults to false. When true the submitted image will undergo an image quality validation which may take up to 5 seconds.

  • :location (LocationBuilder)

Returns:

  • (Array<(Document, Integer, Hash)>)

    Document data, response status code and response headers



4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
# File 'lib/onfido/api/default_api.rb', line 4959

def upload_document_with_http_info(type, applicant_id, file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.upload_document ...'
  end
  # verify the required parameter 'type' is set
  if @api_client.config.client_side_validation && type.nil?
    fail ArgumentError, "Missing the required parameter 'type' when calling DefaultApi.upload_document"
  end
  # verify the required parameter 'applicant_id' is set
  if @api_client.config.client_side_validation && applicant_id.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_id' when calling DefaultApi.upload_document"
  end
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling DefaultApi.upload_document"
  end
  allowable_values = ["front", "back", "unknown_default_open_api"]
  if @api_client.config.client_side_validation && opts[:'side'] && !allowable_values.include?(opts[:'side'])
    fail ArgumentError, "invalid value for \"side\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/documents'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['type'] = type
  form_params['applicant_id'] = applicant_id
  form_params['file'] = file
  form_params['file_type'] = opts[:'file_type'] if !opts[:'file_type'].nil?
  form_params['side'] = opts[:'side'] if !opts[:'side'].nil?
  form_params['issuing_country'] = opts[:'issuing_country'] if !opts[:'issuing_country'].nil?
  form_params['validate_image_quality'] = opts[:'validate_image_quality'] if !opts[:'validate_image_quality'].nil?
  form_params['location'] = opts[:'location'] if !opts[:'location'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Document'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.upload_document",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#upload_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#upload_id_photo(opts = {}) ⇒ IdPhoto

Upload ID photo You can upload ID photos to this endpoint. Like document upload, files must be uploaded as a multipart form. Valid file types are jpg, png and pdf. The file size must be between 32KB and 10MB.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :applicant_id (String)

    The ID of the applicant whose ID photo is being uploaded.

  • :file (File)

    The file to be uploaded.

Returns:



5038
5039
5040
5041
# File 'lib/onfido/api/default_api.rb', line 5038

def upload_id_photo(opts = {})
  data, _status_code, _headers = upload_id_photo_with_http_info(opts)
  data
end

#upload_id_photo_with_http_info(opts = {}) ⇒ Array<(IdPhoto, Integer, Hash)>

Upload ID photo You can upload ID photos to this endpoint. Like document upload, files must be uploaded as a multipart form. Valid file types are jpg, png and pdf. The file size must be between 32KB and 10MB.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :applicant_id (String)

    The ID of the applicant whose ID photo is being uploaded.

  • :file (File)

    The file to be uploaded.

Returns:

  • (Array<(IdPhoto, Integer, Hash)>)

    IdPhoto data, response status code and response headers



5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
# File 'lib/onfido/api/default_api.rb', line 5049

def upload_id_photo_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.upload_id_photo ...'
  end
  # resource path
  local_var_path = '/id_photos'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['applicant_id'] = opts[:'applicant_id'] if !opts[:'applicant_id'].nil?
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'IdPhoto'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.upload_id_photo",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#upload_id_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#upload_live_photo(opts = {}) ⇒ LivePhoto

Upload live photo You can upload live photos to this endpoint. Like document upload, files must be uploaded as a multipart form. Valid file types are jpg, png and pdf. The file size must be between 32KB and 10MB. Live photos are validated at the point of upload to check that they contain exactly one face. This validation can be disabled by setting the advanced_validation argument to false.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :applicant_id (String)

    The ID of the applicant whose live photo is being uploaded.

  • :file (File)

    The file to be uploaded.

  • :advanced_validation (Boolean)

    Validates that the live photo contains exactly one face. (default to true)

Returns:



5107
5108
5109
5110
# File 'lib/onfido/api/default_api.rb', line 5107

def upload_live_photo(opts = {})
  data, _status_code, _headers = upload_live_photo_with_http_info(opts)
  data
end

#upload_live_photo_with_http_info(opts = {}) ⇒ Array<(LivePhoto, Integer, Hash)>

Upload live photo You can upload live photos to this endpoint. Like document upload, files must be uploaded as a multipart form. Valid file types are jpg, png and pdf. The file size must be between 32KB and 10MB. Live photos are validated at the point of upload to check that they contain exactly one face. This validation can be disabled by setting the advanced_validation argument to false.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :applicant_id (String)

    The ID of the applicant whose live photo is being uploaded.

  • :file (File)

    The file to be uploaded.

  • :advanced_validation (Boolean)

    Validates that the live photo contains exactly one face. (default to true)

Returns:

  • (Array<(LivePhoto, Integer, Hash)>)

    LivePhoto data, response status code and response headers



5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
# File 'lib/onfido/api/default_api.rb', line 5119

def upload_live_photo_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.upload_live_photo ...'
  end
  # resource path
  local_var_path = '/live_photos'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['applicant_id'] = opts[:'applicant_id'] if !opts[:'applicant_id'].nil?
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
  form_params['advanced_validation'] = opts[:'advanced_validation'] if !opts[:'advanced_validation'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LivePhoto'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.upload_live_photo",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#upload_live_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#upload_signing_document(applicant_id, file, opts = {}) ⇒ SigningDocument

Upload a signing document Signing documents are uploaded using this endpoint. Signing documents must be uploaded as a multipart form. The only valid file type is pdf. The file size must be between 2KB and 3MB.

Parameters:

  • applicant_id (String)

    The ID of the applicant whose signing document is being uploaded.

  • file (File)

    The file to be uploaded.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



5177
5178
5179
5180
# File 'lib/onfido/api/default_api.rb', line 5177

def upload_signing_document(applicant_id, file, opts = {})
  data, _status_code, _headers = upload_signing_document_with_http_info(applicant_id, file, opts)
  data
end

#upload_signing_document_with_http_info(applicant_id, file, opts = {}) ⇒ Array<(SigningDocument, Integer, Hash)>

Upload a signing document Signing documents are uploaded using this endpoint. Signing documents must be uploaded as a multipart form. The only valid file type is pdf. The file size must be between 2KB and 3MB.

Parameters:

  • applicant_id (String)

    The ID of the applicant whose signing document is being uploaded.

  • file (File)

    The file to be uploaded.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SigningDocument, Integer, Hash)>)

    SigningDocument data, response status code and response headers



5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
# File 'lib/onfido/api/default_api.rb', line 5188

def upload_signing_document_with_http_info(applicant_id, file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.upload_signing_document ...'
  end
  # verify the required parameter 'applicant_id' is set
  if @api_client.config.client_side_validation && applicant_id.nil?
    fail ArgumentError, "Missing the required parameter 'applicant_id' when calling DefaultApi.upload_signing_document"
  end
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling DefaultApi.upload_signing_document"
  end
  # resource path
  local_var_path = '/signing_documents'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['applicant_id'] = applicant_id
  form_params['file'] = file

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SigningDocument'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Token']

  new_options = opts.merge(
    :operation => :"DefaultApi.upload_signing_document",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#upload_signing_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end