Interface CartDiscountValueAbsolute

All Superinterfaces:
CartDiscountValue, CartDiscountValueAbsoluteMixin, CartDiscountValueMixin, GenericCartDiscountValueMixin<CartDiscountValueAbsoluteDraft>

public interface CartDiscountValueAbsolute extends CartDiscountValue, CartDiscountValueAbsoluteMixin

Discounts the CartDiscountTarget by an absolute amount (not allowed for MultiBuyLineItemsTarget and MultiBuyCustomLineItemsTarget).


Example to create an instance using the builder pattern

     CartDiscountValueAbsolute cartDiscountValueAbsolute = CartDiscountValueAbsolute.builder()
             .plusMoney(moneyBuilder -> moneyBuilder)
             .build()
 
  • Field Details

  • Method Details

    • getMoney

      @NotNull @Valid @NotNull @Valid List<CentPrecisionMoney> getMoney()

      Cent precision money values in different currencies.

      Specified by:
      getMoney in interface CartDiscountValueAbsoluteMixin
      Returns:
      money
    • getApplicationMode

      DiscountApplicationMode getApplicationMode()

      Determines how the discount is applied on CartDiscountLineItemTarget and CartDiscountCustomLineItemTarget.

      Returns:
      applicationMode
    • setMoney

      void setMoney(CentPrecisionMoney... money)

      Cent precision money values in different currencies.

      Parameters:
      money - values to be set
    • setMoney

      void setMoney(List<CentPrecisionMoney> money)

      Cent precision money values in different currencies.

      Parameters:
      money - values to be set
    • setApplicationMode

      void setApplicationMode(DiscountApplicationMode applicationMode)

      Determines how the discount is applied on CartDiscountLineItemTarget and CartDiscountCustomLineItemTarget.

      Parameters:
      applicationMode - value to be set
    • of

      factory method
      Returns:
      instance of CartDiscountValueAbsolute
    • of

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

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

      builder factory method for CartDiscountValueAbsolute
      Returns:
      builder
    • builder

      create builder for CartDiscountValueAbsolute instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCartDiscountValueAbsolute

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