Class: SyncteraRubySdk::ExternalCardsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ExternalCardsApi

Returns a new instance of ExternalCardsApi.



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

def api_client
  @api_client
end

Instance Method Details

#authenticate3_ds(authenticate3ds_request, opts = {}) ⇒ Authenticate3dsResponse

Authenticate 3DS (beta) > 🚧 Beta > This is a Beta endpoint. Feedback from the community is welcome. We may make breaking changes to this endpoint. Validates the results of an External Card Transfer 3DS authentication challenge.

Parameters:

  • authenticate3ds_request (Authenticate3dsRequest)

    Details of the External Card Transfer 3DS authentication challenge validation.

  • 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/external_cards_api.rb', line 28

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

#authenticate3_ds_with_http_info(authenticate3ds_request, opts = {}) ⇒ Array<(Authenticate3dsResponse, Integer, Hash)>

Authenticate 3DS (beta) &gt; 🚧 Beta &gt; This is a Beta endpoint. Feedback from the community is welcome. We may make breaking changes to this endpoint. Validates the results of an External Card Transfer 3DS authentication challenge.

Parameters:

  • authenticate3ds_request (Authenticate3dsRequest)

    Details of the External Card Transfer 3DS authentication challenge validation.

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

    Authenticate3dsResponse 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/external_cards_api.rb', line 39

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

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

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

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

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

#create_external_card_from_token(external_card_request, opts = {}) ⇒ ExternalCardResponse

Create External Card from token Create an External Card from token. The token is obtained through the iFrame, along with cardholder name, which also must be provided. Cardholder name is matched against customer name.

Parameters:

  • external_card_request (ExternalCardRequest)

    Details of the External Card 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:



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

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

#create_external_card_from_token_with_http_info(external_card_request, opts = {}) ⇒ Array<(ExternalCardResponse, Integer, Hash)>

Create External Card from token Create an External Card from token. The token is obtained through the iFrame, along with cardholder name, which also must be provided. Cardholder name is matched against customer name.

Parameters:

  • external_card_request (ExternalCardRequest)

    Details of the External Card 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<(ExternalCardResponse, Integer, Hash)>)

    ExternalCardResponse 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/external_cards_api.rb', line 110

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

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

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

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

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

#create_external_card_transfer(transfer_request, opts = {}) ⇒ TransferResponse

Create External Card Transfer Create an External Card Transfer

Parameters:

  • transfer_request (TransferRequest)

    Details of the External Card Transfer 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:



170
171
172
173
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 170

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

#create_external_card_transfer_reversal(transfer_id, transfer_reversal_request, opts = {}) ⇒ TransferResponse

Create External Card Transfer Reversal Create an External Card Transfer Reversal

Parameters:

  • transfer_id (String)

    The unique identifier of a transfer

  • transfer_reversal_request (TransferReversalRequest)

    Details of the External Card Transfer Reversal 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:



242
243
244
245
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 242

def create_external_card_transfer_reversal(transfer_id, transfer_reversal_request, opts = {})
  data, _status_code, _headers = create_external_card_transfer_reversal_with_http_info(transfer_id, transfer_reversal_request, opts)
  data
end

#create_external_card_transfer_reversal_with_http_info(transfer_id, transfer_reversal_request, opts = {}) ⇒ Array<(TransferResponse, Integer, Hash)>

Create External Card Transfer Reversal Create an External Card Transfer Reversal

Parameters:

  • transfer_id (String)

    The unique identifier of a transfer

  • transfer_reversal_request (TransferReversalRequest)

    Details of the External Card Transfer Reversal 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<(TransferResponse, Integer, Hash)>)

    TransferResponse data, response status code and response headers



254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 254

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

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

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

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

#create_external_card_transfer_with_http_info(transfer_request, opts = {}) ⇒ Array<(TransferResponse, Integer, Hash)>

Create External Card Transfer Create an External Card Transfer

Parameters:

  • transfer_request (TransferRequest)

    Details of the External Card Transfer 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<(TransferResponse, Integer, Hash)>)

    TransferResponse data, response status code and response headers



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 181

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

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

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

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

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

