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]

This endpoint is deprecated. To export this data, use [List all apps for org](/developers/api-reference/boarding/get-list-of-applications-for-an-organization) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_applications(
  format: "csv",
  org_id: 123,
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


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

def export_applications(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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. To export this data, use [List batch details](/developers/api-reference/query/get-list-of-batchdetails-for-an-entrypoint) with the `exportFormat` query parameter instead.

Export batch details for a paypoint. Use filters to limit results.

Examples:

client.export.export_batch_details(
  format: "csv",
  entry: "8cfec329267",
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


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

def export_batch_details(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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. To export this data, use [List batch details for org](/developers/api-reference/query/get-list-of-batchdetails-for-an-organization) with the `exportFormat` query parameter instead.

Export batch details for an organization. Use filters to limit results.

Examples:

client.export.export_batch_details_org(
  format: "csv",
  org_id: 123,
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


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

def export_batch_details_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List batches for paypoint](/developers/api-reference/query/get-list-of-batches-for-an-entrypoint) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_batches(
  format: "csv",
  entry: "8cfec329267",
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


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

def export_batches(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List batches for org](/developers/api-reference/query/get-list-of-batches-for-an-organization) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_batches_org(
  format: "csv",
  org_id: 123,
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


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

def export_batches_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List payout batches for paypoint](/developers/api-reference/query/get-list-of-moneyout-batches-for-an-entrypoint) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_batches_out(
  format: "csv",
  entry: "8cfec329267",
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


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

def export_batches_out(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List payout batches for org](/developers/api-reference/query/get-list-of-moneyout-batches-for-an-org) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_batches_out_org(
  format: "csv",
  org_id: 123,
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


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

def export_batches_out_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List bills by paypoint](/developers/api-reference/bill/get-list-of-bills-for-entrypoint) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_bills(
  format: "csv",
  entry: "8cfec329267",
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


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

def export_bills(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List bills by organization](/developers/api-reference/bill/get-list-of-bills-for-organization) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_bills_org(
  format: "csv",
  org_id: 123,
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
# File 'lib/payabli/export/client.rb', line 549

def export_bills_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List disputes by paypoint](/developers/api-reference/chargebacks/get-list-of-chargebacks-and-returned-transactions-for-an-entrypoint) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_chargebacks(
  format: "csv",
  entry: "8cfec329267",
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


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

def export_chargebacks(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List disputes by organization](/developers/api-reference/chargebacks/get-list-of-chargebacks-and-returned-transactions-for-an-org) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_chargebacks_org(
  format: "csv",
  org_id: 123,
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


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

def export_chargebacks_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List customers by paypoint](/developers/api-reference/customer/get-list-of-customers-for-an-entrypoint) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_customers(
  format: "csv",
  entry: "8cfec329267",
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
# File 'lib/payabli/export/client.rb', line 738

def export_customers(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List customers by organization](/developers/api-reference/customer/get-list-of-customers-for-an-organization) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_customers_org(
  format: "csv",
  org_id: 123,
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


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

def export_customers_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List invoices by paypoint](/developers/api-reference/invoice/get-list-of-invoices-for-an-entrypoint) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_invoices(
  format: "csv",
  entry: "8cfec329267",
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
# File 'lib/payabli/export/client.rb', line 864

def export_invoices(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List invoices by organization](/developers/api-reference/invoice/get-list-of-invoices-for-an-organization) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_invoices_org(
  format: "csv",
  org_id: 123,
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
# File 'lib/payabli/export/client.rb', line 927

def export_invoices_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List suborganizations by organization](/developers/api-reference/organization/get-list-of-organizations-for-entrypoint) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_organizations(
  format: "csv",
  org_id: 123,
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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_organizations(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List payouts by paypoint](/developers/api-reference/query/get-list-of-payouts-for-entrypoint) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_payout(
  format: "csv",
  entry: "8cfec329267",
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
# File 'lib/payabli/export/client.rb', line 1053

def export_payout(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List payouts by org](/developers/api-reference/query/get-list-of-payouts-for-organization) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_payout_org(
  format: "csv",
  org_id: 123,
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
# File 'lib/payabli/export/client.rb', line 1116

def export_payout_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List paypoints by organization](/developers/api-reference/paypoint/get-list-of-paypoints-for-an-organization) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_paypoints(
  format: "csv",
  org_id: 123,
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
# File 'lib/payabli/export/client.rb', line 1179

def export_paypoints(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List settled transactions for paypoint](/developers/api-reference/query/get-list-of-settled-transactions-for-an-entrypoint) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_settlements(
  format: "csv",
  entry: "8cfec329267",
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
# File 'lib/payabli/export/client.rb', line 1242

def export_settlements(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List settled transactions for org](/developers/api-reference/query/get-list-of-settled-transactions-for-an-org) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_settlements_org(
  format: "csv",
  org_id: 123,
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
# File 'lib/payabli/export/client.rb', line 1305

def export_settlements_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List subscriptions by paypoint](/developers/api-reference/subscription/get-list-of-subscriptions-for-an-entrypoint) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_subscriptions(
  format: "csv",
  entry: "8cfec329267",
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
# File 'lib/payabli/export/client.rb', line 1368

def export_subscriptions(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List subscriptions by organization](/developers/api-reference/subscription/get-list-of-subscriptions-for-an-org) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_subscriptions_org(
  format: "csv",
  org_id: 123,
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
# File 'lib/payabli/export/client.rb', line 1431

def export_subscriptions_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List transactions for paypoint](/developers/api-reference/query/get-list-of-transactions-for-an-entrypoint) with the `exportFormat` query parameter instead.

Export a list of transactions for an entrypoint 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.

Examples:

client.export.export_transactions(
  format: "csv",
  entry: "8cfec329267",
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
# File 'lib/payabli/export/client.rb', line 1495

def export_transactions(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List transactions for org](/developers/api-reference/query/get-list-of-transactions-for-an-organization) with the `exportFormat` query parameter instead.

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.

Examples:

client.export.export_transactions_org(
  format: "csv",
  org_id: 123,
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
# File 'lib/payabli/export/client.rb', line 1559

def export_transactions_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [Get transfer details](/developers/api-reference/query/get-list-of-transfer-details) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_transfer_details(
  format: "csv",
  entry: "8cfec329267",
  transfer_id: 4521,
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000,
  sort_by: "desc(field_name)"
)

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::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])


1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
# File 'lib/payabli/export/client.rb', line 1626

def export_transfer_details(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List transfers](/developers/api-reference/query/get-list-of-transfers) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_transfers(
  entry: "8cfec329267",
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000,
  sort_by: "desc(field_name)"
)

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])


1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
# File 'lib/payabli/export/client.rb', line 1690

def export_transfers(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List vendors by paypoint](/developers/api-reference/vendor/get-list-of-vendors-for-entrypoint) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_vendors(
  format: "csv",
  entry: "8cfec329267",
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
# File 'lib/payabli/export/client.rb', line 1754

def export_vendors(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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]

This endpoint is deprecated. To export this data, use [List vendors by organization](/developers/api-reference/vendor/get-list-of-vendors-for-organization) with the `exportFormat` query parameter instead.

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

Examples:

client.export.export_vendors_org(
  format: "csv",
  org_id: 123,
  columns_export: "BatchDate:Batch_Date,PaypointName:Legal_name",
  from_record: 251,
  limit_record: 1000
)

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::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])


1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
# File 'lib/payabli/export/client.rb', line 1817

def export_vendors_org(request_options: {}, **params)
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
  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)

  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
  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)}",
    headers: headers,
    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