Class: SyncteraRubySdk::PersonsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PersonsApi

Returns a new instance of PersonsApi.



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

def api_client
  @api_client
end

Instance Method Details

#create_person(post_person, opts = {}) ⇒ ResponsePerson

Create a person Create a person who may act as a personal customer or a director/officer/owner of a business. You can then verify the identity of this customer and associate them with other people and accounts.

Parameters:

  • post_person (PostPerson)
  • 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/persons_api.rb', line 28

def create_person(post_person, opts = {})
  data, _status_code, _headers = create_person_with_http_info(post_person, opts)
  data
end

#create_person_with_http_info(post_person, opts = {}) ⇒ Array<(ResponsePerson, Integer, Hash)>

Create a person Create a person who may act as a personal customer or a director/officer/owner of a business. You can then verify the identity of this customer and associate them with other people and accounts.

Parameters:

  • post_person (PostPerson)
  • 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<(ResponsePerson, Integer, Hash)>)

    ResponsePerson 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/persons_api.rb', line 39

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

  # 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(post_person)

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

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

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

#create_personal_id(post_personal_id_w_cust, opts = {}) ⇒ ResponsePersonalIdWCust

Create a personal identifier (beta) > 🚧 Beta > This is an Beta endpoint. Feedback from the community is welcome. We may make breaking changes to this endpoint. Create a personal identifier, e.g. SSN, for this customer

Parameters:

  • post_personal_id_w_cust (PostPersonalIdWCust)
  • 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:



99
100
101
102
# File 'lib/synctera_ruby_sdk/api/persons_api.rb', line 99

def create_personal_id(post_personal_id_w_cust, opts = {})
  data, _status_code, _headers = create_personal_id_with_http_info(post_personal_id_w_cust, opts)
  data
end

#create_personal_id_with_http_info(post_personal_id_w_cust, opts = {}) ⇒ Array<(ResponsePersonalIdWCust, Integer, Hash)>

Create a personal identifier (beta) &gt; 🚧 Beta &gt; This is an Beta endpoint. Feedback from the community is welcome. We may make breaking changes to this endpoint. Create a personal identifier, e.g. SSN, for this customer

Parameters:

  • post_personal_id_w_cust (PostPersonalIdWCust)
  • 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<(ResponsePersonalIdWCust, Integer, Hash)>)

    ResponsePersonalIdWCust 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
161
162
# File 'lib/synctera_ruby_sdk/api/persons_api.rb', line 110

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

  # 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(post_personal_id_w_cust)

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

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

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

#delete_personal_id(personal_id_id, opts = {}) ⇒ DeleteResponse

Delete a personal identifier (beta) > 🚧 Beta > This is a Beta endpoint. Feedback from the community is welcome. We may make breaking changes to this endpoint. Delete personal identifier

Parameters:

  • personal_id_id (String)

    UUID for a personal identifier.

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

    the optional parameters

Returns:



169
170
171
172
# File 'lib/synctera_ruby_sdk/api/persons_api.rb', line 169

def delete_personal_id(personal_id_id, opts = {})
  data, _status_code, _headers = delete_personal_id_with_http_info(personal_id_id, opts)
  data
end

#delete_personal_id_with_http_info(personal_id_id, opts = {}) ⇒ Array<(DeleteResponse, Integer, Hash)>

Delete a personal identifier (beta) &gt; 🚧 Beta &gt; This is a Beta endpoint. Feedback from the community is welcome. We may make breaking changes to this endpoint. Delete personal identifier

Parameters:

  • personal_id_id (String)

    UUID for a personal identifier.

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

    the optional parameters

Returns:

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

    DeleteResponse 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
# File 'lib/synctera_ruby_sdk/api/persons_api.rb', line 179

