Distribution defines how a transaction amount is allocated to a specific source or destination.
| 36 | |
| 37 | // Distribution defines how a transaction amount is allocated to a specific source or destination. |
| 38 | type Distribution struct { |
| 39 | Identifier string `json:"identifier"` |
| 40 | Distribution string `json:"distribution"` // Can be a percentage (e.g., "10%"), a fixed amount (e.g., "100"), or "left" |
| 41 | PreciseDistribution string `json:"precise_distribution,omitempty"` // Fixed amount in minor units (e.g., "1006" for 1006 cents) |
| 42 | TransactionID string `json:"transaction_id"` |
| 43 | } |
| 44 | |
| 45 | // distributionState holds the shared state during distribution calculation |
| 46 | type distributionState struct { |
nothing calls this directly
no outgoing calls
no test coverage detected