Interface TaxedPrice


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

     TaxedPrice taxedPrice = TaxedPrice.builder()
             .totalNet(totalNetBuilder -> totalNetBuilder)
             .totalGross(totalGrossBuilder -> totalGrossBuilder)
             .plusTaxPortions(taxPortionsBuilder -> taxPortionsBuilder)
             .build()
 
  • Method Details

    • getTotalNet

      @NotNull @Valid @NotNull @Valid Money getTotalNet()

      Maps to TaxedPrice.totalNet.

      Returns:
      totalNet
    • getTotalGross

      @NotNull @Valid @NotNull @Valid Money getTotalGross()

      Maps to TaxedPrice.totalGross.

      Returns:
      totalGross
    • getTaxPortions

      @NotNull @Valid @NotNull @Valid List<TaxPortion> getTaxPortions()

      Maps to TaxedPrice.taxPortions.

      Returns:
      taxPortions
    • setTotalNet

      void setTotalNet(Money totalNet)

      Maps to TaxedPrice.totalNet.

      Parameters:
      totalNet - value to be set
    • setTotalGross

      void setTotalGross(Money totalGross)

      Maps to TaxedPrice.totalGross.

      Parameters:
      totalGross - value to be set
    • setTaxPortions

      void setTaxPortions(TaxPortion... taxPortions)

      Maps to TaxedPrice.taxPortions.

      Parameters:
      taxPortions - values to be set
    • setTaxPortions

      void setTaxPortions(List<TaxPortion> taxPortions)

      Maps to TaxedPrice.taxPortions.

      Parameters:
      taxPortions - values to be set
    • of

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

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

      @Nullable static TaxedPrice deepCopy(@Nullable TaxedPrice template)
      factory method to create a deep copy of TaxedPrice
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static TaxedPriceBuilder builder()
      builder factory method for TaxedPrice
      Returns:
      builder
    • builder

      static TaxedPriceBuilder builder(TaxedPrice template)
      create builder for TaxedPrice instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withTaxedPrice

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