Class: Trulioo::VerificationsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/trulioo_sdk/api/verifications_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ VerificationsApi

Returns a new instance of VerificationsApi.



15
16
17
# File 'lib/trulioo_sdk/api/verifications_api.rb', line 15

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



13
14
15
# File 'lib/trulioo_sdk/api/verifications_api.rb', line 13

def api_client
  @api_client
end

Instance Method Details

#document_download(mode, transaction_record_id, field_name, opts = {}) ⇒ Object

Document Download Download Document

Parameters:

  • mode (String)

    trial or live

  • transaction_record_id (String)

    id of the transactionrecord, this will be a GUID

  • field_name (String)

    document field name

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

    the optional parameters

Returns:

  • (Object)


25
26
27
28
# File 'lib/trulioo_sdk/api/verifications_api.rb', line 25

def document_download(mode, transaction_record_id, field_name, opts = {})
  data, _status_code, _headers = document_download_with_http_info(mode, transaction_record_id, field_name, opts)
  data
end

#document_download_with_http_info(mode, transaction_record_id, field_name, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Document Download Download Document

Parameters:

  • mode (String)

    trial or live

  • transaction_record_id (String)

    id of the transactionrecord, this will be a GUID

  • field_name (String)

    document field name

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

    the optional parameters

Returns:

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

    Object data, 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
84
85
86
87
88
89
90
91
# File 'lib/trulioo_sdk/api/verifications_api.rb', line 37

