Interface ChangeTargetMultiBuyLineItemsChangeValue

All Superinterfaces:
ChangeTargetChangeValue

public interface ChangeTargetMultiBuyLineItemsChangeValue extends ChangeTargetChangeValue
ChangeTargetMultiBuyLineItemsChangeValue
Example to create an instance using the builder pattern

     ChangeTargetMultiBuyLineItemsChangeValue changeTargetMultiBuyLineItemsChangeValue = ChangeTargetMultiBuyLineItemsChangeValue.builder()
             .predicate("{predicate}")
             .triggerQuantity(1)
             .discountedQuantity(1)
             .maxOccurrence(1)
             .selectionMode(SelectionMode.CHEAPEST)
             .build()
 
  • Field Details

    • MULTI_BUY_LINE_ITEMS

      static final String MULTI_BUY_LINE_ITEMS
      discriminator value for ChangeTargetMultiBuyLineItemsChangeValue
      See Also:
  • Method Details

    • getType

      @NotNull @NotNull String getType()
      Specified by:
      getType in interface ChangeTargetChangeValue
      Returns:
      type
    • getPredicate

      @NotNull @NotNull String getPredicate()

      Valid LineItem target predicate.

      Returns:
      predicate
    • getTriggerQuantity

      @NotNull @NotNull Integer getTriggerQuantity()

      Quantity of Line Items that triggered the application of the discount.

      Returns:
      triggerQuantity
    • getDiscountedQuantity

      @NotNull @NotNull Integer getDiscountedQuantity()

      Quantity of Line Items discounted per application of this discount.

      Returns:
      discountedQuantity
    • getMaxOccurrence

      @NotNull @NotNull Integer getMaxOccurrence()

      Maximum number of times the discount is applicable.

      Returns:
      maxOccurrence
    • getSelectionMode

      @NotNull @NotNull SelectionMode getSelectionMode()

      SelectionMode based on which particular Line Items were discounted.

      Returns:
      selectionMode
    • setPredicate

      void setPredicate(String predicate)

      Valid LineItem target predicate.

      Parameters:
      predicate - value to be set
    • setTriggerQuantity

      void setTriggerQuantity(Integer triggerQuantity)

      Quantity of Line Items that triggered the application of the discount.

      Parameters:
      triggerQuantity - value to be set
    • setDiscountedQuantity

      void setDiscountedQuantity(Integer discountedQuantity)

      Quantity of Line Items discounted per application of this discount.

      Parameters:
      discountedQuantity - value to be set
    • setMaxOccurrence

      void setMaxOccurrence(Integer maxOccurrence)

      Maximum number of times the discount is applicable.

      Parameters:
      maxOccurrence - value to be set
    • setSelectionMode

      void setSelectionMode(SelectionMode selectionMode)

      SelectionMode based on which particular Line Items were discounted.

      Parameters:
      selectionMode - value to be set
    • of

      factory method
      Returns:
      instance of ChangeTargetMultiBuyLineItemsChangeValue
    • of

      factory method to create a shallow copy ChangeTargetMultiBuyLineItemsChangeValue
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of ChangeTargetMultiBuyLineItemsChangeValue
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ChangeTargetMultiBuyLineItemsChangeValue
      Returns:
      builder
    • builder

      create builder for ChangeTargetMultiBuyLineItemsChangeValue instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withChangeTargetMultiBuyLineItemsChangeValue

      default <T> T withChangeTargetMultiBuyLineItemsChangeValue(Function<ChangeTargetMultiBuyLineItemsChangeValue,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ChangeTargetMultiBuyLineItemsChangeValue> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference