Class: Ledger::Sdk::Models::Account::Instance

Inherits:
Base::Instance show all
Defined in:
lib/ledger/sdk/models/account.rb

Overview

Represents an individual account instance.

Has an association to Position allowing navigation to the positions attached to this account.

Instance Method Summary collapse

Methods inherited from Base::Instance

association, #data, #initialize

Constructor Details

This class inherits a constructor from Ledger::Sdk::Models::Base::Instance

Instance Method Details

#balances(name) ⇒ Balance

Access the balances of this account for a given balance name.

Parameters:

  • name (String)

    the balance name. Known names: official, official_with_updated_price, transparent, transparent_with_updated_price. Not validated by the SDK.

Returns:

  • (Balance)

    the balance collection scoped to this account

#positions(associated_id = nil) ⇒ Position, Position::Instance

Access the positions associated with this account.

Parameters:

  • associated_id (String, Integer, nil) (defaults to: nil)

    ID of a specific position, or nil to get the collection

Returns: