Class ExternalLineItemTotalPriceBuilder
java.lang.Object
com.commercetools.api.models.cart.ExternalLineItemTotalPriceBuilder
- All Implemented Interfaces:
Builder<ExternalLineItemTotalPrice>
public class ExternalLineItemTotalPriceBuilder
extends Object
implements Builder<ExternalLineItemTotalPrice>
ExternalLineItemTotalPriceBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ExternalLineItemTotalPrice externalLineItemTotalPrice = ExternalLineItemTotalPrice.builder()
.price(priceBuilder -> priceBuilder)
.totalPrice(totalPriceBuilder -> totalPriceBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ExternalLineItemTotalPrice with checking for non-null required valuesbuilds ExternalLineItemTotalPrice without checking for non-null required valuesgetPrice()
Price of the Line Item.Total price of the Line Item.of()
factory method for an instance of ExternalLineItemTotalPriceBuilderof
(ExternalLineItemTotalPrice template) create builder for ExternalLineItemTotalPrice instancePrice of the Line Item.price
(Function<MoneyBuilder, MoneyBuilder> builder) Price of the Line Item.totalPrice
(Money totalPrice) Total price of the Line Item.totalPrice
(Function<MoneyBuilder, MoneyBuilder> builder) Total price of the Line Item.withPrice
(Function<MoneyBuilder, Money> builder) Price of the Line Item.withTotalPrice
(Function<MoneyBuilder, Money> builder) Total price of the Line Item.
-
Constructor Details
-
ExternalLineItemTotalPriceBuilder
public ExternalLineItemTotalPriceBuilder()
-
-
Method Details
-
price
Price of the Line Item.
- Parameters:
builder
- function to build the price value- Returns:
- Builder
-
withPrice
Price of the Line Item.
- Parameters:
builder
- function to build the price value- Returns:
- Builder
-
price
Price of the Line Item.
- Parameters:
price
- value to be set- Returns:
- Builder
-
totalPrice
Total price of the Line Item.
- Parameters:
builder
- function to build the totalPrice value- Returns:
- Builder
-
withTotalPrice
Total price of the Line Item.
- Parameters:
builder
- function to build the totalPrice value- Returns:
- Builder
-
totalPrice
Total price of the Line Item.
- Parameters:
totalPrice
- value to be set- Returns:
- Builder
-
getPrice
Price of the Line Item.
- Returns:
- price
-
getTotalPrice
Total price of the Line Item.
- Returns:
- totalPrice
-
build
builds ExternalLineItemTotalPrice with checking for non-null required values- Specified by:
build
in interfaceBuilder<ExternalLineItemTotalPrice>
- Returns:
- ExternalLineItemTotalPrice
-
buildUnchecked
builds ExternalLineItemTotalPrice without checking for non-null required values- Returns:
- ExternalLineItemTotalPrice
-
of
factory method for an instance of ExternalLineItemTotalPriceBuilder- Returns:
- builder
-
of
create builder for ExternalLineItemTotalPrice instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-