Class: SyncteraRubySdk::KYCVerificationDeprecatedApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ KYCVerificationDeprecatedApi

Returns a new instance of KYCVerificationDeprecatedApi.



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

def api_client
  @api_client
end

Instance Method Details

#create_customer_verification_result(customer_id, customer_verification_result, opts = {}) ⇒ CustomerVerificationResult

Create a customer verification result Create a verification result for a customer. This endpoint will be removed in API v1. Use ‘POST /v0/verifications` instead.

Parameters:

  • customer_id (String)

    The customer's unique identifier

  • customer_verification_result (CustomerVerificationResult)

    Customer 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:



29
30
31
32
# File 'lib/synctera_ruby_sdk/api/kyc_verification_deprecated_api.rb', line 29

def create_customer_verification_result(customer_id, customer_verification_result, opts = {})
  data, _status_code, _headers = create_customer_verification_result_with_http_info(customer_id, customer_verification_result, opts)
  data
end

#create_customer_verification_result_with_http_info(customer_id, customer_verification_result, opts = {}) ⇒ Array<(CustomerVerificationResult, Integer, Hash)>

Create a customer verification result Create a verification result for a customer. This endpoint will be removed in API v1. Use &#x60;POST /v0/verifications&#x60; instead.

Parameters:

  • customer_id (String)

    The customer&#39;s unique identifier

  • customer_verification_result (CustomerVerificationResult)

    Customer 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<(CustomerVerificationResult, Integer, Hash)>)

    CustomerVerificationResult data, response status code and response headers



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
92
93
94
95
96
97
# File 'lib/synctera_ruby_sdk/api/kyc_verification_deprecated_api.rb', line 41

def create_customer_verification_result_with_http_info(customer_id, customer_verification_result, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KYCVerificationDeprecatedApi.create_customer_verification_result ...'
  end
  # verify the required parameter 'customer_id' is set
  if @api_client.config.client_side_validation && customer_id.nil?
    fail ArgumentError, "Missing the required parameter 'customer_id' when calling KYCVerificationDeprecatedApi.create_customer_verification_result"
  end
  # verify the required parameter 'customer_verification_result' is set
  if @api_client.config.client_side_validation && customer_verification_result.nil?
    fail ArgumentError, "Missing the required parameter 'customer_verification_result' when calling KYCVerificationDeprecatedApi.create_customer_verification_result"
  end
  # resource path
  local_var_path = '/customers/{customer_id}/verifications'.sub('{' + 'customer_id' + '}', CGI.escape(customer_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'])
  # 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(customer_verification_result)

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

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

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

#get_verification(customer_id, verification_id, opts = {}) ⇒ CustomerVerificationResult

Get verification result Get verification result by ID. This endpoint will be removed in API v1. Use ‘GET /v0/verifications/verification_id` instead.

Parameters:

  • customer_id (String)

    The customer&#39;s unique identifier

  • verification_id (String)

    Unique identifier for the verification.

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

    the optional parameters

Returns:



105
106
107
108
# File 'lib/synctera_ruby_sdk/api/kyc_verification_deprecated_api.rb', line 105

def get_verification(customer_id, verification_id, opts = {})
  data, _status_code, _headers = get_verification_with_http_info(customer_id, verification_id, opts)
  data
end

#get_verification_with_http_info(customer_id, verification_id, opts = {}) ⇒ Array<(CustomerVerificationResult, Integer, Hash)>

Get verification result Get verification result by ID. This endpoint will be removed in API v1. Use &#x60;GET /v0/verifications/verification_id&#x60; instead.

Parameters:

  • customer_id (String)

    The customer&#39;s unique identifier

  • verification_id (String)

    Unique identifier for the verification.

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

    the optional parameters

