Class: SyncteraRubySdk::AccountsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AccountsApi

Returns a new instance of AccountsApi.



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

def api_client
  @api_client
end

Instance Method Details

#create_account(account_creation, opts = {}) ⇒ AccountGenericResponse

Create an account Creates an account copying values from account template into the account resource. Any fields defined as part of account creation will overwrite the ones provided from the account template. Required fields: - relationships

Parameters:

  • account_creation (AccountCreation)

    Account 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/accounts_api.rb', line 28

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

#create_account_relationship(account_id, relationship, opts = {}) ⇒ RelationshipResponse

Create account relationship Add a customer to an account

Parameters:

  • account_id (String)

    Unique identifier for the account.

  • relationship (Relationship)

    Account relationship object

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



100
101
102
103
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 100

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

#create_account_relationship_with_http_info(account_id, relationship, opts = {}) ⇒ Array<(RelationshipResponse, Integer, Hash)>

Create account relationship Add a customer to an account

Parameters:

  • account_id (String)

    Unique identifier for the account.

  • relationship (Relationship)

    Account relationship object

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

    RelationshipResponse data, response status code and response headers



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 112

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

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

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

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

#create_account_resource_product(account_product, opts = {}) ⇒ AccountProduct

Create an account product Create an account product. Rates cannot be nil or empty.

Parameters:

  • account_product (AccountProduct)

    Account product 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:



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

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

#create_account_resource_product_with_http_info(account_product, opts = {}) ⇒ Array<(AccountProduct, Integer, Hash)>

Create an account product Create an account product. Rates cannot be nil or empty.

Parameters:

  • account_product (AccountProduct)

    Account product 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<(AccountProduct, Integer, Hash)>)

    AccountProduct data, response status code and response headers



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/accounts_api.rb', line 187

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

  # 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'])
  # 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()

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

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

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

#create_account_template(account_template, opts = {}) ⇒ AccountTemplateResponse

Create an account template Create an account template. An account template is needed to create an account in a lead mode.

Parameters:

  • account_template (AccountTemplate)

    Account template 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:



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

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

#create_account_template_with_http_info(account_template, opts = {}) ⇒ Array<(AccountTemplateResponse, Integer, Hash)>

Create an account template Create an account template. An account template is needed to create an account in a lead mode.

Parameters:

  • account_template (AccountTemplate)

    Account template 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<(AccountTemplateResponse, Integer, Hash)>)

    AccountTemplateResponse 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/accounts_api.rb', line 258

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

  # 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'])
  # 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()

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

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

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

#create_account_with_http_info(account_creation, opts = {}) ⇒ Array<(AccountGenericResponse, Integer, Hash)>

Create an account Creates an account copying values from account template into the account resource. Any fields defined as part of account creation will overwrite the ones provided from the account template. Required fields: - relationships

Parameters:

  • account_creation (AccountCreation)

    Account 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<(AccountGenericResponse, Integer, Hash)>)

    AccountGenericResponse 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/accounts_api.rb', line 39

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

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

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

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

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

#delete_account_relationship(account_id, relationship_id, opts = {}) ⇒ DeleteResponse

Delete account relationship Delete account relationship

Parameters:

  • account_id (String)

    Unique identifier for the account.

  • relationship_id (String)

    Relationship ID of the account associate with the account entity

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

    the optional parameters

Returns:



318
319
320
321
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 318

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

#delete_account_relationship_with_http_info(account_id, relationship_id, opts = {}) ⇒ Array<(DeleteResponse, Integer, Hash)>

Delete account relationship Delete account relationship

Parameters:

  • account_id (String)

    Unique identifier for the account.

  • relationship_id (String)

    Relationship ID of the account associate with the account entity

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

    the optional parameters

Returns:

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

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

