Interface TaxedPriceDraft

All Superinterfaces:
Draft<TaxedPriceDraft>

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

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

    • getTotalNet

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

      Total net price of the Cart or Order.

      Returns:
      totalNet
    • getTotalGross

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

      Total gross price of the Cart or Order.

      Returns:
      totalGross
    • getTaxPortions

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

      Taxable portions added to the totalGross.

      Calculated from the TaxRates.

      Returns:
      taxPortions
    • getTotalTax

      @Valid @Valid TypedMoneyDraft getTotalTax()

      Total tax applicable for the Cart or Order.

      Returns:
      totalTax
    • setTotalNet

      void setTotalNet(Money totalNet)

      Total net price of the Cart or Order.

      Parameters:
      totalNet - value to be set
    • setTotalGross

      void setTotalGross(Money totalGross)

      Total gross price of the Cart or Order.

      Parameters:
      totalGross - value to be set
    • setTaxPortions

      void setTaxPortions(TaxPortionDraft... taxPortions)

      Taxable portions added to the totalGross.

      Calculated from the TaxRates.

      Parameters:
      taxPortions - values to be set
    • setTaxPortions

      void setTaxPortions(List<TaxPortionDraft> taxPortions)

      Taxable portions added to the totalGross.

      Calculated from the TaxRates.

      Parameters:
      taxPortions - values to be set
    • setTotalTax

      void setTotalTax(TypedMoneyDraft totalTax)

      Total tax applicable for the Cart or Order.

      Parameters:
      totalTax - value to be set
    • of

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

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

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

      static TaxedPriceDraftBuilder builder()
      builder factory method for TaxedPriceDraft
      Returns:
      builder
    • builder

      static TaxedPriceDraftBuilder builder(TaxedPriceDraft template)
      create builder for TaxedPriceDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withTaxedPriceDraft

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