Class: Increase::Resources::BookkeepingEntries

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ BookkeepingEntries

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 BookkeepingEntries.

Parameters:



59
60
61
# File 'lib/increase/resources/bookkeeping_entries.rb', line 59

def initialize(client:)
  @client = client
end

Instance Method Details

#list(account_id: nil, cursor: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::BookkeepingEntry>

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

List Bookkeeping Entries

Parameters:

  • account_id (String)

    The identifier for the Bookkeeping Account to filter by.

  • cursor (String)

    Return the page of entries after this one.

  • limit (Integer)

    Limit the size of the list that is returned. The default (and maximum) is 100 ob

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

Returns:

See Also:



44
45
46
47
48
49
50
51
52
53
54
# File 'lib/increase/resources/bookkeeping_entries.rb', line 44

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

#retrieve(bookkeeping_entry_id, request_options: {}) ⇒ Increase::Models::BookkeepingEntry

Retrieve a Bookkeeping Entry

Parameters:

  • bookkeeping_entry_id (String)

    The identifier of the Bookkeeping Entry.

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

Returns:

See Also:



17
18
19
20
21
22
23
24
# File 'lib/increase/resources/bookkeeping_entries.rb', line 17

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