Class: ModernTreasury::Models::LedgerBalances

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/modern_treasury/models/ledger_balances.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(available_balance: , pending_balance: , posted_balance: ) ⇒ Object

Some parameter documentations has been truncated, see ModernTreasury::Models::LedgerBalances for more details.

Parameters:



# File 'lib/modern_treasury/models/ledger_balances.rb', line 27


Instance Attribute Details

#available_balanceModernTreasury::Models::LedgerBalance

The available_balance is the sum of all posted inbound entries and pending outbound entries. For credit normal, available_amount = posted_credits - pending_debits; for debit normal, available_amount = posted_debits - pending_credits.



13
# File 'lib/modern_treasury/models/ledger_balances.rb', line 13

required :available_balance, -> { ModernTreasury::LedgerBalance }

#pending_balanceModernTreasury::Models::LedgerBalance

The pending_balance is the sum of all pending and posted entries.



19
# File 'lib/modern_treasury/models/ledger_balances.rb', line 19

required :pending_balance, -> { ModernTreasury::LedgerBalance }

#posted_balanceModernTreasury::Models::LedgerBalance

The posted_balance is the sum of all posted entries.



25
# File 'lib/modern_treasury/models/ledger_balances.rb', line 25

required :posted_balance, -> { ModernTreasury::LedgerBalance }