Module: Vindi::Rest::ExportBatch

Included in:
Vindi::Rest
Defined in:
lib/vindi/rest/export_batch.rb

Overview

Methods for the export_batches API

Instance Method Summary collapse

Instance Method Details

#approve_export_batch(export_batch_id, options = {}) ⇒ Hash

Approve an export batch for a merchant vindi

Examples:

Approve an export batch for a merchant vindi

client.approve_export_batch(2)

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :options (Hash)

    export_batch attributes

Returns:

  • (Hash)

    The export batch approved

See Also:



47
48
49
# File 'lib/vindi/rest/export_batch.rb', line 47

def approve_export_batch(export_batch_id, options = {})
  post("export_batches/#{export_batch_id}/approve", options)[:export_batch]
end

#create_export_batch(options = {}) ⇒ Hash

Create an export batch for a merchant vindi

Examples:

Create an export batch for a merchant vindi

client.create_export_batch({ "payment_method_code": 2, "payment_company_code": "itau" })

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :options (Hash)

    export_batch attributes

Returns:

  • (Hash)

    The export batch created

See Also:



35
36
37
# File 'lib/vindi/rest/export_batch.rb', line 35

def create_export_batch(options = {})
  post('export_batches', options)[:export_batch]
end

#export_batch(export_batch_id, options = {}) ⇒ Hash

Get a single export batch from a merchant

Examples:

Get export batch #154 from vindi

client.export_batch(154)

Parameters:

  • export_batch_id (Integer)

    ID of the export batch

Returns:

  • (Hash)

    The export batch you requested, if it exists

See Also:



24
25
26
# File 'lib/vindi/rest/export_batch.rb', line 24

def export_batch(export_batch_id, options = {})
  get("export_batches/#{export_batch_id}", options)[:export_batch]
end

#list_export_batches(options = {}) ⇒ Array<Hash>

List export batches for the authenticate user

Examples:

Get all export batches from merchant vindi

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :page (Integer) — default: 1

    Page number.

  • :merchant (Integer)

    Merchant account

Returns:

  • (Array<Hash>)

    A list of export batches for a merchant.



13
14
15
# File 'lib/vindi/rest/export_batch.rb', line 13

def list_export_batches(options = {})
  get('export_batches', options)[:export_batches]
end