Class: ModernTreasury::Resources::LedgerTransactions::Versions

Inherits:
Object
  • Object
show all
Defined in:
lib/modern_treasury/resources/ledger_transactions/versions.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Versions

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

Parameters:



47
48
49
# File 'lib/modern_treasury/resources/ledger_transactions/versions.rb', line 47

def initialize(client:)
  @client = client
end

Instance Method Details

#list(after_cursor: nil, created_at: nil, ledger_account_statement_id: nil, ledger_transaction_id: nil, per_page: nil, version: nil, request_options: {}) ⇒ ModernTreasury::Internal::Page<ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion>

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

Get a list of ledger transaction versions.

Parameters:

  • after_cursor (String, nil)
  • created_at (Hash{Symbol=>Time})

    Use ‘gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the cre

  • ledger_account_statement_id (String)

    Get all ledger transaction versions that are included in the ledger account stat

  • ledger_transaction_id (String)

    Get all the ledger transaction versions corresponding to the ID of a ledger tran

  • per_page (Integer)
  • version (Hash{Symbol=>Integer})

    Use ‘gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the ver

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

Returns:

See Also:



32
33
34
35
36
37
38
39
40
41
42
# File 'lib/modern_treasury/resources/ledger_transactions/versions.rb', line 32

def list(params = {})
  parsed, options = ModernTreasury::LedgerTransactions::VersionListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "api/ledger_transaction_versions",
    query: parsed,
    page: ModernTreasury::Internal::Page,
    model: ModernTreasury::LedgerTransactions::LedgerTransactionVersion,
    options: options
  )
end