#delete_external_card(external_card_id, opts = {}) ⇒ DeleteResponse

Delete External Card Delete an External Card

Parameters:

  • external_card_id (String)

    The unique identifier of an external card

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

    the optional parameters

Returns:



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

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

#delete_external_card_with_http_info(external_card_id, opts = {}) ⇒ Array<(DeleteResponse, Integer, Hash)>

Delete External Card Delete an External Card

Parameters:

  • external_card_id (String)

    The unique identifier of an external card

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

    the optional parameters

Returns:

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

    DeleteResponse data, response status code and response headers



327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 327

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

#get_external_card(external_card_id, opts = {}) ⇒ ExternalCardResponse

Get External Card Get an External Card

Parameters:

  • external_card_id (String)

    The unique identifier of an external card

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

    the optional parameters

Returns:



380
381
382
383
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 380

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

#get_external_card_transfer(transfer_id, opts = {}) ⇒ TransferResponse

Get External Card Transfer Get an External Card Transfer

Parameters:

  • transfer_id (String)

    The unique identifier of a transfer

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

    the optional parameters

Returns:



443
444
445
446
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 443

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

#get_external_card_transfer_with_http_info(transfer_id, opts = {}) ⇒ Array<(TransferResponse, Integer, Hash)>

Get External Card Transfer Get an External Card Transfer

Parameters:

  • transfer_id (String)

    The unique identifier of a transfer

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

    the optional parameters

Returns:

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

    TransferResponse data, response status code and response headers



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
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 453

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

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

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

#get_external_card_with_http_info(external_card_id, opts = {}) ⇒ Array<(ExternalCardResponse, Integer, Hash)>

Get External Card Get an External Card

Parameters:

  • external_card_id (String)

    The unique identifier of an external card

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

    the optional parameters

Returns:

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

    ExternalCardResponse data, response status code and response headers



390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 390

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

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

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

#initialize3_ds(initialize3ds_request, opts = {}) ⇒ Initialize3dsResponse

Initialize 3DS (beta) > 🚧 Beta > This is a Beta endpoint. Feedback from the community is welcome. We may make breaking changes to this endpoint. Initializes an External Card Transfer 3DS authentication.

Parameters:

  • initialize3ds_request (Initialize3dsRequest)

    Details of the External Card Transfer 3DS authentication to initialize.

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



507
508
509
510
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 507

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

#initialize3_ds_with_http_info(initialize3ds_request, opts = {}) ⇒ Array<(Initialize3dsResponse, Integer, Hash)>

Initialize 3DS (beta) &gt; 🚧 Beta &gt; This is a Beta endpoint. Feedback from the community is welcome. We may make breaking changes to this endpoint. Initializes an External Card Transfer 3DS authentication.

Parameters:

  • initialize3ds_request (Initialize3dsRequest)

    Details of the External Card Transfer 3DS authentication to initialize.

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

    Initialize3dsResponse data, response status code and response headers



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
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 518

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

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

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

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

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

#list_external_card_transfers(opts = {}) ⇒ TransferListResponse

List External Card Transfers Get a paginated list of External Card Transfers

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer) — default: default to 100
  • :page_token (String)
  • :customer_id (Array<String>)
  • :external_card_id (String)
  • :originating_account_id (Array<String>)
  • :type (TransferType)

    The type of an external transfer

Returns:



582
583
584
585
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 582

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

#list_external_card_transfers_with_http_info(opts = {}) ⇒ Array<(TransferListResponse, Integer, Hash)>

List External Card Transfers Get a paginated list of External Card Transfers

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer) — default: default to 100
  • :page_token (String)
  • :customer_id (Array<String>)
  • :external_card_id (String)
  • :originating_account_id (Array<String>)
  • :type (TransferType)

    The type of an external transfer

