Class DiscountedLineItemPriceForQuantityBuilder
java.lang.Object
com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityBuilder
- All Implemented Interfaces:
Builder<DiscountedLineItemPriceForQuantity>
public class DiscountedLineItemPriceForQuantityBuilder
extends Object
implements Builder<DiscountedLineItemPriceForQuantity>
DiscountedLineItemPriceForQuantityBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DiscountedLineItemPriceForQuantity discountedLineItemPriceForQuantity = DiscountedLineItemPriceForQuantity.builder()
.quantity(1)
.discountedPrice(discountedPriceBuilder -> discountedPriceBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds DiscountedLineItemPriceForQuantity with checking for non-null required valuesbuilds DiscountedLineItemPriceForQuantity without checking for non-null required valuesdiscountedPrice
(DiscountedLineItemPrice discountedPrice) set the value to the discountedPriceset the value to the discountedPrice using the builder functionvalue of discountedPrice}value of quantity}of()
factory method for an instance of DiscountedLineItemPriceForQuantityBuilderof
(DiscountedLineItemPriceForQuantity template) create builder for DiscountedLineItemPriceForQuantity instanceset the value to the quantityset the value to the discountedPrice using the builder function
-
Constructor Details
-
DiscountedLineItemPriceForQuantityBuilder
public DiscountedLineItemPriceForQuantityBuilder()
-
-
Method Details
-
quantity
set the value to the quantity- Parameters:
quantity
- value to be set- Returns:
- Builder
-
discountedPrice
public DiscountedLineItemPriceForQuantityBuilder discountedPrice(Function<DiscountedLineItemPriceBuilder, DiscountedLineItemPriceBuilder> builder) set the value to the discountedPrice using the builder function- Parameters:
builder
- function to build the discountedPrice value- Returns:
- Builder
-
withDiscountedPrice
public DiscountedLineItemPriceForQuantityBuilder withDiscountedPrice(Function<DiscountedLineItemPriceBuilder, DiscountedLineItemPrice> builder) set the value to the discountedPrice using the builder function- Parameters:
builder
- function to build the discountedPrice value- Returns:
- Builder
-
discountedPrice
public DiscountedLineItemPriceForQuantityBuilder discountedPrice(DiscountedLineItemPrice discountedPrice) set the value to the discountedPrice- Parameters:
discountedPrice
- value to be set- Returns:
- Builder
-
getQuantity
value of quantity}- Returns:
- quantity
-
getDiscountedPrice
value of discountedPrice}- Returns:
- discountedPrice
-
build
builds DiscountedLineItemPriceForQuantity with checking for non-null required values- Specified by:
build
in interfaceBuilder<DiscountedLineItemPriceForQuantity>
- Returns:
- DiscountedLineItemPriceForQuantity
-
buildUnchecked
builds DiscountedLineItemPriceForQuantity without checking for non-null required values- Returns:
- DiscountedLineItemPriceForQuantity
-
of
factory method for an instance of DiscountedLineItemPriceForQuantityBuilder- Returns:
- builder
-
of
public static DiscountedLineItemPriceForQuantityBuilder of(DiscountedLineItemPriceForQuantity template) create builder for DiscountedLineItemPriceForQuantity instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-