DVPromotion class

A coupon, campaign or credit.

Normally a generated model; this is the shape the resolver reads.

Constructors

DVPromotion({required String id, required DVDiscount discount, required DVPromotionStacking stacking, String? code, int? maxRedemptions, int? maxRedemptionsPerCustomer, DateTime? startsAt, DateTime? endsAt, Set<String>? products, DVMoney? minimumSubtotal, int priority = 0})
const

Properties

code → String?
What a customer types, matched without regard to case. Null for a promotion that applies to every order it is eligible for.
final
discount → DVDiscount
final
endsAt → DateTime?
Live until this moment, exclusive.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
maxRedemptions → int?
Redemptions across everybody, or null for no limit.
final
maxRedemptionsPerCustomer → int?
Redemptions by one customer, or null for no limit.
final
minimumSubtotal → DVMoney?
The order, before any discount, has to cost at least this.
final
priority → int
Order of application: lower first, then by id. Each promotion is applied to what the earlier ones left.
final
products → Set<String>?
The product ids it discounts, or null for every line.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stacking → DVPromotionStacking
final
startsAt → DateTime?
Live from this moment, inclusive.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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