Class: Ledger::Sdk::Models::Balance

Inherits:
Base
  • Object
show all
Defined in:
lib/ledger/sdk/models/balance.rb

Overview

Represents balances from the Ledger API.

Balances are always accessed by name in the context of a container or an account; Ledger::Sdk::Models::Base#list returns the recent balances for that name. Known names: official, official_with_updated_price, transparent, transparent_with_updated_price. Names are not validated by the SDK — an unknown name yields an empty list from the API.

Examples:

Recent official balances of a container

balances = Ledger::Sdk.Container(42).balances('official').list
balances.first.data # => { 'effective_date' => '2026-06-10', 'currency' => 'EUR', 'value' => 100.0 }

Recent transparent balances of an account

Ledger::Sdk.Container(42).accounts(7).balances('transparent').list

Defined Under Namespace

Classes: Instance

Method Summary

Methods inherited from Base

#initialize, #list

Constructor Details

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