Policies
components.payment_gateway.subcomponents.transfers.business_logic.policies.helpers ¶
record_ledger_entry_for_transfer_event ¶
Record a new ledger entry matching the balance change of the provided transfer event.
Does nothing if the balance change is zero.
Note
The function makes no assumption about multiple ledger entries sharing the same external_id, deduplication is the caller's responsibility to ensure there is no double accounting of the same event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ledger_actions
|
LedgerActions
|
The ledger actions instance to use. |
required |
ledger_id
|
LedgerId
|
The ID of the ledger to record the entry in. |
required |
transfer_event
|
TransferEvent
|
The transfer event to record the ledger entry for. |
required |