Interface DiscountedLineItemPortionDraft

All Superinterfaces:
Draft<DiscountedLineItemPortionDraft>

public interface DiscountedLineItemPortionDraft extends Draft<DiscountedLineItemPortionDraft>
DiscountedLineItemPortionDraft
Example to create an instance using the builder pattern

     DiscountedLineItemPortionDraft discountedLineItemPortionDraft = DiscountedLineItemPortionDraft.builder()
             .discount(discountBuilder -> discountBuilder)
             .discountedAmount(discountedAmountBuilder -> discountedAmountBuilder)
             .build()
 
  • Method Details

    • getDiscount

      @NotNull @Valid @NotNull @Valid Reference getDiscount()

      A CartDiscountReference or DirectDiscountReference for the discount applicable on the Line Item.

      Returns:
      discount
    • getDiscountedAmount

      @NotNull @Valid @NotNull @Valid TypedMoneyDraft getDiscountedAmount()

      Money value for the discount applicable.

      Returns:
      discountedAmount
    • setDiscount

      void setDiscount(Reference discount)

      A CartDiscountReference or DirectDiscountReference for the discount applicable on the Line Item.

      Parameters:
      discount - value to be set
    • setDiscountedAmount

      void setDiscountedAmount(TypedMoneyDraft discountedAmount)

      Money value for the discount applicable.

      Parameters:
      discountedAmount - value to be set
    • of

      factory method
      Returns:
      instance of DiscountedLineItemPortionDraft
    • of

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

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

      builder factory method for DiscountedLineItemPortionDraft
      Returns:
      builder
    • builder

      create builder for DiscountedLineItemPortionDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withDiscountedLineItemPortionDraft

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