DVPromotions class
The declared promotions and the resolver that applies them.
Constructors
-
DVPromotions({required List<
DVPromotion> promotions, required DVPromotionPolicy policy, required DVPromotionLedger ledger, DateTime clock()?, DVLogger? logger})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- ledger → DVPromotionLedger
-
final
- policy → DVPromotionPolicy
-
final
-
promotions
→ List<
DVPromotion> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
redeem(
DVContext context, {required Object customer, required List< DVOrderLine> lines, required List<String> codes, required String orderId}) → Future<DVPromotionResolution> -
Resolves
linesagain forcustomerand redeems what applies, insidecontext's transaction, so a charge that fails gives the redemptions back. -
resolve(
{required Object customer, required List< DVOrderLine> lines, required List<String> codes}) → Future<DVPromotionResolution> -
What
codes, and every automatic promotion, do tolinesforcustomer, without redeeming anything. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited