Interface CartDiscountValue

All Superinterfaces:
CartDiscountValueMixin
All Known Subinterfaces:
CartDiscountValueAbsolute, CartDiscountValueFixed, CartDiscountValueGiftLineItem, CartDiscountValueRelative

public interface CartDiscountValue extends CartDiscountValueMixin
CartDiscountValue
Example to create a subtype instance using the builder pattern

     CartDiscountValue cartDiscountValue = CartDiscountValue.absoluteBuilder()
             plusMoney(moneyBuilder -> moneyBuilder)
             .build()
 
  • Method Details

    • getType

      @NotNull @NotNull String getType()
      Returns:
      type
    • deepCopy

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

      static CartDiscountValueAbsoluteBuilder absoluteBuilder()
      builder for absolute subtype
      Returns:
      builder
    • fixedBuilder

      static CartDiscountValueFixedBuilder fixedBuilder()
      builder for fixed subtype
      Returns:
      builder
    • giftLineItemBuilder

      static CartDiscountValueGiftLineItemBuilder giftLineItemBuilder()
      builder for giftLineItem subtype
      Returns:
      builder
    • relativeBuilder

      static CartDiscountValueRelativeBuilder relativeBuilder()
      builder for relative subtype
      Returns:
      builder
    • withCartDiscountValue

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