DVPayoutLedger class abstract

Where payout entries are kept.

Every write that checks a balance or an id is one step with the check.

Constructors

DVPayoutLedger()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

balance(String accountId, String currency, {bool available = false}) → Future<int>
The sum of accountId's entries in currency; with available, leaving out entries of sales on hold.
completePayout(String payoutId, String transferReference) → Future<void>
findPayout(String payoutId) → Future<DVPayoutRecord?>
hold(String saleId, String reason) → Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recordReversal({required String saleId, required String reference, required int amount, required List<DVPayoutEntry> entries(DVPayoutSaleRecord sale, int before)}) → Future<bool?>
Records a reversal of amount of saleId under reference, unless one is recorded under it (false). entries is given the sale and how much was reversed before, and returns the entries. Returns null when amount is more than is left, recording nothing.
recordSale(DVPayoutSaleRecord sale, List<DVPayoutEntry> credits) → Future<bool>
Records sale and its credits unless the sale is recorded. False when it is.
release(String saleId) → Future<void>
removePayout(String payoutId) → Future<void>
reservePayout({required String accountId, required String currency, required String payoutId, required DateTime at}) → Future<DVPayoutReservation>
Reserves everything available to accountId in currency as payout payoutId, debiting it, as one step with reading the balance. Returns the existing record when payoutId is already reserved.
sale(String saleId) → Future<DVPayoutSaleRecord?>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited