PromotionQuery constructor

PromotionQuery({
  1. ContinuationToken? continuation,
  2. AccountId? accountId,
  3. AccountId? appliesToAccountId,
  4. BoolValue? includeDisabled,
  5. BoolValue? includeDeleted,
  6. Timestamp? activeOn,
  7. PromotionRuleId? ruleId,
  8. Iterable<SKU>? skus,
  9. Iterable<PromotionQuery_PromotionOrdering>? orderBy,
  10. Timestamp? startedBefore,
})

Implementation

factory PromotionQuery({
  $0.ContinuationToken? continuation,
  $1.AccountId? accountId,
  $1.AccountId? appliesToAccountId,
  $2.BoolValue? includeDisabled,
  $2.BoolValue? includeDeleted,
  $3.Timestamp? activeOn,
  $1.PromotionRuleId? ruleId,
  $core.Iterable<$1.SKU>? skus,
  $core.Iterable<PromotionQuery_PromotionOrdering>? orderBy,
  $3.Timestamp? startedBefore,
}) {
  final result = create();
  if (continuation != null) result.continuation = continuation;
  if (accountId != null) result.accountId = accountId;
  if (appliesToAccountId != null)
    result.appliesToAccountId = appliesToAccountId;
  if (includeDisabled != null) result.includeDisabled = includeDisabled;
  if (includeDeleted != null) result.includeDeleted = includeDeleted;
  if (activeOn != null) result.activeOn = activeOn;
  if (ruleId != null) result.ruleId = ruleId;
  if (skus != null) result.skus.addAll(skus);
  if (orderBy != null) result.orderBy.addAll(orderBy);
  if (startedBefore != null) result.startedBefore = startedBefore;
  return result;
}