Promotion constructor

  1. @JsonSerializable(includeIfNull: false)
const Promotion({
  1. required String reference_id,
  2. required String code,
  3. required String type,
  4. required int value,
  5. required String value_type,
  6. String? description,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory Promotion({
  required String reference_id,
  required String code,
  required String type, // 'coupon' | 'offer'
  required int value,
  required String value_type, // 'fixed_amount' | 'percentage'
  String? description,
}) = _Promotion;