def document_download_with_http_info(mode, transaction_record_id, field_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VerificationsApi.document_download ...'
  end
  # verify the required parameter 'mode' is set
  if @api_client.config.client_side_validation && mode.nil?
    fail ArgumentError, "Missing the required parameter 'mode' when calling VerificationsApi.document_download"
  end
  # verify the required parameter 'transaction_record_id' is set
  if @api_client.config.client_side_validation && transaction_record_id.nil?
    fail ArgumentError, "Missing the required parameter 'transaction_record_id' when calling VerificationsApi.document_download"
  end
  # verify the required parameter 'field_name' is set
  if @api_client.config.client_side_validation && field_name.nil?
    fail ArgumentError, "Missing the required parameter 'field_name' when calling VerificationsApi.document_download"
  end
  # resource path
  local_var_path = '/{mode}/verifications/v1/documentdownload/{transactionRecordId}/{fieldName}'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20')).sub('{' + 'transactionRecordId' + '}', CGI.escape(transaction_record_id.to_s).gsub('+', '%20')).sub('{' + 'fieldName' + '}', CGI.escape(field_name.to_s).gsub('+', '%20'))

  # 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', 'text/json'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"VerificationsApi.document_download",
    :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: VerificationsApi#document_download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_transaction_record(mode, id, opts = {}) ⇒ TransactionRecordResult

Get Transaction Record This method is used to retrieve the request and results of a verification performed using the verify method. The response for this method includes the same information as verify method’s response, along with data present in the input fields of the verify request.

Parameters:

  • mode (String)

    trial or live

  • id (String)

    id of the transactionrecord, this will be a GUID

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

    the optional parameters

Returns:



99
100
101
102
# File 'lib/trulioo_sdk/api/verifications_api.rb', line 99

def get_transaction_record(mode, id, opts = {})
  data, _status_code, _headers = get_transaction_record_with_http_info(mode, id, opts)
  data
end

#get_transaction_record_address(mode, id, opts = {}) ⇒ TransactionRecordResult

Get Transaction Record Address Fetch the results of a verification with the TransactionRecordId for the transaction this will include additional information if your account includes address cleansing.

Parameters:

  • mode (String)

    trial or live

  • id (String)

    id of the transactionrecord, this will be a GUID

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

    the optional parameters

Returns:



168
169
170
171
# File 'lib/trulioo_sdk/api/verifications_api.rb', line 168

def get_transaction_record_address(mode, id, opts = {})
  data, _status_code, _headers = get_transaction_record_address_with_http_info(mode, id, opts)
  data
end

#get_transaction_record_address_with_http_info(mode, id, opts = {}) ⇒ Array<(TransactionRecordResult, Integer, Hash)>

Get Transaction Record Address Fetch the results of a verification with the TransactionRecordId for the transaction this will include additional information if your account includes address cleansing.

Parameters:

  • mode (String)

    trial or live

  • id (String)

    id of the transactionrecord, this will be a GUID

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

    the optional parameters

Returns:

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

    TransactionRecordResult data, response status code and response headers



179
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
# File 'lib/trulioo_sdk/api/verifications_api.rb', line 179

def get_transaction_record_address_with_http_info(mode, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VerificationsApi.get_transaction_record_address ...'
  end
  # verify the required parameter 'mode' is set
  if @api_client.config.client_side_validation && mode.nil?
    fail ArgumentError, "Missing the required parameter 'mode' when calling VerificationsApi.get_transaction_record_address"
  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 VerificationsApi.get_transaction_record_address"
  end
  # resource path
  local_var_path = '/{mode}/verifications/v1/transactionrecord/{id}/withaddress'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20')).sub('{' + 'id' + '}', CGI.escape(id.to_s).gsub('+', '%20'))

  # 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', 'text/json'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"VerificationsApi.get_transaction_record_address",
    :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: VerificationsApi#get_transaction_record_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_transaction_record_document(mode, transaction_record_id, document_field, opts = {}) ⇒ String

Get Transaction Record Document This method is used to retrieve the document of a verification performed using the verify method. The response for this method includes the processed base64 JPEG formatted string

Parameters:

  • mode (String)

    trial or live

  • transaction_record_id (String)

    id of the transactionrecord, this will be a GUID

  • document_field (String)

    FieldName of the Document, this will be a string

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

    the optional parameters

Returns:

  • (String)


238
239
240
241
# File 'lib/trulioo_sdk/api/verifications_api.rb', line 238

def get_transaction_record_document(mode, transaction_record_id, document_field, opts = {})
  data, _status_code, _headers = get_transaction_record_document_with_http_info(mode, transaction_record_id, document_field, opts)
  data
end

#get_transaction_record_document_with_http_info(mode, transaction_record_id, document_field, opts = {}) ⇒ Array<(String, Integer, Hash)>

Get Transaction Record Document This method is used to retrieve the document of a verification performed using the verify method. The response for this method includes the processed base64 JPEG formatted string

Parameters:

  • mode (String)

    trial or live

  • transaction_record_id (String)

    id of the transactionrecord, this will be a GUID

  • document_field (String)

    FieldName of the Document, this will be a string

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



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
300
301
302
303
304
# File 'lib/trulioo_sdk/api/verifications_api.rb', line 250

def get_transaction_record_document_with_http_info(mode, transaction_record_id, document_field, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VerificationsApi.get_transaction_record_document ...'
  end
  # verify the required parameter 'mode' is set
  if @api_client.config.client_side_validation && mode.nil?
    fail ArgumentError, "Missing the required parameter 'mode' when calling VerificationsApi.get_transaction_record_document"
  end
  # verify the required parameter 'transaction_record_id' is set
  if @api_client.config.client_side_validation && transaction_record_id.nil?
    fail ArgumentError, "Missing the required parameter 'transaction_record_id' when calling VerificationsApi.get_transaction_record_document"
  end
  # verify the required parameter 'document_field' is set
  if @api_client.config.client_side_validation && document_field.nil?
    fail ArgumentError, "Missing the required parameter 'document_field' when calling VerificationsApi.get_transaction_record_document"
  end
  # resource path
  local_var_path = '/{mode}/verifications/v1/transactionrecord/{transactionRecordID}/{documentField}'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20')).sub('{' + 'transactionRecordID' + '}', CGI.escape(transaction_record_id.to_s).gsub('+', '%20')).sub('{' + 'documentField' + '}', CGI.escape(document_field.to_s).gsub('+', '%20'))

  # 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', 'text/json'])

  # 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] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"VerificationsApi.get_transaction_record_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: VerificationsApi#get_transaction_record_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_transaction_record_verbose(mode, id, opts = {}) ⇒ TransactionRecordResult

Get Transaction Record Verbose Fetch the results of a verification with the TransactionRecordId for the transaction this will include additional information if your account includes address cleansing and watchlist details.

Parameters:

  • mode (String)

    trial or live

  • id (String)

    id of the transactionrecord, this will be a GUID

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

    the optional parameters

Returns:



312
313
314
315
# File 'lib/trulioo_sdk/api/verifications_api.rb', line 312

def get_transaction_record_verbose(mode, id, opts = {})
  data, _status_code, _headers = get_transaction_record_verbose_with_http_info(mode, id, opts)
  data
end

#get_transaction_record_verbose_with_http_info(mode, id, opts = {}) ⇒ Array<(TransactionRecordResult, Integer, Hash)>

Get Transaction Record Verbose Fetch the results of a verification with the TransactionRecordId for the transaction this will include additional information if your account includes address cleansing and watchlist details.

Parameters:

  • mode (String)

    trial or live

  • id (String)

    id of the transactionrecord, this will be a GUID

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

    the optional parameters

Returns:

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

    TransactionRecordResult data, response status code and response headers



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
363
364
365
366
367
368
369
370
371
372
373
# File 'lib/trulioo_sdk/api/verifications_api.rb', line 323

def get_transaction_record_verbose_with_http_info(mode, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VerificationsApi.get_transaction_record_verbose ...'
  end
  # verify the required parameter 'mode' is set
  if @api_client.config.client_side_validation && mode.nil?
    fail ArgumentError, "Missing the required parameter 'mode' when calling VerificationsApi.get_transaction_record_verbose"
  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 VerificationsApi.get_transaction_record_verbose"
  end
  # resource path
  local_var_path = '/{mode}/verifications/v1/transactionrecord/{id}/verbose'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20')).sub('{' + 'id' + '}', CGI.escape(id.to_s).gsub('+', '%20'))

  # 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', 'text/json'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"VerificationsApi.get_transaction_record_verbose",
    :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: VerificationsApi#get_transaction_record_verbose\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_transaction_record_with_http_info(mode, id, opts = {}) ⇒ Array<(TransactionRecordResult, Integer, Hash)>

Get Transaction Record This method is used to retrieve the request and results of a verification performed using the verify method. The response for this method includes the same information as verify method&#39;s response, along with data present in the input fields of the verify request.

Parameters:

  • mode (String)

    trial or live

  • id (String)

    id of the transactionrecord, this will be a GUID

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

    the optional parameters

Returns:

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

    TransactionRecordResult data, response status code and response headers



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
# File 'lib/trulioo_sdk/api/verifications_api.rb', line 110

def get_transaction_record_with_http_info(mode, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VerificationsApi.get_transaction_record ...'
  end
  # verify the required parameter 'mode' is set
  if @api_client.config.client_side_validation && mode.nil?
    fail ArgumentError, "Missing the required parameter 'mode' when calling VerificationsApi.get_transaction_record"
  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 VerificationsApi.get_transaction_record"
  end
  # resource path
  local_var_path = '/{mode}/verifications/v1/transactionrecord/{id}'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20')).sub('{' + 'id' + '}', CGI.escape(id.to_s).gsub('+', '%20'))

  # 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', 'text/json'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"VerificationsApi.get_transaction_record",
    :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: VerificationsApi#get_transaction_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_transaction_status(mode, id, opts = {}) ⇒ TransactionStatus

Get Transaction Status This method is used to retrieve the processing status of an asynchronous transaction. The response for this method includes the processing status of the verification, the TransactionID, the TransactionRecordID as well as whether the verification request has timed out.

Parameters:

  • mode (String)

    trial or live

  • id (String)

    id of the asynchronous transaction, this will be a GUID

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

    the optional parameters

Returns:



381
382
383
384
# File 'lib/trulioo_sdk/api/verifications_api.rb', line 381

def get_transaction_status(mode, id, opts = {})
  data, _status_code, _headers = get_transaction_status_with_http_info(mode, id, opts)
  data
end

#get_transaction_status_with_http_info(mode, id, opts = {}) ⇒ Array<(TransactionStatus, Integer, Hash)>

Get Transaction Status This method is used to retrieve the processing status of an asynchronous transaction. The response for this method includes the processing status of the verification, the TransactionID, the TransactionRecordID as well as whether the verification request has timed out.

Parameters:

  • mode (String)

    trial or live

  • id (String)

    id of the asynchronous transaction, this will be a GUID

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

    the optional parameters

Returns:

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

    TransactionStatus data, response status code and response headers



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
431
432
433
434
435
436
437
438
439
440
441
442
# File 'lib/trulioo_sdk/api/verifications_api.rb', line 392

def get_transaction_status_with_http_info(mode, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VerificationsApi.get_transaction_status ...'
  end
  # verify the required parameter 'mode' is set
  if @api_client.config.client_side_validation && mode.nil?
    fail ArgumentError, "Missing the required parameter 'mode' when calling VerificationsApi.get_transaction_status"
  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 VerificationsApi.get_transaction_status"
  end
  # resource path
  local_var_path = '/{mode}/verifications/v1/transaction/{id}/status'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20')).sub('{' + 'id' + '}', CGI.escape(id.to_s).gsub('+', '%20'))

  # 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', 'text/json'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"VerificationsApi.get_transaction_status",
    :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: VerificationsApi#get_transaction_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#verify(mode, verify_request, opts = {}) ⇒ VerifyResult

Verify Calling this method will perform a verification. If your account includes address cleansing set the CleansedAddress flag to get additional address information in the result. You can query configuration to get what fields are available to you in each each country. It is also possible to get sample requests from the customer portal.

Parameters:

  • mode (String)

    trial or live

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

    the optional parameters

Returns:



450
451
452
453
# File 'lib/trulioo_sdk/api/verifications_api.rb', line 450

def verify(mode, verify_request, opts = {})
  data, _status_code, _headers = verify_with_http_info(mode, verify_request, opts)
  data
end

#verify_with_http_info(mode, verify_request, opts = {}) ⇒ Array<(VerifyResult, Integer, Hash)>

Verify Calling this method will perform a verification. If your account includes address cleansing set the CleansedAddress flag to get additional address information in the result. You can query configuration to get what fields are available to you in each each country. It is also possible to get sample requests from the customer portal.

Parameters:

  • mode (String)

    trial or live

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

    the optional parameters

Returns:

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

    VerifyResult data, response status code and response headers



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
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
# File 'lib/trulioo_sdk/api/verifications_api.rb', line 461

def verify_with_http_info(mode, verify_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VerificationsApi.verify ...'
  end
  # verify the required parameter 'mode' is set
  if @api_client.config.client_side_validation && mode.nil?
    fail ArgumentError, "Missing the required parameter 'mode' when calling VerificationsApi.verify"
  end
  # verify the required parameter 'verify_request' is set
  if @api_client.config.client_side_validation && verify_request.nil?
    fail ArgumentError, "Missing the required parameter 'verify_request' when calling VerificationsApi.verify"
  end
  # resource path
  local_var_path = '/{mode}/verifications/v1/verify'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20'))

  # 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', 'text/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"VerificationsApi.verify",
    :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: VerificationsApi#verify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end