Interface ChangeTargetPatternChangeValue

All Superinterfaces:
ChangeTargetChangeValue

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

     ChangeTargetPatternChangeValue changeTargetPatternChangeValue = ChangeTargetPatternChangeValue.builder()
             .plusTargetPattern(targetPatternBuilder -> targetPatternBuilder)
             .selectionMode(SelectionMode.CHEAPEST)
             .build()
 
  • Field Details

  • Method Details

    • getType

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

      @Valid @Valid List<PatternComponent> getTriggerPattern()

      Units of a (Custom) Line Item that triggered the discount application.

      Returns:
      triggerPattern
    • getTargetPattern

      @NotNull @Valid @NotNull @Valid List<PatternComponent> getTargetPattern()

      Units of (Custom) Line Items on which the Discount is applied.

      Returns:
      targetPattern
    • getMaxOccurrence

      Integer getMaxOccurrence()

      Maximum number of times the Discount applies on a Cart.

      If empty, the Discount applies indefinitely.

      Returns:
      maxOccurrence
    • getSelectionMode

      @NotNull @NotNull SelectionMode getSelectionMode()

      Indicates which of the matching units of (Custom) Line Items were discounted.

      Returns:
      selectionMode
    • setTriggerPattern

      void setTriggerPattern(PatternComponent... triggerPattern)

      Units of a (Custom) Line Item that triggered the discount application.

      Parameters:
      triggerPattern - values to be set
    • setTriggerPattern

      void setTriggerPattern(List<PatternComponent> triggerPattern)

      Units of a (Custom) Line Item that triggered the discount application.

      Parameters:
      triggerPattern - values to be set
    • setTargetPattern

      void setTargetPattern(PatternComponent... targetPattern)

      Units of (Custom) Line Items on which the Discount is applied.

      Parameters:
      targetPattern - values to be set
    • setTargetPattern

      void setTargetPattern(List<PatternComponent> targetPattern)

      Units of (Custom) Line Items on which the Discount is applied.

      Parameters:
      targetPattern - values to be set
    • setMaxOccurrence

      void setMaxOccurrence(Integer maxOccurrence)

      Maximum number of times the Discount applies on a Cart.

      If empty, the Discount applies indefinitely.

      Parameters:
      maxOccurrence - value to be set
    • setSelectionMode

      void setSelectionMode(SelectionMode selectionMode)

      Indicates which of the matching units of (Custom) Line Items were discounted.

      Parameters:
      selectionMode - value to be set
    • of

      factory method
      Returns:
      instance of ChangeTargetPatternChangeValue
    • of

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

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

      builder factory method for ChangeTargetPatternChangeValue
      Returns:
      builder
    • builder

      create builder for ChangeTargetPatternChangeValue instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withChangeTargetPatternChangeValue

      default <T> T withChangeTargetPatternChangeValue(Function<ChangeTargetPatternChangeValue,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<ChangeTargetPatternChangeValue> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference