Balance represents a financial balance with credit, debit, inflight, and queued sub-balances.
| 23 | |
| 24 | // Balance represents a financial balance with credit, debit, inflight, and queued sub-balances. |
| 25 | type Balance struct { |
| 26 | ID int64 `json:"-"` |
| 27 | Balance *big.Int `json:"balance"` |
| 28 | Version int64 `json:"version"` |
| 29 | InflightBalance *big.Int `json:"inflight_balance"` |
| 30 | CreditBalance *big.Int `json:"credit_balance"` |
| 31 | InflightCreditBalance *big.Int `json:"inflight_credit_balance"` |
| 32 | DebitBalance *big.Int `json:"debit_balance"` |
| 33 | InflightDebitBalance *big.Int `json:"inflight_debit_balance"` |
| 34 | QueuedDebitBalance *big.Int `json:"queued_debit_balance,omitempty"` |
| 35 | QueuedCreditBalance *big.Int `json:"queued_credit_balance,omitempty"` |
| 36 | CurrencyMultiplier float64 `json:"currency_multiplier"` |
| 37 | LedgerID string `json:"ledger_id"` |
| 38 | IdentityID string `json:"identity_id"` |
| 39 | BalanceID string `json:"balance_id"` |
| 40 | Indicator string `json:"indicator,omitempty"` |
| 41 | Currency string `json:"currency"` |
| 42 | Identity *Identity `json:"identity,omitempty"` |
| 43 | Ledger *Ledger `json:"ledger,omitempty"` |
| 44 | CreatedAt time.Time `json:"created_at"` |
| 45 | InflightExpiresAt time.Time `json:"inflight_expires_at"` |
| 46 | MetaData map[string]interface{} `json:"meta_data"` |
| 47 | TrackFundLineage bool `json:"track_fund_lineage"` |
| 48 | AllocationStrategy string `json:"allocation_strategy,omitempty"` |
| 49 | } |
| 50 | |
| 51 | // BalanceMonitor defines a condition-based alert that triggers a callback when a balance meets the specified criteria. |
| 52 | type BalanceMonitor struct { |
nothing calls this directly
no outgoing calls
no test coverage detected