Returns:

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

    TransferListResponse data, response status code and response headers



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
638
639
640
641
642
643
644
645
646
647
648
649
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 597

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

  # resource path
  local_var_path = '/external_cards/transfers'

  # 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?
  query_params[:'customer_id'] = @api_client.build_collection_param(opts[:'customer_id'], :csv) if !opts[:'customer_id'].nil?
  query_params[:'external_card_id'] = opts[:'external_card_id'] if !opts[:'external_card_id'].nil?
  query_params[:'originating_account_id'] = @api_client.build_collection_param(opts[:'originating_account_id'], :csv) if !opts[:'originating_account_id'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].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] || 'TransferListResponse'

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

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

#list_external_cards(opts = {}) ⇒ ExternalCardListResponse

List External Cards Get a paginated list of External Cards

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer) — default: default to 100
  • :page_token (String)
  • :customer_id (String)
  • :business_id (String)
  • :status (ExternalCardStatus)

Returns:



660
661
662
663
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 660

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

#list_external_cards_with_http_info(opts = {}) ⇒ Array<(ExternalCardListResponse, Integer, Hash)>

List External Cards Get a paginated list of External Cards

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer) — default: default to 100
  • :page_token (String)
  • :customer_id (String)
  • :business_id (String)
  • :status (ExternalCardStatus)

Returns:

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

    ExternalCardListResponse data, response status code and response headers



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
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 674

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

  # resource path
  local_var_path = '/external_cards'

  # 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?
  query_params[:'customer_id'] = opts[:'customer_id'] if !opts[:'customer_id'].nil?
  query_params[:'business_id'] = opts[:'business_id'] if !opts[:'business_id'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].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] || 'ExternalCardListResponse'

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

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

#lookup3_ds(lookup3ds_request, opts = {}) ⇒ Lookup3dsResponse

Lookup 3DS (beta) > 🚧 Beta > This is a Beta endpoint. Feedback from the community is welcome. We may make breaking changes to this endpoint. Using device collection data, performs a lookup for an External Card Transfer 3DS authentication. The results will indicate whether the transfer is successfully authenticated or if a 3DS challenge is required.

Parameters:

  • lookup3ds_request (Lookup3dsRequest)

    Details of the External Card Transfer 3DS authentication lookup.

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



733
734
735
736
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 733

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

#lookup3_ds_with_http_info(lookup3ds_request, opts = {}) ⇒ Array<(Lookup3dsResponse, Integer, Hash)>

Lookup 3DS (beta) &gt; 🚧 Beta &gt; This is a Beta endpoint. Feedback from the community is welcome. We may make breaking changes to this endpoint. Using device collection data, performs a lookup for an External Card Transfer 3DS authentication. The results will indicate whether the transfer is successfully authenticated or if a 3DS challenge is required.

Parameters:

  • lookup3ds_request (Lookup3dsRequest)

    Details of the External Card Transfer 3DS authentication lookup.

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

    Lookup3dsResponse data, response status code and response headers



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

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

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

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

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

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

#update_external_card(external_card_id, external_card_update_request, opts = {}) ⇒ ExternalCardResponse

Update External Card Update External Card data

Parameters:

  • external_card_id (String)

    The unique identifier of an external card

  • external_card_update_request (ExternalCardUpdateRequest)

    Fields to update

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

    the optional parameters

Returns:



804
805
806
807
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 804

def update_external_card(external_card_id, external_card_update_request, opts = {})
  data, _status_code, _headers = update_external_card_with_http_info(external_card_id, external_card_update_request, opts)
  data
end

#update_external_card_with_http_info(external_card_id, external_card_update_request, opts = {}) ⇒ Array<(ExternalCardResponse, Integer, Hash)>

Update External Card Update External Card data

Parameters:

  • external_card_id (String)

    The unique identifier of an external card

  • external_card_update_request (ExternalCardUpdateRequest)

    Fields to update

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

    the optional parameters

Returns:

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

    ExternalCardResponse data, response status code and response headers



815
816
817
818
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
869
870
# File 'lib/synctera_ruby_sdk/api/external_cards_api.rb', line 815

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

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

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

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