Class: Increase::Resources::BookkeepingEntrySets

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ BookkeepingEntrySets

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

Parameters:



90
91
92
# File 'lib/increase/resources/bookkeeping_entry_sets.rb', line 90

def initialize(client:)
  @client = client
end

Instance Method Details

#create(entries: , date: nil, transaction_id: nil, request_options: {}) ⇒ Increase::Models::BookkeepingEntrySet

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

Create a Bookkeeping Entry Set

Parameters:

Returns:

See Also:



24
25
26
27
28
29
30
31
32
33
# File 'lib/increase/resources/bookkeeping_entry_sets.rb', line 24

def create(params)
  parsed, options = Increase::BookkeepingEntrySetCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "bookkeeping_entry_sets",
    body: parsed,
    model: Increase::BookkeepingEntrySet,
    options: options
  )
end

#list(cursor: nil, idempotency_key: nil, limit: nil, transaction_id: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::BookkeepingEntrySet>

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

List Bookkeeping Entry Sets

Parameters:

  • cursor (String)

    Return the page of entries after this one.

  • idempotency_key (String)

    Filter records to the one with the specified ‘idempotency_key` you chose for tha

  • limit (Integer)

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

  • transaction_id (String)

    Filter to the Bookkeeping Entry Set that maps to this Transaction.

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

Returns:

See Also:



75
76
77
78
79
80
81
82
83
84
85
# File 'lib/increase/resources/bookkeeping_entry_sets.rb', line 75

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

#retrieve(bookkeeping_entry_set_id, request_options: {}) ⇒ Increase::Models::BookkeepingEntrySet

Retrieve a Bookkeeping Entry Set

Parameters:

  • bookkeeping_entry_set_id (String)

    The identifier of the Bookkeeping Entry Set.

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

Returns:

See Also:



46
47
48
49
50
51
52
53
# File 'lib/increase/resources/bookkeeping_entry_sets.rb', line 46

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