Class: SyncteraRubySdk::KYCKYBVerificationsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/synctera_ruby_sdk/api/kyckyb_verifications_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ KYCKYBVerificationsApi

Returns a new instance of KYCKYBVerificationsApi.



19
20
21
# File 'lib/synctera_ruby_sdk/api/kyckyb_verifications_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/synctera_ruby_sdk/api/kyckyb_verifications_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_verification(verification, opts = {}) ⇒ Verification

Create a verification Upload evidence of an externally performed KYC/KYB. You may use your own KYC/KYB provider and upload evidence of that result to Synctera instead of using Synctera’s providers.

Parameters:

  • verification (Verification)

    Verification result to create.

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    An idempotency key is an arbitrary unique value generated by client to detect subsequent retries of the same request. It is recommended that a UUID or a similar random identifier be used as an idempotency key. A different key must be used for each request, unless it is a retry.

Returns:



28
29
30
31
# File 'lib/synctera_ruby_sdk/api/kyckyb_verifications_api.rb', line 28

def create_verification(verification, opts = {})
  data, _status_code, _headers = create_verification_with_http_info(verification, opts)
  data
end

#create_verification_with_http_info(verification, opts = {}) ⇒ Array<(Verification, Integer, Hash)>

Create a verification Upload evidence of an externally performed KYC/KYB. You may use your own KYC/KYB provider and upload evidence of that result to Synctera instead of using Synctera&#39;s providers.

Parameters:

  • verification (Verification)

    Verification result to create.

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    An idempotency key is an arbitrary unique value generated by client to detect subsequent retries of the same request. It is recommended that a UUID or a similar random identifier be used as an idempotency key. A different key must be used for each request, unless it is a retry.

Returns:

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

    Verification data, response status code and response headers



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/synctera_ruby_sdk/api/kyckyb_verifications_api.rb', line 39

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

  # 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', 'application/problem+json'])
  # 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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

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

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

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

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

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

#get_verification1(verification_id, opts = {}) ⇒ Verification

Get verification Get customer verification result.

Parameters:

  • verification_id (String)

    Verification&#39;s unique identifier.

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

    the optional parameters

Returns:



98
99
100
101
# File 'lib/synctera_ruby_sdk/api/kyckyb_verifications_api.rb', line 98

def get_verification1(verification_id, opts = {})
  data, _status_code, _headers = get_verification1_with_http_info(verification_id, opts)
  data
end

#get_verification1_with_http_info(verification_id, opts = {}) ⇒ Array<(Verification, Integer, Hash)>

Get verification Get customer verification result.

Parameters:

  • verification_id (String)

    Verification&#39;s unique identifier.

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

    the optional parameters

Returns:

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

    Verification data, response status code and response headers



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
# File 'lib/synctera_ruby_sdk/api/kyckyb_verifications_api.rb', line 108

