Class: ModernTreasury::Models::LedgerAccount::Balances

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

Overview

See Also:

Instance Attribute Summary collapse

Method Summary

Methods inherited from Internal::Type::BaseModel

#==, ==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, 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

This class inherits a constructor from ModernTreasury::Internal::Type::BaseModel

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.



152
# File 'lib/modern_treasury/models/ledger_account.rb', line 152

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

#effective_at_lower_boundTime?

The inclusive lower bound of the effective_at timestamp for the returned balances.

Returns:

  • (Time, nil)


159
# File 'lib/modern_treasury/models/ledger_account.rb', line 159

required :effective_at_lower_bound, Time, nil?: true

#effective_at_upper_boundTime?

The exclusive upper bound of the effective_at timestamp for the returned balances.

Returns:

  • (Time, nil)


166
# File 'lib/modern_treasury/models/ledger_account.rb', line 166

required :effective_at_upper_bound, Time, nil?: true

#pending_balanceModernTreasury::Models::LedgerBalance

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



172
# File 'lib/modern_treasury/models/ledger_account.rb', line 172

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

#posted_balanceModernTreasury::Models::LedgerBalance

The posted_balance is the sum of all posted entries.



178
# File 'lib/modern_treasury/models/ledger_account.rb', line 178

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