Cart constructor

Cart({
  1. required String id,
  2. required String? checkoutUrl,
  3. required CartCost? cost,
  4. required int? totalQuantity,
  5. required List<CartDiscountAllocation?>? discountAllocations,
  6. required List<CartDiscountCode?>? discountCodes,
  7. required String? createdAt,
  8. CartBuyerIdentity? buyerIdentity,
  9. String? note,
  10. String? updatedAt,
  11. @JsonKey(fromJson: JsonHelper.lines) required List<Line> lines,
})

The cart constructor

Implementation

factory Cart({
  required String id,
  required String? checkoutUrl,
  required CartCost? cost,
  required int? totalQuantity,
  required List<CartDiscountAllocation?>? discountAllocations,
  required List<CartDiscountCode?>? discountCodes,
  required String? createdAt,
  CartBuyerIdentity? buyerIdentity,
  String? note,
  String? updatedAt,
  @JsonKey(fromJson: JsonHelper.lines) required List<Line> lines,
}) = _Cart;