DVPayoutLedger class abstract
Where payout entries are kept.
Every write that checks a balance or an id is one step with the check.
Constructors
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 incurrency; withavailable, 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
amountofsaleIdunderreference, unless one is recorded under it (false).entriesis given the sale and how much was reversed before, and returns the entries. Returns null whenamountis more than is left, recording nothing. -
recordSale(
DVPayoutSaleRecord sale, List< DVPayoutEntry> credits) → Future<bool> -
Records
saleand itscreditsunless 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
accountIdincurrencyas payoutpayoutId, debiting it, as one step with reading the balance. Returns the existing record whenpayoutIdis 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