Interface DiscountOnTotalPrice


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

     DiscountOnTotalPrice discountOnTotalPrice = DiscountOnTotalPrice.builder()
             .discountedAmount(discountedAmountBuilder -> discountedAmountBuilder)
             .plusIncludedDiscounts(includedDiscountsBuilder -> includedDiscountsBuilder)
             .build()
 
  • Method Details

    • getDiscountedAmount

      @NotNull @Valid @NotNull @Valid TypedMoney getDiscountedAmount()

      Money value of the discount on the total price of the Cart or Order.

      Returns:
      discountedAmount
    • getIncludedDiscounts

      @NotNull @Valid @NotNull @Valid List<DiscountedTotalPricePortion> getIncludedDiscounts()

      Discounts that impact the total price of the Cart or Order.

      Returns:
      includedDiscounts
    • getDiscountedNetAmount

      @Valid @Valid TypedMoney getDiscountedNetAmount()

      Money value of the discount on the total net price of the Cart or Order. Present only when taxedPrice of the Cart or Order exists.

      Returns:
      discountedNetAmount
    • getDiscountedGrossAmount

      @Valid @Valid TypedMoney getDiscountedGrossAmount()

      Money value of the discount on the total gross price of the Cart or Order. Present only when taxedPrice of the Cart or Order exists.

      Returns:
      discountedGrossAmount
    • setDiscountedAmount

      void setDiscountedAmount(TypedMoney discountedAmount)

      Money value of the discount on the total price of the Cart or Order.

      Parameters:
      discountedAmount - value to be set
    • setIncludedDiscounts

      void setIncludedDiscounts(DiscountedTotalPricePortion... includedDiscounts)

      Discounts that impact the total price of the Cart or Order.

      Parameters:
      includedDiscounts - values to be set
    • setIncludedDiscounts

      void setIncludedDiscounts(List<DiscountedTotalPricePortion> includedDiscounts)

      Discounts that impact the total price of the Cart or Order.

      Parameters:
      includedDiscounts - values to be set
    • setDiscountedNetAmount

      void setDiscountedNetAmount(TypedMoney discountedNetAmount)

      Money value of the discount on the total net price of the Cart or Order. Present only when taxedPrice of the Cart or Order exists.

      Parameters:
      discountedNetAmount - value to be set
    • setDiscountedGrossAmount

      void setDiscountedGrossAmount(TypedMoney discountedGrossAmount)

      Money value of the discount on the total gross price of the Cart or Order. Present only when taxedPrice of the Cart or Order exists.

      Parameters:
      discountedGrossAmount - value to be set
    • of

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

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

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

      static DiscountOnTotalPriceBuilder builder()
      builder factory method for DiscountOnTotalPrice
      Returns:
      builder
    • builder

      create builder for DiscountOnTotalPrice instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withDiscountOnTotalPrice

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