def delete_personal_id_with_http_info(personal_id_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PersonsApi.delete_personal_id ...'
  end
  # verify the required parameter 'personal_id_id' is set
  if @api_client.config.client_side_validation && personal_id_id.nil?
    fail ArgumentError, "Missing the required parameter 'personal_id_id' when calling PersonsApi.delete_personal_id"
  end
  # resource path
  local_var_path = '/persons/personal_ids/{personal_id_id}'.sub('{' + 'personal_id_id' + '}', CGI.escape(personal_id_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] || 'DeleteResponse'

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

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

#get_person(person_id, opts = {}) ⇒ ResponsePerson

Get person Get person by ID.

Parameters:

  • person_id (String)

    Person&#39;s unique identifier.

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

    the optional parameters

Returns:



232
233
234
235
# File 'lib/synctera_ruby_sdk/api/persons_api.rb', line 232

def get_person(person_id, opts = {})
  data, _status_code, _headers = get_person_with_http_info(person_id, opts)
  data
end

#get_person_with_http_info(person_id, opts = {}) ⇒ Array<(ResponsePerson, Integer, Hash)>

Get person Get person by ID.

Parameters:

  • person_id (String)

    Person&#39;s unique identifier.

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

    the optional parameters

Returns:

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

    ResponsePerson data, response status code and response headers



242
243
244
245
246
247
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
# File 'lib/synctera_ruby_sdk/api/persons_api.rb', line 242

def get_person_with_http_info(person_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PersonsApi.get_person ...'
  end
  # verify the required parameter 'person_id' is set
  if @api_client.config.client_side_validation && person_id.nil?
    fail ArgumentError, "Missing the required parameter 'person_id' when calling PersonsApi.get_person"
  end
  # resource path
  local_var_path = '/persons/{person_id}'.sub('{' + 'person_id' + '}', CGI.escape(person_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] || 'ResponsePerson'

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

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

#list_persons(opts = {}) ⇒ PersonList

List persons Retrieves paginated list of persons associated with the authorized requester.

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.

  • :first_name (String)
  • :last_name (String)
  • :phone_number (String)
  • :email (String)
  • :ssn_last_4 (String)
  • :ban_status (Array<BanStatus>) — default: alpha

    Ban status of the person. Multiple values can be provided as a comma-seperated list of the following: * &#x60;ALLOWED&#x60; – person is not banned or suspended * &#x60;SUSPENDED&#x60; - person is suspended * &#x60;BANNED&#x60; – person is banned

  • :status (Status2)
  • :is_customer (Boolean)

    If true, show only customers. If false, show non-customer parties.

  • :limit (Integer) — default: default to 100
  • :page_token (String)
  • :sort_by (Array<String>)

    Specifies the sort order for the returned persons.

  • :has_accounts (Boolean)

    Filter on resources that have an account(s)

Returns:



307
308
309
310
# File 'lib/synctera_ruby_sdk/api/persons_api.rb', line 307

def list_persons(opts = {})
  data, _status_code, _headers = list_persons_with_http_info(opts)
  data
end

#list_persons_with_http_info(opts = {}) ⇒ Array<(PersonList, Integer, Hash)>

List persons Retrieves paginated list of persons associated with the authorized requester.

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.

  • :first_name (String)
  • :last_name (String)
  • :phone_number (String)
  • :email (String)
  • :ssn_last_4 (String)
  • :ban_status (Array<BanStatus>) — default: alpha

    Ban status of the person. Multiple values can be provided as a comma-seperated list of the following: * &#x60;ALLOWED&#x60; – person is not banned or suspended * &#x60;SUSPENDED&#x60; - person is suspended * &#x60;BANNED&#x60; – person is banned

  • :status (Status2)
  • :is_customer (Boolean)

    If true, show only customers. If false, show non-customer parties.

  • :limit (Integer) — default: default to 100
  • :page_token (String)
  • :sort_by (Array<String>)

    Specifies the sort order for the returned persons.

  • :has_accounts (Boolean)

    Filter on resources that have an account(s)

Returns:

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

    PersonList data, response status code and response headers



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
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
# File 'lib/synctera_ruby_sdk/api/persons_api.rb', line 329

def list_persons_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PersonsApi.list_persons ...'
  end
  if @api_client.config.client_side_validation && !opts[:'ssn_last_4'].nil? && opts[:'ssn_last_4'].to_s.length > 4
    fail ArgumentError, 'invalid value for "opts[:"ssn_last_4"]" when calling PersonsApi.list_persons, the character length must be smaller than or equal to 4.'
  end

  if @api_client.config.client_side_validation && !opts[:'ssn_last_4'].nil? && opts[:'ssn_last_4'].to_s.length < 4
    fail ArgumentError, 'invalid value for "opts[:"ssn_last_4"]" when calling PersonsApi.list_persons, the character length must be great than or equal to 4.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PersonsApi.list_persons, must be greater than or equal to 1.'
  end

  allowable_values = ["first_name:asc", "first_name:desc", "last_name:asc", "last_name:desc", "creation_time:asc", "creation_time:desc", "last_updated_time:asc", "last_updated_time:desc"]
  if @api_client.config.client_side_validation && opts[:'sort_by'] && !opts[:'sort_by'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"sort_by\", must include one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/persons'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = @api_client.build_collection_param(opts[:'id'], :csv) if !opts[:'id'].nil?
  query_params[:'first_name'] = opts[:'first_name'] if !opts[:'first_name'].nil?
  query_params[:'last_name'] = opts[:'last_name'] if !opts[:'last_name'].nil?
  query_params[:'phone_number'] = opts[:'phone_number'] if !opts[:'phone_number'].nil?
  query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
  query_params[:'ssn_last_4'] = opts[:'ssn_last_4'] if !opts[:'ssn_last_4'].nil?
  query_params[:'ban_status'] = @api_client.build_collection_param(opts[:'ban_status'], :csv) if !opts[:'ban_status'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'is_customer'] = opts[:'is_customer'] if !opts[:'is_customer'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil?
  query_params[:'sort_by'] = @api_client.build_collection_param(opts[:'sort_by'], :csv) if !opts[:'sort_by'].nil?
  query_params[:'has_accounts'] = opts[:'has_accounts'] if !opts[:'has_accounts'].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] || 'PersonList'

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

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

#update_person(person_id, patch_person, opts = {}) ⇒ ResponsePerson

Update person Update person by ID.

Parameters:

  • person_id (String)

    Person&#39;s unique identifier.

  • patch_person (PatchPerson)
  • 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:



409
410
411
412
# File 'lib/synctera_ruby_sdk/api/persons_api.rb', line 409

def update_person(person_id, patch_person, opts = {})
  data, _status_code, _headers = update_person_with_http_info(person_id, patch_person, opts)
  data
end

#update_person_with_http_info(person_id, patch_person, opts = {}) ⇒ Array<(ResponsePerson, Integer, Hash)>

Update person Update person by ID.

Parameters:

  • person_id (String)

    Person&#39;s unique identifier.

  • patch_person (PatchPerson)
  • 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<(ResponsePerson, Integer, Hash)>)

    ResponsePerson data, response status code and response headers



421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
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
# File 'lib/synctera_ruby_sdk/api/persons_api.rb', line 421

def update_person_with_http_info(person_id, patch_person, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PersonsApi.update_person ...'
  end
  # verify the required parameter 'person_id' is set
  if @api_client.config.client_side_validation && person_id.nil?
    fail ArgumentError, "Missing the required parameter 'person_id' when calling PersonsApi.update_person"
  end
  # verify the required parameter 'patch_person' is set
  if @api_client.config.client_side_validation && patch_person.nil?
    fail ArgumentError, "Missing the required parameter 'patch_person' when calling PersonsApi.update_person"
  end
  # resource path
  local_var_path = '/persons/{person_id}'.sub('{' + 'person_id' + '}', CGI.escape(person_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(patch_person)

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

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

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

#update_personal_id(personal_id_id, patch_personal_id, opts = {}) ⇒ ResponsePersonalIdWCust

Update a personal identifier (beta) > 🚧 Beta > This is a Beta endpoint. Feedback from the community is welcome. We may make breaking changes to this endpoint. Update a personal identifier, e.g. SSN, for this customer

Parameters:

  • personal_id_id (String)

    UUID for a personal identifier.

  • patch_personal_id (PatchPersonalId)
  • 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:



486
487
488
489
# File 'lib/synctera_ruby_sdk/api/persons_api.rb', line 486

def update_personal_id(personal_id_id, patch_personal_id, opts = {})
  data, _status_code, _headers = update_personal_id_with_http_info(personal_id_id, patch_personal_id, opts)
  data
end

#update_personal_id_with_http_info(personal_id_id, patch_personal_id, opts = {}) ⇒ Array<(ResponsePersonalIdWCust, Integer, Hash)>

Update a personal identifier (beta) &gt; 🚧 Beta &gt; This is a Beta endpoint. Feedback from the community is welcome. We may make breaking changes to this endpoint. Update a personal identifier, e.g. SSN, for this customer

Parameters:

  • personal_id_id (String)

    UUID for a personal identifier.

  • patch_personal_id (PatchPersonalId)
  • 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<(ResponsePersonalIdWCust, Integer, Hash)>)

    ResponsePersonalIdWCust data, response status code and response headers



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

def update_personal_id_with_http_info(personal_id_id, patch_personal_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PersonsApi.update_personal_id ...'
  end
  # verify the required parameter 'personal_id_id' is set
  if @api_client.config.client_side_validation && personal_id_id.nil?
    fail ArgumentError, "Missing the required parameter 'personal_id_id' when calling PersonsApi.update_personal_id"
  end
  # verify the required parameter 'patch_personal_id' is set
  if @api_client.config.client_side_validation && patch_personal_id.nil?
    fail ArgumentError, "Missing the required parameter 'patch_personal_id' when calling PersonsApi.update_personal_id"
  end
  # resource path
  local_var_path = '/persons/personal_ids/{personal_id_id}'.sub('{' + 'personal_id_id' + '}', CGI.escape(personal_id_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(patch_personal_id)

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

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

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