Class: ModernTreasury::Resources::LedgerEntries
- Inherits:
-
Object
- Object
- ModernTreasury::Resources::LedgerEntries
- Defined in:
- lib/modern_treasury/resources/ledger_entries.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ LedgerEntries
constructor
private
A new instance of LedgerEntries.
-
#list(id: nil, after_cursor: nil, amount: nil, as_of_lock_version: nil, direction: nil, effective_at: nil, effective_date: nil, ledger_account_category_id: nil, ledger_account_id: nil, ledger_account_lock_version: nil, ledger_account_payout_id: nil, ledger_account_settlement_id: nil, ledger_account_statement_id: nil, ledger_transaction_id: nil, metadata: nil, order_by: nil, per_page: nil, show_balances: nil, show_deleted: nil, status: nil, updated_at: nil, request_options: {}) ⇒ ModernTreasury::Internal::Page<ModernTreasury::Models::LedgerEntry>
Some parameter documentations has been truncated, see Models::LedgerEntryListParams for more details.
-
#retrieve(id, show_balances: nil, request_options: {}) ⇒ ModernTreasury::Models::LedgerEntry
Some parameter documentations has been truncated, see Models::LedgerEntryRetrieveParams for more details.
-
#update(id, metadata: nil, request_options: {}) ⇒ ModernTreasury::Models::LedgerEntry
Some parameter documentations has been truncated, see Models::LedgerEntryUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ LedgerEntries
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 LedgerEntries.
129 130 131 |
# File 'lib/modern_treasury/resources/ledger_entries.rb', line 129 def initialize(client:) @client = client end |
Instance Method Details
#list(id: nil, after_cursor: nil, amount: nil, as_of_lock_version: nil, direction: nil, effective_at: nil, effective_date: nil, ledger_account_category_id: nil, ledger_account_id: nil, ledger_account_lock_version: nil, ledger_account_payout_id: nil, ledger_account_settlement_id: nil, ledger_account_statement_id: nil, ledger_transaction_id: nil, metadata: nil, order_by: nil, per_page: nil, show_balances: nil, show_deleted: nil, status: nil, updated_at: nil, request_options: {}) ⇒ ModernTreasury::Internal::Page<ModernTreasury::Models::LedgerEntry>
Some parameter documentations has been truncated, see Models::LedgerEntryListParams for more details.
Get a list of all ledger entries.
114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/modern_treasury/resources/ledger_entries.rb', line 114 def list(params = {}) parsed, = ModernTreasury::LedgerEntryListParams.dump_request(params) @client.request( method: :get, path: "api/ledger_entries", query: parsed, page: ModernTreasury::Internal::Page, model: ModernTreasury::LedgerEntry, options: ) end |
#retrieve(id, show_balances: nil, request_options: {}) ⇒ ModernTreasury::Models::LedgerEntry
Some parameter documentations has been truncated, see Models::LedgerEntryRetrieveParams for more details.
Get details on a single ledger entry.
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/modern_treasury/resources/ledger_entries.rb', line 22 def retrieve(id, params = {}) parsed, = ModernTreasury::LedgerEntryRetrieveParams.dump_request(params) @client.request( method: :get, path: ["api/ledger_entries/%1$s", id], query: parsed, model: ModernTreasury::LedgerEntry, options: ) end |
#update(id, metadata: nil, request_options: {}) ⇒ ModernTreasury::Models::LedgerEntry
Some parameter documentations has been truncated, see Models::LedgerEntryUpdateParams for more details.
Update the details of a ledger entry.
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/modern_treasury/resources/ledger_entries.rb', line 49 def update(id, params = {}) parsed, = ModernTreasury::LedgerEntryUpdateParams.dump_request(params) @client.request( method: :patch, path: ["api/ledger_entries/%1$s", id], body: parsed, model: ModernTreasury::LedgerEntry, options: ) end |