PromotionRule constructor

PromotionRule({
  1. PromotionRuleId? id,
  2. String? title,
  3. StringValue? description,
  4. StoredImage? image,
  5. PromotionConfiguration? defaultConfiguration,
  6. Range? productCount,
  7. Credit? minimumBaseValue,
  8. Promotion_ProductMatch? match,
  9. Iterable<String>? information,
  10. Any? details,
})

Implementation

factory PromotionRule({
  $1.PromotionRuleId? id,
  $core.String? title,
  $2.StringValue? description,
  $4.StoredImage? image,
  PromotionConfiguration? defaultConfiguration,
  $0.Range? productCount,
  $0.Credit? minimumBaseValue,
  Promotion_ProductMatch? match,
  $core.Iterable<$core.String>? information,
  $5.Any? details,
}) {
  final result = create();
  if (id != null) result.id = id;
  if (title != null) result.title = title;
  if (description != null) result.description = description;
  if (image != null) result.image = image;
  if (defaultConfiguration != null)
    result.defaultConfiguration = defaultConfiguration;
  if (productCount != null) result.productCount = productCount;
  if (minimumBaseValue != null) result.minimumBaseValue = minimumBaseValue;
  if (match != null) result.match = match;
  if (information != null) result.information.addAll(information);
  if (details != null) result.details = details;
  return result;
}