Interface CartDiscountLineItemsTarget

All Superinterfaces:
CartDiscountTarget

public interface CartDiscountLineItemsTarget extends CartDiscountTarget

Discount is applied to LineItems matching the predicate.


Example to create an instance using the builder pattern

     CartDiscountLineItemsTarget cartDiscountLineItemsTarget = CartDiscountLineItemsTarget.builder()
             .predicate("{predicate}")
             .build()
 
  • Field Details

  • Method Details

    • getPredicate

      @NotNull @NotNull String getPredicate()

      Valid LineItem target predicate.

      Returns:
      predicate
    • setPredicate

      void setPredicate(String predicate)

      Valid LineItem target predicate.

      Parameters:
      predicate - value to be set
    • of

      factory method
      Returns:
      instance of CartDiscountLineItemsTarget
    • of

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

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

      builder factory method for CartDiscountLineItemsTarget
      Returns:
      builder
    • builder

      create builder for CartDiscountLineItemsTarget instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCartDiscountLineItemsTarget

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