Class: ModernTreasury::Resources::LedgerAccountSettlements::AccountEntries

Inherits:
Object
  • Object
show all
Defined in:
lib/modern_treasury/resources/ledger_account_settlements/account_entries.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ AccountEntries

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

Parameters:



66
67
68
# File 'lib/modern_treasury/resources/ledger_account_settlements/account_entries.rb', line 66

def initialize(client:)
  @client = client
end

Instance Method Details

#delete(id, ledger_entry_ids: , request_options: {}) ⇒ nil

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

Remove ledger entries from a draft ledger account settlement.

Parameters:

  • id (String)

    id

  • ledger_entry_ids (Array<String>, nil)

    The ids of the ledger entries that are to be added or removed from the ledger ac

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

Returns:

  • (nil)

See Also:



52
53
54
55
56
57
58
59
60
61
# File 'lib/modern_treasury/resources/ledger_account_settlements/account_entries.rb', line 52

def delete(id, params)
  parsed, options = ModernTreasury::LedgerAccountSettlements::AccountEntryDeleteParams.dump_request(params)
  @client.request(
    method: :delete,
    path: ["api/ledger_account_settlements/%1$s/ledger_entries", id],
    body: parsed,
    model: NilClass,
    options: options
  )
end

#update(id, ledger_entry_ids: , request_options: {}) ⇒ nil

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

Add ledger entries to a draft ledger account settlement.

Parameters:

  • id (String)

    id

  • ledger_entry_ids (Array<String>, nil)

    The ids of the ledger entries that are to be added or removed from the ledger ac

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

Returns:

  • (nil)

See Also:



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

def update(id, params)
  parsed, options = ModernTreasury::LedgerAccountSettlements::AccountEntryUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["api/ledger_account_settlements/%1$s/ledger_entries", id],
    body: parsed,
    model: NilClass,
    options: options
  )
end