Class OrderExcerptBuilder
java.lang.Object
com.commercetools.api.models.order_edit.OrderExcerptBuilder
- All Implemented Interfaces:
Builder<OrderExcerpt>
OrderExcerptBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
OrderExcerpt orderExcerpt = OrderExcerpt.builder()
.totalPrice(totalPriceBuilder -> totalPriceBuilder)
.version(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds OrderExcerpt with checking for non-null required valuesbuilds OrderExcerpt without checking for non-null required valuesTaxed price of the Order.Total price of the Order.Current version of the Order.static OrderExcerptBuilder
of()
factory method for an instance of OrderExcerptBuilderstatic OrderExcerptBuilder
of
(OrderExcerpt template) create builder for OrderExcerpt instancetaxedPrice
(TaxedPrice taxedPrice) Taxed price of the Order.taxedPrice
(Function<TaxedPriceBuilder, TaxedPriceBuilder> builder) Taxed price of the Order.totalPrice
(TypedMoney totalPrice) Total price of the Order.totalPrice
(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Total price of the Order.Current version of the Order.withTaxedPrice
(Function<TaxedPriceBuilder, TaxedPrice> builder) Taxed price of the Order.
-
Constructor Details
-
OrderExcerptBuilder
public OrderExcerptBuilder()
-
-
Method Details
-
totalPrice
Total price of the Order.
- Parameters:
totalPrice
- value to be set- Returns:
- Builder
-
totalPrice
public OrderExcerptBuilder totalPrice(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Total price of the Order.
- Parameters:
builder
- function to build the totalPrice value- Returns:
- Builder
-
taxedPrice
Taxed price of the Order.
- Parameters:
builder
- function to build the taxedPrice value- Returns:
- Builder
-
withTaxedPrice
Taxed price of the Order.
- Parameters:
builder
- function to build the taxedPrice value- Returns:
- Builder
-
taxedPrice
Taxed price of the Order.
- Parameters:
taxedPrice
- value to be set- Returns:
- Builder
-
version
Current version of the Order.
- Parameters:
version
- value to be set- Returns:
- Builder
-
getTotalPrice
Total price of the Order.
- Returns:
- totalPrice
-
getTaxedPrice
Taxed price of the Order.
- Returns:
- taxedPrice
-
getVersion
Current version of the Order.
- Returns:
- version
-
build
builds OrderExcerpt with checking for non-null required values- Specified by:
build
in interfaceBuilder<OrderExcerpt>
- Returns:
- OrderExcerpt
-
buildUnchecked
builds OrderExcerpt without checking for non-null required values- Returns:
- OrderExcerpt
-
of
factory method for an instance of OrderExcerptBuilder- Returns:
- builder
-
of
create builder for OrderExcerpt instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-