Class: Increase::Resources::Exports

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/exports.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Exports

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Exports.

Parameters:



106
107
108
# File 'lib/increase/resources/exports.rb', line 106

def initialize(client:)
  @client = client
end

Instance Method Details

#create(category: , account_statement_bai2: nil, account_statement_ofx: nil, balance_csv: nil, bookkeeping_account_balance_csv: nil, entity_csv: nil, transaction_csv: nil, vendor_csv: nil, request_options: {}) ⇒ Increase::Models::Export

Some parameter documentations has been truncated, see Models::ExportCreateParams for more details.

Create an Export

‘bookkeeping_

‘transaction_

Parameters:

Returns:

See Also:



36
37
38
39
40
41
42
43
44
45
# File 'lib/increase/resources/exports.rb', line 36

def create(params)
  parsed, options = Increase::ExportCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "exports",
    body: parsed,
    model: Increase::Export,
    options: options
  )
end

#list(category: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::Export>

Some parameter documentations has been truncated, see Models::ExportListParams for more details.

List Exports

Parameters:

Returns:

See Also:



91
92
93
94
95
96
97
98
99
100
101
# File 'lib/increase/resources/exports.rb', line 91

def list(params = {})
  parsed, options = Increase::ExportListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "exports",
    query: parsed,
    page: Increase::Internal::Page,
    model: Increase::Export,
    options: options
  )
end

#retrieve(export_id, request_options: {}) ⇒ Increase::Models::Export

Retrieve an Export

Parameters:

  • export_id (String)

    The identifier of the Export to retrieve.

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



58
59
60
61
62
63
64
65
# File 'lib/increase/resources/exports.rb', line 58

def retrieve(export_id, params = {})
  @client.request(
    method: :get,
    path: ["exports/%1$s", export_id],
    model: Increase::Export,
    options: params[:request_options]
  )
end