Class: ModernTreasury::Models::LedgerEntryCreateRequest
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModernTreasury::Models::LedgerEntryCreateRequest
- Defined in:
- lib/modern_treasury/models/ledger_entry_create_request.rb
Instance Attribute Summary collapse
-
#amount ⇒ Integer
Value in specified currency’s smallest unit.
-
#available_balance_amount ⇒ Hash{Symbol=>Integer}?
Use ‘gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the account’s available balance.
-
#direction ⇒ Symbol, ModernTreasury::Models::TransactionDirection
One of ‘credit`, `debit`.
-
#ledger_account_id ⇒ String
The ledger account that this ledger entry is associated with.
-
#lock_version ⇒ Integer?
Lock version of the ledger account.
-
#metadata ⇒ Hash{Symbol=>String}?
Additional data represented as key-value pairs.
-
#pending_balance_amount ⇒ Hash{Symbol=>Integer}?
Use ‘gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the account’s pending balance.
-
#posted_balance_amount ⇒ Hash{Symbol=>Integer}?
Use ‘gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the account’s posted balance.
-
#show_resulting_ledger_account_balances ⇒ Boolean?
If true, response will include the balance of the associated ledger account for the entry.
Instance Method Summary collapse
-
#initialize(amount: , direction: , ledger_account_id: , available_balance_amount: nil, lock_version: nil, metadata: nil, pending_balance_amount: nil, posted_balance_amount: nil, show_resulting_ledger_account_balances: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see LedgerEntryCreateRequest 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(amount: , direction: , ledger_account_id: , available_balance_amount: nil, lock_version: nil, metadata: nil, pending_balance_amount: nil, posted_balance_amount: nil, show_resulting_ledger_account_balances: nil) ⇒ Object
Some parameter documentations has been truncated, see ModernTreasury::Models::LedgerEntryCreateRequest for more details.
|
|
# File 'lib/modern_treasury/models/ledger_entry_create_request.rb', line 75
|
Instance Attribute Details
#amount ⇒ Integer
Value in specified currency’s smallest unit. e.g. $10 would be represented as 1000. Can be any integer up to 36 digits.
11 |
# File 'lib/modern_treasury/models/ledger_entry_create_request.rb', line 11 required :amount, Integer |
#available_balance_amount ⇒ Hash{Symbol=>Integer}?
Use ‘gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the account’s available balance. If any of these conditions would be false after the transaction is created, the entire call will fail with error code 422.
34 |
# File 'lib/modern_treasury/models/ledger_entry_create_request.rb', line 34 optional :available_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true |
#direction ⇒ Symbol, ModernTreasury::Models::TransactionDirection
One of ‘credit`, `debit`. Describes the direction money is flowing in the transaction. A `credit` moves money from your account to someone else’s. A ‘debit` pulls money from someone else’s account to your own. Note that wire, rtp, and check payments will always be ‘credit`.
20 |
# File 'lib/modern_treasury/models/ledger_entry_create_request.rb', line 20 required :direction, enum: -> { ModernTreasury::TransactionDirection } |
#ledger_account_id ⇒ String
The ledger account that this ledger entry is associated with.
26 |
# File 'lib/modern_treasury/models/ledger_entry_create_request.rb', line 26 required :ledger_account_id, String |
#lock_version ⇒ Integer?
Lock version of the ledger account. This can be passed when creating a ledger transaction to only succeed if no ledger transactions have posted since the given version. See our post about Designing the Ledgers API with Optimistic Locking for more details.
43 |
# File 'lib/modern_treasury/models/ledger_entry_create_request.rb', line 43 optional :lock_version, Integer, nil?: true |
#metadata ⇒ Hash{Symbol=>String}?
Additional data represented as key-value pairs. Both the key and value must be strings.
50 |
# File 'lib/modern_treasury/models/ledger_entry_create_request.rb', line 50 optional :metadata, ModernTreasury::Internal::Type::HashOf[String] |
#pending_balance_amount ⇒ Hash{Symbol=>Integer}?
Use ‘gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the account’s pending balance. If any of these conditions would be false after the transaction is created, the entire call will fail with error code 422.
58 |
# File 'lib/modern_treasury/models/ledger_entry_create_request.rb', line 58 optional :pending_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true |
#posted_balance_amount ⇒ Hash{Symbol=>Integer}?
Use ‘gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the account’s posted balance. If any of these conditions would be false after the transaction is created, the entire call will fail with error code 422.
66 |
# File 'lib/modern_treasury/models/ledger_entry_create_request.rb', line 66 optional :posted_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true |
#show_resulting_ledger_account_balances ⇒ Boolean?
If true, response will include the balance of the associated ledger account for the entry.
73 |
# File 'lib/modern_treasury/models/ledger_entry_create_request.rb', line 73 optional :show_resulting_ledger_account_balances, ModernTreasury::Internal::Type::Boolean, nil?: true |