Discount constructor
Discount({
- VoucherRuleId? id,
- VoucherCode? code,
- StringValue? title,
- StringValue? decription,
- Price? value,
- Any? details,
- StoredImage? image,
- PriceComposition? priceComposition,
- Iterable<
PriceRule> ? priceRules, - PromotionId? promotionId,
Implementation
factory Discount({
$0.VoucherRuleId? id,
$0.VoucherCode? code,
$1.StringValue? title,
$1.StringValue? decription,
$4.Price? value,
$11.Any? details,
$9.StoredImage? image,
$4.PriceComposition? priceComposition,
$core.Iterable<$4.PriceRule>? priceRules,
$0.PromotionId? promotionId,
}) {
final result = create();
if (id != null) result.id = id;
if (code != null) result.code = code;
if (title != null) result.title = title;
if (decription != null) result.decription = decription;
if (value != null) result.value = value;
if (details != null) result.details = details;
if (image != null) result.image = image;
if (priceComposition != null) result.priceComposition = priceComposition;
if (priceRules != null) result.priceRules.addAll(priceRules);
if (promotionId != null) result.promotionId = promotionId;
return result;
}