PriceRuleAction constructor

PriceRuleAction({
  1. PriceComponent? add,
  2. PriceRuleCondition? remove,
  3. RemoveMatched? removeMatched,
  4. PriceCalculation? calculation,
  5. bool? doNotProcessNewComponents,
  6. PriceTransformation? transform,
  7. FieldMask? copyFieldsFromMatch,
})

Implementation

factory PriceRuleAction({
  PriceComponent? add,
  PriceRuleCondition? remove,
  RemoveMatched? removeMatched,
  PriceCalculation? calculation,
  $core.bool? doNotProcessNewComponents,
  PriceTransformation? transform,
  $3.FieldMask? copyFieldsFromMatch,
}) {
  final result = create();
  if (add != null) result.add = add;
  if (remove != null) result.remove = remove;
  if (removeMatched != null) result.removeMatched = removeMatched;
  if (calculation != null) result.calculation = calculation;
  if (doNotProcessNewComponents != null)
    result.doNotProcessNewComponents = doNotProcessNewComponents;
  if (transform != null) result.transform = transform;
  if (copyFieldsFromMatch != null)
    result.copyFieldsFromMatch = copyFieldsFromMatch;
  return result;
}