Class: ModernTreasury::Models::LedgerTransaction
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModernTreasury::Models::LedgerTransaction
- Defined in:
- lib/modern_treasury/models/ledger_transaction.rb
Overview
Defined Under Namespace
Modules: LedgerableType, Status
Instance Attribute Summary collapse
-
#archived_reason ⇒ String?
System-set reason why the ledger transaction was archived; currently only ‘balance_lock_failure’ for transactions that violated balance constraints.
- #created_at ⇒ Time
-
#description ⇒ String?
An optional description for internal use.
-
#effective_at ⇒ Time
The timestamp (ISO8601 format) at which the ledger transaction happened for reporting purposes.
-
#effective_date ⇒ Date
The date (YYYY-MM-DD) on which the ledger transaction happened for reporting purposes.
-
#external_id ⇒ String?
A unique string to represent the ledger transaction.
- #id ⇒ String
-
#ledger_entries ⇒ Array<ModernTreasury::Models::LedgerEntry>
An array of ledger entry objects.
-
#ledger_id ⇒ String
The ID of the ledger this ledger transaction belongs to.
-
#ledgerable_id ⇒ String?
If the ledger transaction can be reconciled to another object in Modern Treasury, the id will be populated here, otherwise null.
-
#ledgerable_type ⇒ Symbol, ...
If the ledger transaction can be reconciled 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.
-
#metadata ⇒ Hash{Symbol=>String}
Additional data represented as key-value pairs.
- #object ⇒ String
-
#partially_posts_ledger_transaction_id ⇒ String?
The ID of the ledger transaction that this ledger transaction partially posts.
-
#posted_at ⇒ Time?
The time on which the ledger transaction posted.
-
#reversed_by_ledger_transaction_id ⇒ String?
The ID of the ledger transaction that reversed this ledger transaction.
-
#reverses_ledger_transaction_id ⇒ String?
The ID of the original ledger transaction that this ledger transaction reverses.
-
#status ⇒ Symbol, ModernTreasury::Models::LedgerTransaction::Status
To post a ledger transaction at creation, use ‘posted`.
- #updated_at ⇒ Time
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id: , archived_reason: , created_at: , description: , effective_at: , effective_date: , external_id: , ledger_entries: , ledger_id: , ledgerable_id: , ledgerable_type: , live_mode: , metadata: , object: , partially_posts_ledger_transaction_id: , posted_at: , reversed_by_ledger_transaction_id: , reverses_ledger_transaction_id: , status: , updated_at: ) ⇒ Object
constructor
Some parameter documentations has been truncated, see LedgerTransaction 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(id: , archived_reason: , created_at: , description: , effective_at: , effective_date: , external_id: , ledger_entries: , ledger_id: , ledgerable_id: , ledgerable_type: , live_mode: , metadata: , object: , partially_posts_ledger_transaction_id: , posted_at: , reversed_by_ledger_transaction_id: , reverses_ledger_transaction_id: , status: , updated_at: ) ⇒ Object
Some parameter documentations has been truncated, see ModernTreasury::Models::LedgerTransaction for more details.
|
|
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 135
|
Instance Attribute Details
#archived_reason ⇒ String?
System-set reason why the ledger transaction was archived; currently only ‘balance_lock_failure’ for transactions that violated balance constraints. Only populated when archive_on_balance_lock_failure is true and a balance lock violation occurs, otherwise null.
19 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 19 required :archived_reason, String, nil?: true |
#created_at ⇒ Time
24 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 24 required :created_at, Time |
#description ⇒ String?
An optional description for internal use.
30 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 30 required :description, String, nil?: true |
#effective_at ⇒ Time
The timestamp (ISO8601 format) at which the ledger transaction happened for reporting purposes.
37 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 37 required :effective_at, Time |
#effective_date ⇒ Date
The date (YYYY-MM-DD) on which the ledger transaction happened for reporting purposes.
44 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 44 required :effective_date, Date |
#external_id ⇒ String?
A unique string to represent the ledger transaction. Only one pending or posted ledger transaction may have this ID in the ledger.
51 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 51 required :external_id, String, nil?: true |
#id ⇒ String
10 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 10 required :id, String |
#ledger_entries ⇒ Array<ModernTreasury::Models::LedgerEntry>
An array of ledger entry objects.
57 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 57 required :ledger_entries, -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LedgerEntry] } |
#ledger_id ⇒ String
The ID of the ledger this ledger transaction belongs to.
63 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 63 required :ledger_id, String |
#ledgerable_id ⇒ String?
If the ledger transaction can be reconciled to another object in Modern Treasury, the id will be populated here, otherwise null.
70 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 70 required :ledgerable_id, String, nil?: true |
#ledgerable_type ⇒ Symbol, ...
If the ledger transaction can be reconciled to another object in Modern Treasury, the type will be populated here, otherwise null. This can be one of payment_order, incoming_payment_detail, expected_payment, return, or reversal.
78 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 78 required :ledgerable_type, enum: -> { ModernTreasury::LedgerTransaction::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.
85 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 85 required :live_mode, ModernTreasury::Internal::Type::Boolean |
#metadata ⇒ Hash{Symbol=>String}
Additional data represented as key-value pairs. Both the key and value must be strings.
92 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 92 required :metadata, ModernTreasury::Internal::Type::HashOf[String] |
#object ⇒ String
97 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 97 required :object, String |
#partially_posts_ledger_transaction_id ⇒ String?
The ID of the ledger transaction that this ledger transaction partially posts.
103 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 103 required :partially_posts_ledger_transaction_id, String, nil?: true |
#posted_at ⇒ Time?
The time on which the ledger transaction posted. This is null if the ledger transaction is pending.
110 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 110 required :posted_at, Time, nil?: true |
#reversed_by_ledger_transaction_id ⇒ String?
The ID of the ledger transaction that reversed this ledger transaction.
116 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 116 required :reversed_by_ledger_transaction_id, String, nil?: true |
#reverses_ledger_transaction_id ⇒ String?
The ID of the original ledger transaction that this ledger transaction reverses.
122 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 122 required :reverses_ledger_transaction_id, String, nil?: true |
#status ⇒ Symbol, ModernTreasury::Models::LedgerTransaction::Status
To post a ledger transaction at creation, use ‘posted`.
128 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 128 required :status, enum: -> { ModernTreasury::LedgerTransaction::Status } |
#updated_at ⇒ Time
133 |
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 133 required :updated_at, Time |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/modern_treasury/models/ledger_transaction.rb', line 193
|