Class: Payabli::Export::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/payabli/export/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ void

Parameters:



9
10
11
# File 'lib/payabli/export/client.rb', line 9

def initialize(client:)
  @client = client
end

Instance Method Details

#export_applications(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of boarding applications for an organization. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :org_id (Integer)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/payabli/export/client.rb', line 30

def export_applications(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/boarding/#{URI.encode_uri_component(params[:format].to_s)}/#{URI.encode_uri_component(params[:org_id].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_batch_details(request_options: {}, **params) ⇒ Hash[String, Object]

This endpoint is deprecated. Export batch details for a paypoint. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :entry (String)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/payabli/export/client.rb', line 78

def export_batch_details(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/batchDetails/#{URI.encode_uri_component(params[:format].to_s)}/#{URI.encode_uri_component(params[:entry].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_batch_details_org(request_options: {}, **params) ⇒ Hash[String, Object]

This endpoint is deprecated. Export batch details for an organization. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :org_id (Integer)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


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
# File 'lib/payabli/export/client.rb', line 126

def export_batch_details_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/batchDetails/#{URI.encode_uri_component(params[:format].to_s)}/org/#{URI.encode_uri_component(params[:org_id].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_batches(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of batches for an entrypoint. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :entry (String)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


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
# File 'lib/payabli/export/client.rb', line 174

def export_batches(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/batches/#{URI.encode_uri_component(params[:format].to_s)}/#{URI.encode_uri_component(params[:entry].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_batches_org(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of batches for an organization. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :org_id (Integer)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


222
223
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
# File 'lib/payabli/export/client.rb', line 222

def export_batches_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/batches/#{URI.encode_uri_component(params[:format].to_s)}/org/#{URI.encode_uri_component(params[:org_id].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_batches_out(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of money out batches for a paypoint. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :entry (String)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


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
# File 'lib/payabli/export/client.rb', line 270

def export_batches_out(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/batchesOut/#{URI.encode_uri_component(params[:format].to_s)}/#{URI.encode_uri_component(params[:entry].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_batches_out_org(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of money out batches for an organization. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :org_id (Integer)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/payabli/export/client.rb', line 318

def export_batches_out_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/batchesOut/#{URI.encode_uri_component(params[:format].to_s)}/org/#{URI.encode_uri_component(params[:org_id].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_bills(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of bills for an entrypoint. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :entry (String)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/payabli/export/client.rb', line 366

def export_bills(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/bills/#{URI.encode_uri_component(params[:format].to_s)}/#{URI.encode_uri_component(params[:entry].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_bills_org(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of bills for an organization. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :org_id (Integer)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


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
# File 'lib/payabli/export/client.rb', line 414

def export_bills_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/bills/#{URI.encode_uri_component(params[:format].to_s)}/org/#{URI.encode_uri_component(params[:org_id].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_chargebacks(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of chargebacks and ACH returns for an entrypoint. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :entry (String)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


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
# File 'lib/payabli/export/client.rb', line 462

def export_chargebacks(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/chargebacks/#{URI.encode_uri_component(params[:format].to_s)}/#{URI.encode_uri_component(params[:entry].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_chargebacks_org(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of chargebacks and ACH returns for an organization. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :org_id (Integer)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
# File 'lib/payabli/export/client.rb', line 510

def export_chargebacks_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/chargebacks/#{URI.encode_uri_component(params[:format].to_s)}/org/#{URI.encode_uri_component(params[:org_id].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_customers(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of customers for an entrypoint. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :entry (String)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
# File 'lib/payabli/export/client.rb', line 558

def export_customers(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/customers/#{URI.encode_uri_component(params[:format].to_s)}/#{URI.encode_uri_component(params[:entry].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_customers_org(request_options: {}, **params) ⇒ Hash[String, Object]

Exports a list of customers for an organization. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :org_id (Integer)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


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
# File 'lib/payabli/export/client.rb', line 606

def export_customers_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/customers/#{URI.encode_uri_component(params[:format].to_s)}/org/#{URI.encode_uri_component(params[:org_id].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_invoices(request_options: {}, **params) ⇒ Hash[String, Object]

Export list of invoices for an entrypoint. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :entry (String)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


654
655
656
657
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
# File 'lib/payabli/export/client.rb', line 654

def export_invoices(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/invoices/#{URI.encode_uri_component(params[:format].to_s)}/#{URI.encode_uri_component(params[:entry].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_invoices_org(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of invoices for an organization. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :org_id (Integer)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
# File 'lib/payabli/export/client.rb', line 702

def export_invoices_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/invoices/#{URI.encode_uri_component(params[:format].to_s)}/org/#{URI.encode_uri_component(params[:org_id].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_organizations(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of child organizations (suborganizations) for a parent organization.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :org_id (Integer)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


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
# File 'lib/payabli/export/client.rb', line 750

def export_organizations(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/organizations/#{URI.encode_uri_component(params[:format].to_s)}/org/#{URI.encode_uri_component(params[:org_id].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_payout(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of payouts and their statuses for an entrypoint. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :entry (String)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
# File 'lib/payabli/export/client.rb', line 798

def export_payout(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/payouts/#{URI.encode_uri_component(params[:format].to_s)}/#{URI.encode_uri_component(params[:entry].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_payout_org(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of payouts and their details for an organization. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :org_id (Integer)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


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
871
872
873
874
875
# File 'lib/payabli/export/client.rb', line 846

def export_payout_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/payouts/#{URI.encode_uri_component(params[:format].to_s)}/org/#{URI.encode_uri_component(params[:org_id].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_paypoints(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of paypoints in an organization. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :org_id (Integer)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
# File 'lib/payabli/export/client.rb', line 894

def export_paypoints(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/paypoints/#{URI.encode_uri_component(params[:format].to_s)}/#{URI.encode_uri_component(params[:org_id].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_settlements(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of settled transactions for an entrypoint. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :entry (String)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


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
# File 'lib/payabli/export/client.rb', line 942

def export_settlements(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/settlements/#{URI.encode_uri_component(params[:format].to_s)}/#{URI.encode_uri_component(params[:entry].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_settlements_org(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of settled transactions for an organization. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :org_id (Integer)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
# File 'lib/payabli/export/client.rb', line 990

def export_settlements_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/settlements/#{URI.encode_uri_component(params[:format].to_s)}/org/#{URI.encode_uri_component(params[:org_id].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_subscriptions(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of subscriptions for an entrypoint. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :entry (String)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


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
# File 'lib/payabli/export/client.rb', line 1038

def export_subscriptions(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/subscriptions/#{URI.encode_uri_component(params[:format].to_s)}/#{URI.encode_uri_component(params[:entry].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_subscriptions_org(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of subscriptions for an organization. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :org_id (Integer)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
# File 'lib/payabli/export/client.rb', line 1086

def export_subscriptions_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/subscriptions/#{URI.encode_uri_component(params[:format].to_s)}/org/#{URI.encode_uri_component(params[:org_id].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_transactions(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of transactions for an entrypoint in a file in XLXS or CSV format. Use filters to limit results. If you don’t specify a date range in the request, the last two months of data are returned.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :entry (String)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
# File 'lib/payabli/export/client.rb', line 1135

def export_transactions(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/transactions/#{URI.encode_uri_component(params[:format].to_s)}/#{URI.encode_uri_component(params[:entry].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_transactions_org(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of transactions for an org in a file in XLSX or CSV format. Use filters to limit results. If you don’t specify a date range in the request, the last two months of data are returned.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :org_id (Integer)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


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
# File 'lib/payabli/export/client.rb', line 1184

def export_transactions_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/transactions/#{URI.encode_uri_component(params[:format].to_s)}/org/#{URI.encode_uri_component(params[:org_id].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_transfer_details(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of transfer details for an entrypoint. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :entry (String)
  • :transfer_id (Integer)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)
  • :sort_by (String, nil)

Returns:

  • (Hash[String, Object])


1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'lib/payabli/export/client.rb', line 1234

def export_transfer_details(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters sort_by]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  query_params["sortBy"] = params[:sort_by] if params.key?(:sort_by)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/transferDetails/#{URI.encode_uri_component(params[:format].to_s)}/#{URI.encode_uri_component(params[:entry].to_s)}/#{URI.encode_uri_component(params[:transfer_id].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_transfers(request_options: {}, **params) ⇒ Hash[String, Object]

Get a list of transfers for an entrypoint. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :entry (String)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)
  • :sort_by (String, nil)

Returns:

  • (Hash[String, Object])


1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
# File 'lib/payabli/export/client.rb', line 1283

def export_transfers(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters sort_by]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  query_params["sortBy"] = params[:sort_by] if params.key?(:sort_by)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/transfers/#{URI.encode_uri_component(params[:entry].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_vendors(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of vendors for an entrypoint. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :entry (String)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


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
# File 'lib/payabli/export/client.rb', line 1332

def export_vendors(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/vendors/#{URI.encode_uri_component(params[:format].to_s)}/#{URI.encode_uri_component(params[:entry].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#export_vendors_org(request_options: {}, **params) ⇒ Hash[String, Object]

Export a list of vendors for an organization. Use filters to limit results.

Parameters:

  • request_options (Hash) (defaults to: {})
  • params (Hash)

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Options Hash (**params):

  • :format (Payabli::Export::Types::ExportFormat1)
  • :org_id (Integer)
  • :columns_export (String, nil)
  • :from_record (Integer, nil)
  • :limit_record (Integer, nil)
  • :parameters (Hash[String, String, nil], nil)

Returns:

  • (Hash[String, Object])


1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
# File 'lib/payabli/export/client.rb', line 1380

def export_vendors_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  query_param_names = %i[columns_export from_record limit_record parameters]
  query_params = {}
  query_params["columnsExport"] = params[:columns_export] if params.key?(:columns_export)
  query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
  query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
  query_params["parameters"] = params[:parameters] if params.key?(:parameters)
  params = params.except(*query_param_names)

  request = Payabli::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "GET",
    path: "Export/vendors/#{URI.encode_uri_component(params[:format].to_s)}/org/#{URI.encode_uri_component(params[:org_id].to_s)}",
    query: query_params,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Payabli::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Payabli::Types::File.load(response.body)
  else
    error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end