Class ParcelItemsBuilder
java.lang.Object
com.commercetools.importapi.models.order_patches.ParcelItemsBuilder
- All Implemented Interfaces:
Builder<ParcelItems>
ParcelItemsBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ParcelItems parcelItems = ParcelItems.builder()
.parcelId("{parcelId}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddItems
(Function<DeliveryItemBuilder, DeliveryItem> builder) add the value to the items using the builder functionbuild()
builds ParcelItems with checking for non-null required valuesbuilds ParcelItems without checking for non-null required valuesgetItems()
value of items}value of parcelId}items
(DeliveryItem... items) set values to the itemsitems
(List<DeliveryItem> items) set value to the itemsstatic ParcelItemsBuilder
of()
factory method for an instance of ParcelItemsBuilderstatic ParcelItemsBuilder
of
(ParcelItems template) create builder for ParcelItems instanceset the value to the parcelIdplusItems
(DeliveryItem... items) add values to the itemsadd the value to the items using the builder functionsetItems
(Function<DeliveryItemBuilder, DeliveryItem> builder) set the value to the items using the builder functionset the value to the items using the builder function
-
Constructor Details
-
ParcelItemsBuilder
public ParcelItemsBuilder()
-
-
Method Details
-
parcelId
set the value to the parcelId- Parameters:
parcelId
- value to be set- Returns:
- Builder
-
items
set values to the items- Parameters:
items
- value to be set- Returns:
- Builder
-
items
set value to the items- Parameters:
items
- value to be set- Returns:
- Builder
-
plusItems
add values to the items- Parameters:
items
- value to be set- Returns:
- Builder
-
plusItems
add the value to the items using the builder function- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
withItems
set the value to the items using the builder function- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
addItems
add the value to the items using the builder function- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
setItems
set the value to the items using the builder function- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
getParcelId
value of parcelId}- Returns:
- parcelId
-
getItems
value of items}- Returns:
- items
-
build
builds ParcelItems with checking for non-null required values- Specified by:
build
in interfaceBuilder<ParcelItems>
- Returns:
- ParcelItems
-
buildUnchecked
builds ParcelItems without checking for non-null required values- Returns:
- ParcelItems
-
of
factory method for an instance of ParcelItemsBuilder- Returns:
- builder
-
of
create builder for ParcelItems instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-