Returns:

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

    CustomerVerificationResult data, response status code and response headers



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
164
165
166
# File 'lib/synctera_ruby_sdk/api/kyc_verification_deprecated_api.rb', line 116

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

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

  new_options = opts.merge(
    :operation => :"KYCVerificationDeprecatedApi.get_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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: KYCVerificationDeprecatedApi#get_verification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_verifications(customer_id, opts = {}) ⇒ CustomerVerificationResultList

List verification results List verification results. This endpoint will be removed in API v1. Use ‘GET /v0/verifications?customer_id=customer_id` instead.

Parameters:

  • customer_id (String)

    The customer&#39;s unique identifier

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

    the optional parameters

Options Hash (opts):

  • :include_history (Boolean)

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

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

Returns:



176
177
178
179
# File 'lib/synctera_ruby_sdk/api/kyc_verification_deprecated_api.rb', line 176

def list_verifications(customer_id, opts = {})
  data, _status_code, _headers = list_verifications_with_http_info(customer_id, opts)
  data
end

#list_verifications_with_http_info(customer_id, opts = {}) ⇒ Array<(CustomerVerificationResultList, Integer, Hash)>

List verification results List verification results. This endpoint will be removed in API v1. Use &#x60;GET /v0/verifications?customer_id&#x3D;customer_id&#x60; instead.

Parameters:

  • customer_id (String)

    The customer&#39;s unique identifier

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

    the optional parameters

Options Hash (opts):

  • :include_history (Boolean)

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

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

Returns:



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
240
241
242
# File 'lib/synctera_ruby_sdk/api/kyc_verification_deprecated_api.rb', line 189

def list_verifications_with_http_info(customer_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KYCVerificationDeprecatedApi.list_verifications ...'
  end
  # verify the required parameter 'customer_id' is set
  if @api_client.config.client_side_validation && customer_id.nil?
    fail ArgumentError, "Missing the required parameter 'customer_id' when calling KYCVerificationDeprecatedApi.list_verifications"
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling KYCVerificationDeprecatedApi.list_verifications, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/customers/{customer_id}/verifications'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  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] || 'CustomerVerificationResultList'

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

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

#verify_customer(customer_id, customer_verification, opts = {}) ⇒ CustomerVerifyResponse

Verify a customer’s identity Initiate identity verification for a customer 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` This endpoint will be removed in API v1. Use `POST /v0/verifications/verify` instead.

Parameters:

  • customer_id (String)

    The customer&#39;s unique identifier

  • customer_verification (CustomerVerification)

    Customer verification request.

  • 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:



251
252
253
254
# File 'lib/synctera_ruby_sdk/api/kyc_verification_deprecated_api.rb', line 251

def verify_customer(customer_id, customer_verification, opts = {})
  data, _status_code, _headers = verify_customer_with_http_info(customer_id, customer_verification, opts)
  data
end

#verify_customer_with_http_info(customer_id, customer_verification, opts = {}) ⇒ Array<(CustomerVerifyResponse, Integer, Hash)>

Verify a customer&#39;s identity Initiate identity verification for a customer 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; This endpoint will be removed in API v1. Use &#x60;POST /v0/verifications/verify&#x60; instead.

Parameters:

  • customer_id (String)

    The customer&#39;s unique identifier

  • customer_verification (CustomerVerification)

    Customer verification request.

  • 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<(CustomerVerifyResponse, Integer, Hash)>)

    CustomerVerifyResponse data, response status code and response headers



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
311
312
313
314
315
316
317
318
319
# File 'lib/synctera_ruby_sdk/api/kyc_verification_deprecated_api.rb', line 263

def verify_customer_with_http_info(customer_id, customer_verification, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KYCVerificationDeprecatedApi.verify_customer ...'
  end
  # verify the required parameter 'customer_id' is set
  if @api_client.config.client_side_validation && customer_id.nil?
    fail ArgumentError, "Missing the required parameter 'customer_id' when calling KYCVerificationDeprecatedApi.verify_customer"
  end
  # verify the required parameter 'customer_verification' is set
  if @api_client.config.client_side_validation && customer_verification.nil?
    fail ArgumentError, "Missing the required parameter 'customer_verification' when calling KYCVerificationDeprecatedApi.verify_customer"
  end
  # resource path
  local_var_path = '/customers/{customer_id}/verify'.sub('{' + 'customer_id' + '}', CGI.escape(customer_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'])
  # 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(customer_verification)

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

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

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