Class: Increase::Resources::Exports

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

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:



137
138
139
# File 'lib/increase/resources/exports.rb', line 137

def initialize(client:)
  @client = client
end

Instance Method Details

#create(category:, account_statement_bai2: nil, account_statement_ofx: nil, account_verification_letter: nil, bookkeeping_account_balance_csv: nil, daily_account_balance_csv: nil, entity_csv: nil, fee_csv: nil, funding_instructions: nil, transaction_csv: nil, vendor_csv: nil, voided_check: nil, request_options: {}) ⇒ Increase::Models::Export

Create an Export

Parameters:

Returns:

See Also:



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

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, form_1099_int: nil, form_1099_misc: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::Export>

List Exports

Parameters:

Returns:

See Also:



121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/increase/resources/exports.rb', line 121

def list(params = {})
  parsed, options = Increase::ExportListParams.dump_request(params)
  query = Increase::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "exports",
    query: query,
    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:



80
81
82
83
84
85
86
87
# File 'lib/increase/resources/exports.rb', line 80

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