-
Notifications
You must be signed in to change notification settings - Fork 2
Recursive Balance
Documentation > Recursive Balance
A Recursive Balance represents the sum total value of all Entries party to an Account, and all of that Account's children.
.session - Session
The Session used to initialise this RecursiveBalance
.entity - Entity
The Entity to which the Account described by this RecursiveBalance belongs.
The time at which this RecursiveBalance holds. Transactions before this time are included, and those after are excluded.
Example: datetime.datetime(2019, 1, 18, 21, 4, 43, 557821)
.account - Account
The Account that this RecursiveBalance describes. Retrieving the .account property causes a new synchronous call to the API, the RecursiveBalance object only stores a reference to the Account ID (the .account_id property), not the whole Account object.
The integer ID of the Account that this Balance describes.
Example: 42
.denomination - Denomation
The denominating unit of this RecursiveBalance, either a GlobalUnit or a CustomUnit. Retrieving the .denomination property will cause a synchronous call to the API.
An assertion that this is a RecursiveBalance.
Example: True
The time at which this RecursiveBalance object was generated.
Example: datetime.datetime(2019, 1, 18, 21, 4, 43, 557821)
The integer identifier of the GlobalUnit denominating this RecursiveBalance, if any.
Example: 5
The integer identifier of the CustomUnit denominating this RecursiveBalance, if any.
Example: None
Return a new RecursiveBalance instance.
- entity - Entity
- account - Account
- balance_time - Optional[datetime]
- denomination - Optional[Denomination]
recursive_balance = RecursiveBalance.retrieve(
entity=mega_corp,
account=cash_account
)
print(recursive_balance.magnitude)