PriceRuleIndex constructor

PriceRuleIndex({
  1. Iterable<MapEntry<int, PriceRuleIndices>>? rulesByComponentType,
  2. Iterable<MapEntry<int, PriceRuleIndices>>? rulesBySKUType,
  3. Iterable<MapEntry<String, PriceRuleIndices>>? rulesBySKU,
  4. Iterable<MapEntry<String, PriceRuleIndices>>? rulesByProvider,
  5. Iterable<MapEntry<String, PriceRuleIndices>>? rulesByTag,
  6. PriceRuleIndices? generalRuleIndices,
})

Implementation

factory PriceRuleIndex({
  $core.Iterable<$core.MapEntry<$core.int, PriceRuleIndices>>?
      rulesByComponentType,
  $core.Iterable<$core.MapEntry<$core.int, PriceRuleIndices>>? rulesBySKUType,
  $core.Iterable<$core.MapEntry<$core.String, PriceRuleIndices>>? rulesBySKU,
  $core.Iterable<$core.MapEntry<$core.String, PriceRuleIndices>>?
      rulesByProvider,
  $core.Iterable<$core.MapEntry<$core.String, PriceRuleIndices>>? rulesByTag,
  PriceRuleIndices? generalRuleIndices,
}) {
  final result = create();
  if (rulesByComponentType != null)
    result.rulesByComponentType.addEntries(rulesByComponentType);
  if (rulesBySKUType != null)
    result.rulesBySKUType.addEntries(rulesBySKUType);
  if (rulesBySKU != null) result.rulesBySKU.addEntries(rulesBySKU);
  if (rulesByProvider != null)
    result.rulesByProvider.addEntries(rulesByProvider);
  if (rulesByTag != null) result.rulesByTag.addEntries(rulesByTag);
  if (generalRuleIndices != null)
    result.generalRuleIndices = generalRuleIndices;
  return result;
}