Promotion constructor
Promotion({
- RowVersion? rowVersion,
- PromotionId? id,
- PromotionRuleId? ruleId,
- String? title,
- StringValue? description,
- bool? deleted,
- Iterable<
PromotionProduct> ? products, - AccountId? appliesToAccountId,
- Timestamp? startsAt,
- Timestamp? endsAt,
- PromotionConfiguration? configuration,
- StoredImage? image,
- Timestamp? createdTime,
- Timestamp? updatedTime,
- Promotion_ProductMatch? match,
Implementation
factory Promotion({
$0.RowVersion? rowVersion,
$1.PromotionId? id,
$1.PromotionRuleId? ruleId,
$core.String? title,
$2.StringValue? description,
$core.bool? deleted,
$core.Iterable<PromotionProduct>? products,
$1.AccountId? appliesToAccountId,
$3.Timestamp? startsAt,
$3.Timestamp? endsAt,
PromotionConfiguration? configuration,
$4.StoredImage? image,
$3.Timestamp? createdTime,
$3.Timestamp? updatedTime,
Promotion_ProductMatch? match,
}) {
final result = create();
if (rowVersion != null) result.rowVersion = rowVersion;
if (id != null) result.id = id;
if (ruleId != null) result.ruleId = ruleId;
if (title != null) result.title = title;
if (description != null) result.description = description;
if (deleted != null) result.deleted = deleted;
if (products != null) result.products.addAll(products);
if (appliesToAccountId != null)
result.appliesToAccountId = appliesToAccountId;
if (startsAt != null) result.startsAt = startsAt;
if (endsAt != null) result.endsAt = endsAt;
if (configuration != null) result.configuration = configuration;
if (image != null) result.image = image;
if (createdTime != null) result.createdTime = createdTime;
if (updatedTime != null) result.updatedTime = updatedTime;
if (match != null) result.match = match;
return result;
}