def get_verification1_with_http_info(verification_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KYCKYBVerificationsApi.get_verification1 ...'
  end
  # verify the required parameter 'verification_id' is set
  if @api_client.config.client_side_validation && verification_id.nil?
    fail ArgumentError, "Missing the required parameter 'verification_id' when calling KYCKYBVerificationsApi.get_verification1"
  end
  # resource path
  local_var_path = '/verifications/{verification_id}'.sub('{' + 'verification_id' + '}', CGI.escape(verification_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', 'application/problem+json'])

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

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

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

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

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

#list_verifications1(opts = {}) ⇒ VerificationList

List verifications List customer verification results.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (Array<String>)

    Unique identifier for the resource. Multiple IDs can be provided as a comma-separated list.

  • :person_id (Array<String>)

    Unique identifier for the person. Multiple IDs can be provided as a comma-separated list.

  • :business_id (Array<String>)

    Unique identifier for the business. Multiple IDs can be provided as a comma-separated list.

  • :verification_type (Array<VerificationType1>)

    The type of verification run. Multiple values can be provided as a comma-separated list.

  • :result (Array<VerificationResult>)

    The result of the verification that was run on the party. Multiple values can be provided as a comma-separated list.

  • :include_history (Boolean)

    If true, include old (inactive) records as well. (default to false)

  • :limit (Integer) — default: default to 100
  • :page_token (String)

Returns:



168
169
170
171
# File 'lib/synctera_ruby_sdk/api/kyckyb_verifications_api.rb', line 168

def list_verifications1(opts = {})
  data, _status_code, _headers = list_verifications1_with_http_info(opts)
  data
end

#list_verifications1_with_http_info(opts = {}) ⇒ Array<(VerificationList, Integer, Hash)>

List verifications List customer verification results.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (Array<String>)

    Unique identifier for the resource. Multiple IDs can be provided as a comma-separated list.

  • :person_id (Array<String>)

    Unique identifier for the person. Multiple IDs can be provided as a comma-separated list.

  • :business_id (Array<String>)

    Unique identifier for the business. Multiple IDs can be provided as a comma-separated list.

  • :verification_type (Array<VerificationType1>)

    The type of verification run. Multiple values can be provided as a comma-separated list.

  • :result (Array<VerificationResult>)

    The result of the verification that was run on the party. Multiple values can be provided as a comma-separated list.

  • :include_history (Boolean)

    If true, include old (inactive) records as well. (default to false)

  • :limit (Integer) — default: default to 100
  • :page_token (String)

Returns:

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

    VerificationList data, response status code and response headers



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
232
233
234
235
236
237
238
239
# File 'lib/synctera_ruby_sdk/api/kyckyb_verifications_api.rb', line 185

def list_verifications1_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KYCKYBVerificationsApi.list_verifications1 ...'
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling KYCKYBVerificationsApi.list_verifications1, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/verifications'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = @api_client.build_collection_param(opts[:'id'], :csv) if !opts[:'id'].nil?
  query_params[:'person_id'] = @api_client.build_collection_param(opts[:'person_id'], :csv) if !opts[:'person_id'].nil?
  query_params[:'business_id'] = @api_client.build_collection_param(opts[:'business_id'], :csv) if !opts[:'business_id'].nil?
  query_params[:'verification_type'] = @api_client.build_collection_param(opts[:'verification_type'], :csv) if !opts[:'verification_type'].nil?
  query_params[:'result'] = @api_client.build_collection_param(opts[:'result'], :csv) if !opts[:'result'].nil?
  query_params[:'include_history'] = opts[:'include_history'] if !opts[:'include_history'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil?

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

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

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

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

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

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

#verify(verification_request, opts = {}) ⇒ VerifyResponse

Verify a customer’s identity Initiate identity verification and run the specified identity checks. Verifying a personal customer requires that the following fields already be set: * ‘first_name` * `last_name` * `dob` * `email` * `phone_number` * `legal_address` * `ssn` Verifying a business customer requires that the following fields already be set: * `entity_name` * `legal_address`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    An idempotency key is an arbitrary unique value generated by client to detect subsequent retries of the same request. It is recommended that a UUID or a similar random identifier be used as an idempotency key. A different key must be used for each request, unless it is a retry.

Returns:



247
248
249
250
# File 'lib/synctera_ruby_sdk/api/kyckyb_verifications_api.rb', line 247

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

#verify_ad_hoc(adhoc_verification_request, opts = {}) ⇒ AdhocVerificationResponse

Check if an individual is on any watchlists

Parameters:

Options Hash (opts):

  • :idempotency_key (String)

    An idempotency key is an arbitrary unique value generated by client to detect subsequent retries of the same request. It is recommended that a UUID or a similar random identifier be used as an idempotency key. A different key must be used for each request, unless it is a retry.

Returns:



317
318
319
320
# File 'lib/synctera_ruby_sdk/api/kyckyb_verifications_api.rb', line 317

def verify_ad_hoc(adhoc_verification_request, opts = {})
  data, _status_code, _headers = verify_ad_hoc_with_http_info(adhoc_verification_request, opts)
  data
end

#verify_ad_hoc_with_http_info(adhoc_verification_request, opts = {}) ⇒ Array<(AdhocVerificationResponse, Integer, Hash)>

Check if an individual is on any watchlists

Parameters:

Options Hash (opts):

  • :idempotency_key (String)

    An idempotency key is an arbitrary unique value generated by client to detect subsequent retries of the same request. It is recommended that a UUID or a similar random identifier be used as an idempotency key. A different key must be used for each request, unless it is a retry.

Returns:

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

    AdhocVerificationResponse data, response status code and response headers



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
374
375
376
377
378
379
# File 'lib/synctera_ruby_sdk/api/kyckyb_verifications_api.rb', line 327

def verify_ad_hoc_with_http_info(adhoc_verification_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KYCKYBVerificationsApi.verify_ad_hoc ...'
  end
  # verify the required parameter 'adhoc_verification_request' is set
  if @api_client.config.client_side_validation && adhoc_verification_request.nil?
    fail ArgumentError, "Missing the required parameter 'adhoc_verification_request' when calling KYCKYBVerificationsApi.verify_ad_hoc"
  end
  # resource path
  local_var_path = '/verifications/adhoc'

  # 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', 'application/problem+json'])
  # 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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

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

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

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

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

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

#verify_with_http_info(verification_request, opts = {}) ⇒ Array<(VerifyResponse, Integer, Hash)>

Verify a customer&#39;s identity Initiate identity verification and run the specified identity checks. Verifying a personal customer requires that the following fields already be set: * &#x60;first_name&#x60; * &#x60;last_name&#x60; * &#x60;dob&#x60; * &#x60;email&#x60; * &#x60;phone_number&#x60; * &#x60;legal_address&#x60; * &#x60;ssn&#x60; Verifying a business customer requires that the following fields already be set: * &#x60;entity_name&#x60; * &#x60;legal_address&#x60;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    An idempotency key is an arbitrary unique value generated by client to detect subsequent retries of the same request. It is recommended that a UUID or a similar random identifier be used as an idempotency key. A different key must be used for each request, unless it is a retry.

Returns:

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

    VerifyResponse data, response status code and response headers



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
305
306
307
308
309
310
# File 'lib/synctera_ruby_sdk/api/kyckyb_verifications_api.rb', line 258

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

  # 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', 'application/problem+json'])
  # 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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

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

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

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

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

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