PriceRuleInput

Specifies the input fields to manipulate a price rule.

Show definition
# Specifies the input fields to manipulate a price rule.
input PriceRuleInput {
  # PriceRuleValidityPeriod for the price rule.
  validityPeriod: PriceRuleValidityPeriodInput

  # Whether the price rule can be applied only once per customer.
  oncePerCustomer: Boolean = false

  # A selection of customers for whom the price rule applies.
  customerSelection: PriceRuleCustomerSelectionInput

  # The maximum number of times the price rule can be applied.
  usageLimit: Int

  # Title of the price rule.
  title: String

  # The method (each or across) by which the price rule's value is allocated to its entitled items.
  allocationMethod: PriceRuleAllocationMethod

  # The value of the price rule.
  value: PriceRuleValueInput

  # The type of lines (line_item or shipping_line) to which the price rule applies.
  target: PriceRuleTarget

  # The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable.
  prerequisiteSubtotalRange: PriceRuleMoneyRangeInput

  # The number of the entitled items must fall within this range for the price rule to be applicable.
  prerequisiteQuantityRange: PriceRuleQuantityRangeInput

  # The shipping cost must fall within this range for the price rule to be applicable.
  prerequisiteShippingPriceRange: PriceRuleMoneyRangeInput

  # The items to which the price rule applies.
  itemEntitlements: PriceRuleItemEntitlementsInput

  # The items needed to apply the price rule.
  itemPrerequisites: PriceRuleItemPrerequisitesInput

  # The shipping lines to which the price rule applies.
  shippingEntitlements: PriceRuleShippingEntitlementsInput

  # Quantity of prerequisite items required for the price rule to be applicable,
  # compared to quantity of entitled items. This argument is deprecated: Use
  # `prerequisiteToEntitlementQuantityRatio` instead.
  entitlementToPrerequisiteQuantityRatio: PriceRuleEntitlementToPrerequisiteQuantityRatioInput

  # Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.
  prerequisiteToEntitlementQuantityRatio: PriceRulePrerequisiteToEntitlementQuantityRatioInput
}

Input Fields

allocationMethod   (PriceRuleAllocationMethod)

The method (each or across) by which the price rule's value is allocated to its entitled items.

customerSelection   (PriceRuleCustomerSelectionInput)

A selection of customers for whom the price rule applies.

entitlementToPrerequisiteQuantityRatio   (PriceRuleEntitlementToPrerequisiteQuantityRatioInput)

Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. This argument is deprecated: Use prerequisiteToEntitlementQuantityRatio instead.

itemEntitlements   (PriceRuleItemEntitlementsInput)

The items to which the price rule applies.

itemPrerequisites   (PriceRuleItemPrerequisitesInput)

The items needed to apply the price rule.

oncePerCustomer   (Boolean)

Whether the price rule can be applied only once per customer.

prerequisiteQuantityRange   (PriceRuleQuantityRangeInput)

The number of the entitled items must fall within this range for the price rule to be applicable.

prerequisiteShippingPriceRange   (PriceRuleMoneyRangeInput)

The shipping cost must fall within this range for the price rule to be applicable.

prerequisiteSubtotalRange   (PriceRuleMoneyRangeInput)

The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable.

prerequisiteToEntitlementQuantityRatio   (PriceRulePrerequisiteToEntitlementQuantityRatioInput)

Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

shippingEntitlements   (PriceRuleShippingEntitlementsInput)

The shipping lines to which the price rule applies.

target   (PriceRuleTarget)

The type of lines (line_item or shipping_line) to which the price rule applies.

title   (String)

Title of the price rule.

usageLimit   (Int)

The maximum number of times the price rule can be applied.

validityPeriod   (PriceRuleValidityPeriodInput)

PriceRuleValidityPeriod for the price rule.

value   (PriceRuleValueInput)

The value of the price rule.