Class: Solifyn::PayoutsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/solifyn/api/payouts_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PayoutsApi

Returns a new instance of PayoutsApi.



19
20
21
# File 'lib/solifyn/api/payouts_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/solifyn/api/payouts_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#payouts_create_withdrawal(withdrawal_create, opts = {}) ⇒ Withdrawal

Create Withdrawal Initiate a balance withdrawal transfer request.

Parameters:

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

    the optional parameters

Returns:



27
28
29
30
# File 'lib/solifyn/api/payouts_api.rb', line 27

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

#payouts_create_withdrawal_with_http_info(withdrawal_create, opts = {}) ⇒ Array<(Withdrawal, Integer, Hash)>

Create Withdrawal Initiate a balance withdrawal transfer request.

Parameters:

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

    the optional parameters

Returns:

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

    Withdrawal data, response status code and response headers



37
38
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
# File 'lib/solifyn/api/payouts_api.rb', line 37

def payouts_create_withdrawal_with_http_info(withdrawal_create, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayoutsApi.payouts_create_withdrawal ...'
  end
  # verify the required parameter 'withdrawal_create' is set
  if @api_client.config.client_side_validation && withdrawal_create.nil?
    fail ArgumentError, "Missing the required parameter 'withdrawal_create' when calling PayoutsApi.payouts_create_withdrawal"
  end
  # resource path
  local_var_path = '/v1/payouts/withdrawals'

  # 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']) unless header_params['Accept']
  # 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(withdrawal_create)

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

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

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

#payouts_get_account(opts = {}) ⇒ PayoutAccount

Retrieve Payout Account Retrieve general status and information of onboarding payout accounts.

Parameters:

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

    the optional parameters

Returns:



94
95
96
97
# File 'lib/solifyn/api/payouts_api.rb', line 94

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

Create Account Link Generate temporary links for onboarding or viewing portals.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :use_case (String)

    Onboarding link type context

Returns:



152
153
154
155
# File 'lib/solifyn/api/payouts_api.rb', line 152

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

Create Account Link Generate temporary links for onboarding or viewing portals.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :use_case (String)

    Onboarding link type context

Returns:

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

    PayoutAccountLink data, response status code and response headers



162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# File 'lib/solifyn/api/payouts_api.rb', line 162

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayoutsApi.payouts_get_account_link ...'
  end
  allowable_values = ["account_onboarding", "payouts_portal"]
  if @api_client.config.client_side_validation && opts[:'use_case'] && !allowable_values.include?(opts[:'use_case'])
    fail ArgumentError, "invalid value for \"use_case\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/payouts/account-link'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'use_case'] = opts[:'use_case'] if !opts[:'use_case'].nil?

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

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

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

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

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

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

#payouts_get_account_with_http_info(opts = {}) ⇒ Array<(PayoutAccount, Integer, Hash)>

Retrieve Payout Account Retrieve general status and information of onboarding payout accounts.

Parameters:

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

    the optional parameters

Returns:

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

    PayoutAccount data, response status code and response headers



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/solifyn/api/payouts_api.rb', line 103

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayoutsApi.payouts_get_account ...'
  end
  # resource path
  local_var_path = '/v1/payouts/account'

  # 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']) unless header_params['Accept']

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

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

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

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

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

#payouts_get_token(opts = {}) ⇒ PayoutAccessToken

Generate Portal Access Token Generate temporary credentials to access the embed portal.

Parameters:

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

    the optional parameters

Returns:



215
216
217
218
# File 'lib/solifyn/api/payouts_api.rb', line 215

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

#payouts_get_token_with_http_info(opts = {}) ⇒ Array<(PayoutAccessToken, Integer, Hash)>

Generate Portal Access Token Generate temporary credentials to access the embed portal.

Parameters:

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

    the optional parameters

Returns:

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

    PayoutAccessToken data, response status code and response headers



224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# File 'lib/solifyn/api/payouts_api.rb', line 224

def payouts_get_token_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayoutsApi.payouts_get_token ...'
  end
  # resource path
  local_var_path = '/v1/payouts/token'

  # 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']) unless header_params['Accept']

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

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

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

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

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

#payouts_get_withdrawals(opts = {}) ⇒ WithdrawalList

Get Withdrawals List Retrieve withdrawal records for the active business.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Float)

    Page size limit

  • :page (Float)

    Page number

Returns:



274
275
276
277
# File 'lib/solifyn/api/payouts_api.rb', line 274

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

#payouts_get_withdrawals_with_http_info(opts = {}) ⇒ Array<(WithdrawalList, Integer, Hash)>

Get Withdrawals List Retrieve withdrawal records for the active business.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Float)

    Page size limit

  • :page (Float)

    Page number

Returns:

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

    WithdrawalList data, response status code and response headers



285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
# File 'lib/solifyn/api/payouts_api.rb', line 285

def payouts_get_withdrawals_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayoutsApi.payouts_get_withdrawals ...'
  end
  # resource path
  local_var_path = '/v1/payouts/withdrawals'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?

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

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

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

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

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

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

#payouts_list_methods(opts = {}) ⇒ PayoutMethodList

List Payout Methods List saved payout destinations (bank accounts, cards).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Float)
  • :page (Float)

Returns:



337
338
339
340
# File 'lib/solifyn/api/payouts_api.rb', line 337

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

#payouts_list_methods_with_http_info(opts = {}) ⇒ Array<(PayoutMethodList, Integer, Hash)>

List Payout Methods List saved payout destinations (bank accounts, cards).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Float)
  • :page (Float)

Returns:

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

    PayoutMethodList data, response status code and response headers



348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/solifyn/api/payouts_api.rb', line 348

def payouts_list_methods_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayoutsApi.payouts_list_methods ...'
  end
  # resource path
  local_var_path = '/v1/payouts/methods'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?

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

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

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

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

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

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

#payouts_list_verifications(opts = {}) ⇒ PayoutVerificationList

List Verifications Retrieve pending or completed KYC verification checks.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Float)
  • :page (Float)

Returns:



400
401
402
403
# File 'lib/solifyn/api/payouts_api.rb', line 400

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

#payouts_list_verifications_with_http_info(opts = {}) ⇒ Array<(PayoutVerificationList, Integer, Hash)>

List Verifications Retrieve pending or completed KYC verification checks.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Float)
  • :page (Float)

Returns:

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

    PayoutVerificationList data, response status code and response headers



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
443
444
445
446
447
448
449
450
451
452
453
454
455
# File 'lib/solifyn/api/payouts_api.rb', line 411

def payouts_list_verifications_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayoutsApi.payouts_list_verifications ...'
  end
  # resource path
  local_var_path = '/v1/payouts/verifications'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?

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

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

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

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

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

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

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

#payouts_list_withdrawals(opts = {}) ⇒ WithdrawalList

List Withdrawals Retrieve a list of past withdrawal history.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Float)

    Page size limit

  • :page (Float)

    Page number

Returns:



463
464
465
466
# File 'lib/solifyn/api/payouts_api.rb', line 463

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

#payouts_list_withdrawals_with_http_info(opts = {}) ⇒ Array<(WithdrawalList, Integer, Hash)>

List Withdrawals Retrieve a list of past withdrawal history.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Float)

    Page size limit

  • :page (Float)

    Page number

Returns:

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

    WithdrawalList data, response status code and response headers



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
506
507
508
509
510
511
512
513
514
515
516
517
518
# File 'lib/solifyn/api/payouts_api.rb', line 474

def payouts_list_withdrawals_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayoutsApi.payouts_list_withdrawals ...'
  end
  # resource path
  local_var_path = '/v1/payouts'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?

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

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

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

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

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

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