Class TaxedPriceDraftBuilder
- All Implemented Interfaces:
Builder<TaxedPriceDraft>
Example to create an instance using the builder pattern
TaxedPriceDraft taxedPriceDraft = TaxedPriceDraft.builder()
.totalNet(totalNetBuilder -> totalNetBuilder)
.totalGross(totalGrossBuilder -> totalGrossBuilder)
.plusTaxPortions(taxPortionsBuilder -> taxPortionsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionTaxable portions added to thetotalGross
.build()
builds TaxedPriceDraft with checking for non-null required valuesbuilds TaxedPriceDraft without checking for non-null required valuesTaxable portions added to thetotalGross
.Total gross price of the Cart or Order.Total net price of the Cart or Order.Total tax applicable for the Cart or Order.static TaxedPriceDraftBuilder
of()
factory method for an instance of TaxedPriceDraftBuilderstatic TaxedPriceDraftBuilder
of
(TaxedPriceDraft template) create builder for TaxedPriceDraft instanceplusTaxPortions
(TaxPortionDraft... taxPortions) Taxable portions added to thetotalGross
.Taxable portions added to thetotalGross
.Taxable portions added to thetotalGross
.taxPortions
(TaxPortionDraft... taxPortions) Taxable portions added to thetotalGross
.taxPortions
(List<TaxPortionDraft> taxPortions) Taxable portions added to thetotalGross
.totalGross
(Money totalGross) Total gross price of the Cart or Order.totalGross
(Function<MoneyBuilder, MoneyBuilder> builder) Total gross price of the Cart or Order.Total net price of the Cart or Order.totalNet
(Function<MoneyBuilder, MoneyBuilder> builder) Total net price of the Cart or Order.totalTax
(TypedMoneyDraft totalTax) Total tax applicable for the Cart or Order.totalTax
(Function<TypedMoneyDraftBuilder, Builder<? extends TypedMoneyDraft>> builder) Total tax applicable for the Cart or Order.Taxable portions added to thetotalGross
.withTotalGross
(Function<MoneyBuilder, Money> builder) Total gross price of the Cart or Order.withTotalNet
(Function<MoneyBuilder, Money> builder) Total net price of the Cart or Order.
-
Constructor Details
-
TaxedPriceDraftBuilder
public TaxedPriceDraftBuilder()
-
-
Method Details
-
totalNet
Total net price of the Cart or Order.
- Parameters:
builder
- function to build the totalNet value- Returns:
- Builder
-
withTotalNet
Total net price of the Cart or Order.
- Parameters:
builder
- function to build the totalNet value- Returns:
- Builder
-
totalNet
Total net price of the Cart or Order.
- Parameters:
totalNet
- value to be set- Returns:
- Builder
-
totalGross
Total gross price of the Cart or Order.
- Parameters:
builder
- function to build the totalGross value- Returns:
- Builder
-
withTotalGross
Total gross price of the Cart or Order.
- Parameters:
builder
- function to build the totalGross value- Returns:
- Builder
-
totalGross
Total gross price of the Cart or Order.
- Parameters:
totalGross
- value to be set- Returns:
- Builder
-
taxPortions
Taxable portions added to the
totalGross
.Calculated from the TaxRates.
- Parameters:
taxPortions
- value to be set- Returns:
- Builder
-
taxPortions
Taxable portions added to the
totalGross
.Calculated from the TaxRates.
- Parameters:
taxPortions
- value to be set- Returns:
- Builder
-
plusTaxPortions
Taxable portions added to the
totalGross
.Calculated from the TaxRates.
- Parameters:
taxPortions
- value to be set- Returns:
- Builder
-
plusTaxPortions
public TaxedPriceDraftBuilder plusTaxPortions(Function<TaxPortionDraftBuilder, TaxPortionDraftBuilder> builder) Taxable portions added to the
totalGross
.Calculated from the TaxRates.
- Parameters:
builder
- function to build the taxPortions value- Returns:
- Builder
-
withTaxPortions
public TaxedPriceDraftBuilder withTaxPortions(Function<TaxPortionDraftBuilder, TaxPortionDraftBuilder> builder) Taxable portions added to the
totalGross
.Calculated from the TaxRates.
- Parameters:
builder
- function to build the taxPortions value- Returns:
- Builder
-
addTaxPortions
public TaxedPriceDraftBuilder addTaxPortions(Function<TaxPortionDraftBuilder, TaxPortionDraft> builder) Taxable portions added to the
totalGross
.Calculated from the TaxRates.
- Parameters:
builder
- function to build the taxPortions value- Returns:
- Builder
-
setTaxPortions
public TaxedPriceDraftBuilder setTaxPortions(Function<TaxPortionDraftBuilder, TaxPortionDraft> builder) Taxable portions added to the
totalGross
.Calculated from the TaxRates.
- Parameters:
builder
- function to build the taxPortions value- Returns:
- Builder
-
totalTax
Total tax applicable for the Cart or Order.
- Parameters:
totalTax
- value to be set- Returns:
- Builder
-
totalTax
public TaxedPriceDraftBuilder totalTax(Function<TypedMoneyDraftBuilder, Builder<? extends TypedMoneyDraft>> builder) Total tax applicable for the Cart or Order.
- Parameters:
builder
- function to build the totalTax value- Returns:
- Builder
-
getTotalNet
Total net price of the Cart or Order.
- Returns:
- totalNet
-
getTotalGross
Total gross price of the Cart or Order.
- Returns:
- totalGross
-
getTaxPortions
Taxable portions added to the
totalGross
.Calculated from the TaxRates.
- Returns:
- taxPortions
-
getTotalTax
Total tax applicable for the Cart or Order.
- Returns:
- totalTax
-
build
builds TaxedPriceDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<TaxedPriceDraft>
- Returns:
- TaxedPriceDraft
-
buildUnchecked
builds TaxedPriceDraft without checking for non-null required values- Returns:
- TaxedPriceDraft
-
of
factory method for an instance of TaxedPriceDraftBuilder- Returns:
- builder
-
of
create builder for TaxedPriceDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-