Interface DiscountCodeInfo


public interface DiscountCodeInfo
DiscountCodeInfo
Example to create an instance using the builder pattern

     DiscountCodeInfo discountCodeInfo = DiscountCodeInfo.builder()
             .discountCode(discountCodeBuilder -> discountCodeBuilder)
             .state(DiscountCodeState.NOT_ACTIVE)
             .build()
 
  • Method Details

    • getDiscountCode

      @NotNull @Valid @NotNull @Valid DiscountCodeReference getDiscountCode()

      Discount Code associated with the Cart or Order.

      Returns:
      discountCode
    • getState

      @NotNull @NotNull DiscountCodeState getState()

      Indicates the state of the Discount Code applied to the Cart or Order.

      Returns:
      state
    • setDiscountCode

      void setDiscountCode(DiscountCodeReference discountCode)

      Discount Code associated with the Cart or Order.

      Parameters:
      discountCode - value to be set
    • setState

      void setState(DiscountCodeState state)

      Indicates the state of the Discount Code applied to the Cart or Order.

      Parameters:
      state - value to be set
    • of

      static DiscountCodeInfo of()
      factory method
      Returns:
      instance of DiscountCodeInfo
    • of

      static DiscountCodeInfo of(DiscountCodeInfo template)
      factory method to create a shallow copy DiscountCodeInfo
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

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

      static DiscountCodeInfoBuilder builder()
      builder factory method for DiscountCodeInfo
      Returns:
      builder
    • builder

      static DiscountCodeInfoBuilder builder(DiscountCodeInfo template)
      create builder for DiscountCodeInfo instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withDiscountCodeInfo

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