def (, relationship_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountsApi.delete_account_relationship ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.delete_account_relationship"
  end
  # verify the required parameter 'relationship_id' is set
  if @api_client.config.client_side_validation && relationship_id.nil?
    fail ArgumentError, "Missing the required parameter 'relationship_id' when calling AccountsApi.delete_account_relationship"
  end
  # resource path
  local_var_path = '/accounts/{account_id}/relationships/{relationship_id}'.sub('{' + 'account_id' + '}', CGI.escape(.to_s)).sub('{' + 'relationship_id' + '}', CGI.escape(relationship_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 => :"AccountsApi.delete_account_relationship",
    :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: AccountsApi#delete_account_relationship\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_account_template(template_id, opts = {}) ⇒ DeleteResponse

Delete account template Delete account template

Parameters:

  • template_id (String)

    Account Template ID

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

    the optional parameters

Returns:



386
387
388
389
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 386

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

#delete_account_template_with_http_info(template_id, opts = {}) ⇒ Array<(DeleteResponse, Integer, Hash)>

Delete account template Delete account template

Parameters:

  • template_id (String)

    Account Template ID

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

    the optional parameters

Returns:

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

    DeleteResponse data, response status code and response headers



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

def (template_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountsApi.delete_account_template ...'
  end
  # verify the required parameter 'template_id' is set
  if @api_client.config.client_side_validation && template_id.nil?
    fail ArgumentError, "Missing the required parameter 'template_id' when calling AccountsApi.delete_account_template"
  end
  # resource path
  local_var_path = '/accounts/templates/{template_id}'.sub('{' + 'template_id' + '}', CGI.escape(template_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 => :"AccountsApi.delete_account_template",
    :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: AccountsApi#delete_account_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_account(account_id, opts = {}) ⇒ AccountGenericResponse

Get account Get an account

Parameters:

  • account_id (String)

    Unique identifier for the account.

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

    the optional parameters

Returns:



449
450
451
452
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 449

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

#get_account_relationship(account_id, relationship_id, opts = {}) ⇒ RelationshipResponse

Get account relationship Get account relationship by ID

Parameters:

  • account_id (String)

    Unique identifier for the account.

  • relationship_id (String)

    Relationship ID of the account associate with the account entity

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

    the optional parameters

Returns:



513
514
515
516
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 513

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

#get_account_relationship_with_http_info(account_id, relationship_id, opts = {}) ⇒ Array<(RelationshipResponse, Integer, Hash)>

Get account relationship Get account relationship by ID

Parameters:

  • account_id (String)

    Unique identifier for the account.

  • relationship_id (String)

    Relationship ID of the account associate with the account entity

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

    the optional parameters

Returns:

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

    RelationshipResponse data, response status code and response headers



524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 524

def (, relationship_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountsApi.get_account_relationship ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_account_relationship"
  end
  # verify the required parameter 'relationship_id' is set
  if @api_client.config.client_side_validation && relationship_id.nil?
    fail ArgumentError, "Missing the required parameter 'relationship_id' when calling AccountsApi.get_account_relationship"
  end
  # resource path
  local_var_path = '/accounts/{account_id}/relationships/{relationship_id}'.sub('{' + 'account_id' + '}', CGI.escape(.to_s)).sub('{' + 'relationship_id' + '}', CGI.escape(relationship_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] || 'RelationshipResponse'

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

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

#get_account_template(template_id, opts = {}) ⇒ AccountTemplateResponse

Get account template Get an account template

Parameters:

  • template_id (String)

    Account Template ID

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

    the optional parameters

Returns:



581
582
583
584
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 581

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

#get_account_template_with_http_info(template_id, opts = {}) ⇒ Array<(AccountTemplateResponse, Integer, Hash)>

Get account template Get an account template

Parameters:

  • template_id (String)

    Account Template ID

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

    the optional parameters

Returns:

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

    AccountTemplateResponse data, response status code and response headers



591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 591

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

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

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

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

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

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

#get_account_with_http_info(account_id, opts = {}) ⇒ Array<(AccountGenericResponse, Integer, Hash)>

Get account Get an account

Parameters:

  • account_id (String)

    Unique identifier for the account.

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

    the optional parameters

Returns:

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

    AccountGenericResponse data, response status code and response headers



459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 459

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

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

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

#list_account_relationship(account_id, opts = {}) ⇒ RelationshipList

List account relationships List all customers of an account

Parameters:

  • account_id (String)

    Unique identifier for the account.

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

    the optional parameters

Options Hash (opts):

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

Returns:



646
647
648
649
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 646

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

#list_account_relationship_with_http_info(account_id, opts = {}) ⇒ Array<(RelationshipList, Integer, Hash)>

List account relationships List all customers of an account

Parameters:

  • account_id (String)

    Unique identifier for the account.

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

    the optional parameters

Options Hash (opts):

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

Returns:

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

    RelationshipList data, response status code and response headers



658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 658

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

  # resource path
  local_var_path = '/accounts/{account_id}/relationships'.sub('{' + 'account_id' + '}', CGI.escape(.to_s))

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

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

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

#list_account_resource_products(product_type, opts = {}) ⇒ AccountProductList

List account products List account Products

Parameters:

  • product_type (String)

    Type of account product

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

    the optional parameters

Options Hash (opts):

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

    Date range filtering for type INTEREST. All rates in interest resource have to have valid_from later or equal to start_date.

  • :end_date (Date)

    Date range filtering for type INTEREST. All rates in interest resource have to have valid_to earlier or equal to end_date.

  • :id (String)

    ID of account product. Multiple IDs can be provided as a comma-separated list.

Returns:



722
723
724
725
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 722

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

#list_account_resource_products_with_http_info(product_type, opts = {}) ⇒ Array<(AccountProductList, Integer, Hash)>

List account products List account Products

Parameters:

  • product_type (String)

    Type of account product

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

    the optional parameters

Options Hash (opts):

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

    Date range filtering for type INTEREST. All rates in interest resource have to have valid_from later or equal to start_date.

  • :end_date (Date)

    Date range filtering for type INTEREST. All rates in interest resource have to have valid_to earlier or equal to end_date.

  • :id (String)

    ID of account product. Multiple IDs can be provided as a comma-separated list.

Returns:

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

    AccountProductList data, response status code and response headers



737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 737

def (product_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountsApi.list_account_resource_products ...'
  end
  # verify the required parameter 'product_type' is set
  if @api_client.config.client_side_validation && product_type.nil?
    fail ArgumentError, "Missing the required parameter 'product_type' when calling AccountsApi.list_account_resource_products"
  end
  # verify enum value
  allowable_values = ["FEE", "INTEREST"]
  if @api_client.config.client_side_validation && !allowable_values.include?(product_type)
    fail ArgumentError, "invalid value for \"product_type\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountsApi.list_account_resource_products, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/accounts/products'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'product_type'] = product_type
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil?
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?

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

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

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

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

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

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

#list_account_templates(opts = {}) ⇒ TemplateList

List account templates List account templates

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :account_type (AccountType)

    The type of the account

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

Returns:



807
808
809
810
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 807

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

#list_account_templates_with_http_info(opts = {}) ⇒ Array<(TemplateList, Integer, Hash)>

List account templates List account templates

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :account_type (AccountType)

    The type of the account

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

Returns:

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

    TemplateList data, response status code and response headers



819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 819

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

  # resource path
  local_var_path = '/accounts/templates'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'account_type'] = opts[:'account_type'] if !opts[:'account_type'].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'])

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

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

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

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

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

#list_accounts(opts = {}) ⇒ AccountList

List accounts Get paginated list of Accounts associated

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (Array<String>)

    Account ID(s). Multiple IDs can be provided as a comma-separated list.

  • :account_type (AccountType)

    The type of the account

  • :linked_account_id (Array<String>)

    Return only resources that are linked to the specified backing account in balance_floor or balance_ceiling. Multiple IDs can be provided as a comma-separated list.

  • :overdraft_account_id (Array<String>)

    Overdraft account ID(s). Multiple IDs can be provided as a comma-separated list. This parameter is deprecated and will be removed in a future API version. Use linked_account_id instead.

  • :overflow_account_id (Array<String>)

    Overflow account ID(s). Multiple IDs can be provided as a comma-separated list. This parameter is deprecated and will be removed in a future API version. Use linked_account_id instead.

  • :account_number (Array<String>)

    Account number(s). Multiple account numbers can be provided as a comma-separated list. When only a single account number is provided, any * characters in the string are wildcards, and match any characters.

  • :status (Status)
  • :interest_product_id (String)

    Interest product ID that accounts associate with. Multiple IDs can be provided as a comma-separated list.

  • :customer_type (CustomerType)

    Customer type of the account, BUSINESS or PERSONAL

  • :spend_control_ids (Array<String>)

    Spend Control ID(s). Multiple IDs can be provided as a comma-separated list. Return only resources that use the specified Spend Controls.

  • :nickname (String)

    Nickname of the account

  • :customer_id (String)

    The customer&#39;s unique identifier

  • :business_id (Array<String>)

    Unique identifier for the business. 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.

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

    Specifies the sort order for the returned accounts.

Returns:



893
894
895
896
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 893

def list_accounts(opts = {})
  data, _status_code, _headers = list_accounts_with_http_info(opts)
  data
end

#list_accounts_with_http_info(opts = {}) ⇒ Array<(AccountList, Integer, Hash)>

List accounts Get paginated list of Accounts associated

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (Array<String>)

    Account ID(s). Multiple IDs can be provided as a comma-separated list.

  • :account_type (AccountType)

    The type of the account

  • :linked_account_id (Array<String>)

    Return only resources that are linked to the specified backing account in balance_floor or balance_ceiling. Multiple IDs can be provided as a comma-separated list.

  • :overdraft_account_id (Array<String>)

    Overdraft account ID(s). Multiple IDs can be provided as a comma-separated list. This parameter is deprecated and will be removed in a future API version. Use linked_account_id instead.

  • :overflow_account_id (Array<String>)

    Overflow account ID(s). Multiple IDs can be provided as a comma-separated list. This parameter is deprecated and will be removed in a future API version. Use linked_account_id instead.

  • :account_number (Array<String>)

    Account number(s). Multiple account numbers can be provided as a comma-separated list. When only a single account number is provided, any * characters in the string are wildcards, and match any characters.

  • :status (Status)
  • :interest_product_id (String)

    Interest product ID that accounts associate with. Multiple IDs can be provided as a comma-separated list.

  • :customer_type (CustomerType)

    Customer type of the account, BUSINESS or PERSONAL

  • :spend_control_ids (Array<String>)

    Spend Control ID(s). Multiple IDs can be provided as a comma-separated list. Return only resources that use the specified Spend Controls.

  • :nickname (String)

    Nickname of the account

  • :customer_id (String)

    The customer&#39;s unique identifier

  • :business_id (Array<String>)

    Unique identifier for the business. 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.

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

    Specifies the sort order for the returned accounts.

Returns:

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

    AccountList data, response status code and response headers



921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 921

def list_accounts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountsApi.list_accounts ...'
  end
  if @api_client.config.client_side_validation && !opts[:'spend_control_ids'].nil? && opts[:'spend_control_ids'].length > 10
    fail ArgumentError, 'invalid value for "opts[:"spend_control_ids"]" when calling AccountsApi.list_accounts, number of items must be less than or equal to 10.'
  end

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

  allowable_values = ["account_number:asc", "account_number:desc", "account_type:asc", "account_type:desc", "first_name:asc", "first_name:desc", "last_name:asc", "last_name: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 = '/accounts'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = @api_client.build_collection_param(opts[:'id'], :csv) if !opts[:'id'].nil?
  query_params[:'account_type'] = opts[:'account_type'] if !opts[:'account_type'].nil?
  query_params[:'linked_account_id'] = @api_client.build_collection_param(opts[:'linked_account_id'], :csv) if !opts[:'linked_account_id'].nil?
  query_params[:'overdraft_account_id'] = @api_client.build_collection_param(opts[:'overdraft_account_id'], :csv) if !opts[:'overdraft_account_id'].nil?
  query_params[:'overflow_account_id'] = @api_client.build_collection_param(opts[:'overflow_account_id'], :csv) if !opts[:'overflow_account_id'].nil?
  query_params[:'account_number'] = @api_client.build_collection_param(opts[:'account_number'], :csv) if !opts[:'account_number'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'interest_product_id'] = opts[:'interest_product_id'] if !opts[:'interest_product_id'].nil?
  query_params[:'customer_type'] = opts[:'customer_type'] if !opts[:'customer_type'].nil?
  query_params[:'spend_control_ids'] = @api_client.build_collection_param(opts[:'spend_control_ids'], :csv) if !opts[:'spend_control_ids'].nil?
  query_params[:'nickname'] = opts[:'nickname'] if !opts[:'nickname'].nil?
  query_params[:'customer_id'] = opts[:'customer_id'] if !opts[:'customer_id'].nil?
  query_params[:'business_id'] = @api_client.build_collection_param(opts[:'business_id'], :csv) if !opts[:'business_id'].nil?
  query_params[:'person_id'] = @api_client.build_collection_param(opts[:'person_id'], :csv) if !opts[:'person_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[:'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?

  # 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] || 'AccountList'

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

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

#patch_account(account_id, patch_account, opts = {}) ⇒ AccountGenericResponse

Patch account Patch account. Immutable fields: - account_number - account_type - account_template_id - customer_type Please note: - Other fields cannot be modified when access_status is FROZEN. - access_status has to be patched individually without other fields.

Parameters:

  • account_id (String)

    Unique identifier for the account.

  • patch_account (PatchAccount)

    Account fields to be patched

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



1003
1004
1005
1006
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 1003

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

#patch_account_product(product_id, patch_account_product, opts = {}) ⇒ AccountProduct

Patch account product Patch account product. Rates requires at minimum 1 entry if specified.

Parameters:

  • product_id (String)

    Account Product ID

  • patch_account_product (PatchAccountProduct)

    Account product fields to be patched

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



1080
1081
1082
1083
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 1080

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

#patch_account_product_with_http_info(product_id, patch_account_product, opts = {}) ⇒ Array<(AccountProduct, Integer, Hash)>

Patch account product Patch account product. Rates requires at minimum 1 entry if specified.

Parameters:

  • product_id (String)

    Account Product ID

  • patch_account_product (PatchAccountProduct)

    Account product fields to be patched

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

    AccountProduct data, response status code and response headers



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

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

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

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

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

#patch_account_with_http_info(account_id, patch_account, opts = {}) ⇒ Array<(AccountGenericResponse, Integer, Hash)>

Patch account Patch account. Immutable fields: - account_number - account_type - account_template_id - customer_type Please note: - Other fields cannot be modified when access_status is FROZEN. - access_status has to be patched individually without other fields.

Parameters:

  • account_id (String)

    Unique identifier for the account.

  • patch_account (PatchAccount)

    Account fields to be patched

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

    AccountGenericResponse data, response status code and response headers



1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 1015

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

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

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

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

#update_account(account_id, update_account, opts = {}) ⇒ AccountGenericResponse

Update account > Deprecated. Please use PATCH /v0/accounts. This route only supports types CHECKING and SAVING. Update account Shadow mode required fields: - account_number - status Lead mode required fields: - All fields are required. Please note: - access_status needs to be in ACTIVE. - PUT request cannot change access_status.

Parameters:

  • account_id (String)

    Unique identifier for the account.

  • update_account (UpdateAccount)

    Account to update

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

    the optional parameters

Returns:



1156
1157
1158
1159
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 1156

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

#update_account_relationship(account_id, relationship_id, relationship, opts = {}) ⇒ RelationshipResponse

Update account relationship Update account relationship. Only relationship_type can be updated. customer_id should not be modified.

Parameters:

  • account_id (String)

    Unique identifier for the account.

  • relationship_id (String)

    Relationship ID of the account associate with the account entity

  • relationship (Relationship)

    Account relationship to be updated

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

    the optional parameters

Returns:



1231
1232
1233
1234
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 1231

def (, relationship_id, relationship, opts = {})
  data, _status_code, _headers = (, relationship_id, relationship, opts)
  data
end

#update_account_relationship_with_http_info(account_id, relationship_id, relationship, opts = {}) ⇒ Array<(RelationshipResponse, Integer, Hash)>

Update account relationship Update account relationship. Only relationship_type can be updated. customer_id should not be modified.

Parameters:

  • account_id (String)

    Unique identifier for the account.

  • relationship_id (String)

    Relationship ID of the account associate with the account entity

  • relationship (Relationship)

    Account relationship to be updated

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

    the optional parameters

Returns:

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

    RelationshipResponse data, response status code and response headers



1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 1243

def (, relationship_id, relationship, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountsApi.update_account_relationship ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.update_account_relationship"
  end
  # verify the required parameter 'relationship_id' is set
  if @api_client.config.client_side_validation && relationship_id.nil?
    fail ArgumentError, "Missing the required parameter 'relationship_id' when calling AccountsApi.update_account_relationship"
  end
  # verify the required parameter 'relationship' is set
  if @api_client.config.client_side_validation && relationship.nil?
    fail ArgumentError, "Missing the required parameter 'relationship' when calling AccountsApi.update_account_relationship"
  end
  # resource path
  local_var_path = '/accounts/{account_id}/relationships/{relationship_id}'.sub('{' + 'account_id' + '}', CGI.escape(.to_s)).sub('{' + 'relationship_id' + '}', CGI.escape(relationship_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

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

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

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

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

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

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

#update_account_template(template_id, account_template, opts = {}) ⇒ AccountTemplateResponse

Update account template Update account template

Parameters:

  • template_id (String)

    Account Template ID

  • account_template (AccountTemplate)

    Account template to update

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

    the optional parameters

Returns:



1310
1311
1312
1313
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 1310

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

#update_account_template_with_http_info(template_id, account_template, opts = {}) ⇒ Array<(AccountTemplateResponse, Integer, Hash)>

Update account template Update account template

Parameters:

  • template_id (String)

    Account Template ID

  • account_template (AccountTemplate)

    Account template to update

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

    the optional parameters

Returns:

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

    AccountTemplateResponse data, response status code and response headers



1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 1321

def (template_id, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountsApi.update_account_template ...'
  end
  # verify the required parameter 'template_id' is set
  if @api_client.config.client_side_validation && template_id.nil?
    fail ArgumentError, "Missing the required parameter 'template_id' when calling AccountsApi.update_account_template"
  end
  # verify the required parameter 'account_template' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_template' when calling AccountsApi.update_account_template"
  end
  # resource path
  local_var_path = '/accounts/templates/{template_id}'.sub('{' + 'template_id' + '}', CGI.escape(template_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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

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

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

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

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

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

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

#update_account_with_http_info(account_id, update_account, opts = {}) ⇒ Array<(AccountGenericResponse, Integer, Hash)>

Update account &gt; Deprecated. Please use PATCH /v0/accounts. This route only supports types CHECKING and SAVING. Update account Shadow mode required fields: - account_number - status Lead mode required fields: - All fields are required. Please note: - access_status needs to be in ACTIVE. - PUT request cannot change access_status.

Parameters:

  • account_id (String)

    Unique identifier for the account.

  • update_account (UpdateAccount)

    Account to update

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

    the optional parameters

Returns:

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

    AccountGenericResponse data, response status code and response headers



1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
# File 'lib/synctera_ruby_sdk/api/accounts_api.rb', line 1167

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

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

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

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

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

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

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