Class DeliveryItemBuilder
java.lang.Object
com.commercetools.api.models.order.DeliveryItemBuilder
- All Implemented Interfaces:
Builder<DeliveryItem>
DeliveryItemBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DeliveryItem deliveryItem = DeliveryItem.builder()
.id("{id}")
.quantity(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds DeliveryItem with checking for non-null required valuesbuilds DeliveryItem without checking for non-null required valuesgetId()
id
of the LineItem or CustomLineItem delivered.Number of Line Items or Custom Line Items delivered.id
of the LineItem or CustomLineItem delivered.static DeliveryItemBuilder
of()
factory method for an instance of DeliveryItemBuilderstatic DeliveryItemBuilder
of
(DeliveryItem template) create builder for DeliveryItem instanceNumber of Line Items or Custom Line Items delivered.
-
Constructor Details
-
DeliveryItemBuilder
public DeliveryItemBuilder()
-
-
Method Details
-
id
id
of the LineItem or CustomLineItem delivered.- Parameters:
id
- value to be set- Returns:
- Builder
-
quantity
Number of Line Items or Custom Line Items delivered.
- Parameters:
quantity
- value to be set- Returns:
- Builder
-
getId
id
of the LineItem or CustomLineItem delivered.- Returns:
- id
-
getQuantity
Number of Line Items or Custom Line Items delivered.
- Returns:
- quantity
-
build
builds DeliveryItem with checking for non-null required values- Specified by:
build
in interfaceBuilder<DeliveryItem>
- Returns:
- DeliveryItem
-
buildUnchecked
builds DeliveryItem without checking for non-null required values- Returns:
- DeliveryItem
-
of
factory method for an instance of DeliveryItemBuilder- Returns:
- builder
-
of
create builder for DeliveryItem instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-