Class StagedStandalonePriceBuilder
java.lang.Object
com.commercetools.api.models.standalone_price.StagedStandalonePriceBuilder
- All Implemented Interfaces:
Builder<StagedStandalonePrice>
StagedStandalonePriceBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
StagedStandalonePrice stagedStandalonePrice = StagedStandalonePrice.builder()
.value(valueBuilder -> valueBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds StagedStandalonePrice with checking for non-null required valuesbuilds StagedStandalonePrice without checking for non-null required valuesdiscounted
(DiscountedPrice discounted) Discounted price for the StagedStandalonePrice.Discounted price for the StagedStandalonePrice.Discounted price for the StagedStandalonePrice.getValue()
Money value of the StagedStandalonePrice.static StagedStandalonePriceBuilder
of()
factory method for an instance of StagedStandalonePriceBuilderstatic StagedStandalonePriceBuilder
of
(StagedStandalonePrice template) create builder for StagedStandalonePrice instancevalue
(TypedMoney value) Money value of the StagedStandalonePrice.value
(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Money value of the StagedStandalonePrice.Discounted price for the StagedStandalonePrice.
-
Constructor Details
-
StagedStandalonePriceBuilder
public StagedStandalonePriceBuilder()
-
-
Method Details
-
value
Money value of the StagedStandalonePrice.
- Parameters:
value
- value to be set- Returns:
- Builder
-
value
public StagedStandalonePriceBuilder value(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Money value of the StagedStandalonePrice.
- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
discounted
public StagedStandalonePriceBuilder discounted(Function<DiscountedPriceBuilder, DiscountedPriceBuilder> builder) Discounted price for the StagedStandalonePrice.
- Parameters:
builder
- function to build the discounted value- Returns:
- Builder
-
withDiscounted
public StagedStandalonePriceBuilder withDiscounted(Function<DiscountedPriceBuilder, DiscountedPrice> builder) Discounted price for the StagedStandalonePrice.
- Parameters:
builder
- function to build the discounted value- Returns:
- Builder
-
discounted
Discounted price for the StagedStandalonePrice.
- Parameters:
discounted
- value to be set- Returns:
- Builder
-
getValue
Money value of the StagedStandalonePrice.
- Returns:
- value
-
getDiscounted
Discounted price for the StagedStandalonePrice.
- Returns:
- discounted
-
build
builds StagedStandalonePrice with checking for non-null required values- Specified by:
build
in interfaceBuilder<StagedStandalonePrice>
- Returns:
- StagedStandalonePrice
-
buildUnchecked
builds StagedStandalonePrice without checking for non-null required values- Returns:
- StagedStandalonePrice
-
of
factory method for an instance of StagedStandalonePriceBuilder- Returns:
- builder
-
of
create builder for StagedStandalonePrice instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-