Class: ModernTreasury::Models::LedgerAccount
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModernTreasury::Models::LedgerAccount
- Defined in:
- lib/modern_treasury/models/ledger_account.rb
Overview
Defined Under Namespace
Modules: LedgerableType Classes: Balances
Instance Attribute Summary collapse
-
#balances ⇒ ModernTreasury::Models::LedgerAccount::Balances
The pending, posted, and available balances for this ledger account.
- #created_at ⇒ Time
-
#description ⇒ String?
The description of the ledger account.
- #discarded_at ⇒ Time?
-
#external_id ⇒ String?
An optional user-defined 180 character unique identifier.
- #id ⇒ String
-
#ledger_id ⇒ String
The id of the ledger that this account belongs to.
-
#ledgerable_id ⇒ String?
If the ledger account links to another object in Modern Treasury, the id will be populated here, otherwise null.
-
#ledgerable_type ⇒ Symbol, ...
If the ledger account links to another object in Modern Treasury, the type will be populated here, otherwise null.
-
#live_mode ⇒ Boolean
This field will be true if this object exists in the live environment or false if it exists in the test environment.
-
#lock_version ⇒ Integer
Lock version of the ledger account.
-
#metadata ⇒ Hash{Symbol=>String}
Additional data represented as key-value pairs.
-
#name ⇒ String
The name of the ledger account.
-
#normal_balance ⇒ Symbol, ModernTreasury::Models::TransactionDirection
The normal balance of the ledger account.
- #object ⇒ String
- #updated_at ⇒ Time
Instance Method Summary collapse
-
#initialize(available_balance: , effective_at_lower_bound: , effective_at_upper_bound: , pending_balance: , posted_balance: ) ⇒ Object
constructor
Some parameter documentations has been truncated, see Balances for more details.
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: , effective_at_lower_bound: , effective_at_upper_bound: , pending_balance: , posted_balance: ) ⇒ Object
Some parameter documentations has been truncated, see Balances for more details.
The pending, posted, and available balances for this ledger account. The posted balance is the sum of all posted entries on the account. The pending balance is the sum of all pending and posted entries on the account. The available balance is the posted incoming entries minus the sum of the pending and posted outgoing amounts.
|
|
# File 'lib/modern_treasury/models/ledger_account.rb', line 107
|
Instance Attribute Details
#balances ⇒ ModernTreasury::Models::LedgerAccount::Balances
The pending, posted, and available balances for this ledger account. The posted balance is the sum of all posted entries on the account. The pending balance is the sum of all pending and posted entries on the account. The available balance is the posted incoming entries minus the sum of the pending and posted outgoing amounts.
20 |
# File 'lib/modern_treasury/models/ledger_account.rb', line 20 required :balances, -> { ModernTreasury::LedgerAccount::Balances } |
#created_at ⇒ Time
25 |
# File 'lib/modern_treasury/models/ledger_account.rb', line 25 required :created_at, Time |
#description ⇒ String?
The description of the ledger account.
31 |
# File 'lib/modern_treasury/models/ledger_account.rb', line 31 required :description, String, nil?: true |
#discarded_at ⇒ Time?
36 |
# File 'lib/modern_treasury/models/ledger_account.rb', line 36 required :discarded_at, Time, nil?: true |
#external_id ⇒ String?
An optional user-defined 180 character unique identifier.
42 |
# File 'lib/modern_treasury/models/ledger_account.rb', line 42 required :external_id, String, nil?: true |
#id ⇒ String
10 |
# File 'lib/modern_treasury/models/ledger_account.rb', line 10 required :id, String |
#ledger_id ⇒ String
The id of the ledger that this account belongs to.
48 |
# File 'lib/modern_treasury/models/ledger_account.rb', line 48 required :ledger_id, String |
#ledgerable_id ⇒ String?
If the ledger account links to another object in Modern Treasury, the id will be populated here, otherwise null.
55 |
# File 'lib/modern_treasury/models/ledger_account.rb', line 55 required :ledgerable_id, String, nil?: true |
#ledgerable_type ⇒ Symbol, ...
If the ledger account links to another object in Modern Treasury, the type will be populated here, otherwise null. The value is one of internal_account or external_account.
63 |
# File 'lib/modern_treasury/models/ledger_account.rb', line 63 required :ledgerable_type, enum: -> { ModernTreasury::LedgerAccount::LedgerableType }, nil?: true |
#live_mode ⇒ Boolean
This field will be true if this object exists in the live environment or false if it exists in the test environment.
70 |
# File 'lib/modern_treasury/models/ledger_account.rb', line 70 required :live_mode, ModernTreasury::Internal::Type::Boolean |
#lock_version ⇒ Integer
Lock version of the ledger account.
76 |
# File 'lib/modern_treasury/models/ledger_account.rb', line 76 required :lock_version, Integer |
#metadata ⇒ Hash{Symbol=>String}
Additional data represented as key-value pairs. Both the key and value must be strings.
83 |
# File 'lib/modern_treasury/models/ledger_account.rb', line 83 required :metadata, ModernTreasury::Internal::Type::HashOf[String] |
#name ⇒ String
The name of the ledger account.
89 |
# File 'lib/modern_treasury/models/ledger_account.rb', line 89 required :name, String |
#normal_balance ⇒ Symbol, ModernTreasury::Models::TransactionDirection
The normal balance of the ledger account.
95 |
# File 'lib/modern_treasury/models/ledger_account.rb', line 95 required :normal_balance, enum: -> { ModernTreasury::TransactionDirection } |
#object ⇒ String
100 |
# File 'lib/modern_treasury/models/ledger_account.rb', line 100 required :object, String |
#updated_at ⇒ Time
105 |
# File 'lib/modern_treasury/models/ledger_account.rb', line 105 required :updated_at, Time |