DVSale class
A sale, as the application keeps it.
Constructors
-
DVSale({required String id, required String customerKey, required List<
DVSaleLine> lines, required DVMoney subtotal, required DVMoney discount, required DVMoney tax, required DVMoney total, required DVTaxBehavior behavior, required DVTaxSource taxSource, required String taxJurisdiction, required List<String> promotions, required Set<String> entitlements, required DateTime createdAt, DVSaleStatus status = DVSaleStatus.pending, String? taxReference, String? chargeReference, DVMoney? refunded, DVMoney? taxRefunded, DateTime? revokedAt})
Properties
- behavior → DVTaxBehavior
-
final
- chargeReference → String?
-
final
- createdAt → DateTime
-
final
- currency → String
-
no setter
- customerKey → String
-
final
- discount → DVMoney
-
final
-
entitlements
→ Set<
String> -
Entitlement ids the sale granted.
final
- grants → bool
-
Whether the sale still grants what it sold.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The order id.
final
-
lines
→ List<
DVSaleLine> -
final
- needsRerating → bool
-
Priced from the offline tax table, and to be re-rated:
DV-COMMERCE-001.no setter -
promotions
→ List<
String> -
final
- refunded → DVMoney
-
final
- revokedAt → DateTime?
-
When the sale's entitlements were taken back, by a full refund or a lost
dispute.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → DVSaleStatus
-
final
- subtotal → DVMoney
-
final
- tax → DVMoney
-
final
- taxJurisdiction → String
-
final
- taxReference → String?
-
The tax provider's calculation, which its invoice refers to.
final
- taxRefunded → DVMoney
-
The part of refunded that was tax.
final
- taxSource → DVTaxSource
-
final
- total → DVMoney
-
What was captured.
final
Methods
-
copyWith(
{DVSaleStatus? status, String? chargeReference, DVMoney? refunded, DVMoney? taxRefunded, DateTime? revokedAt, bool clearRevokedAt = false}) → DVSale -
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