Class OrderSetParcelItemsActionBuilder
java.lang.Object
com.commercetools.api.models.order.OrderSetParcelItemsActionBuilder
- All Implemented Interfaces:
Builder<OrderSetParcelItemsAction>
public class OrderSetParcelItemsActionBuilder
extends Object
implements Builder<OrderSetParcelItemsAction>
OrderSetParcelItemsActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
OrderSetParcelItemsAction orderSetParcelItemsAction = OrderSetParcelItemsAction.builder()
.plusItems(itemsBuilder -> itemsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddItems
(Function<DeliveryItemBuilder, DeliveryItem> builder) Value to set.build()
builds OrderSetParcelItemsAction with checking for non-null required valuesbuilds OrderSetParcelItemsAction without checking for non-null required valuesgetItems()
Value to set.id
of an existing Parcel.key
of an existing Parcel.items
(DeliveryItem... items) Value to set.items
(List<DeliveryItem> items) Value to set.of()
factory method for an instance of OrderSetParcelItemsActionBuilderof
(OrderSetParcelItemsAction template) create builder for OrderSetParcelItemsAction instanceid
of an existing Parcel.key
of an existing Parcel.plusItems
(DeliveryItem... items) Value to set.Value to set.setItems
(Function<DeliveryItemBuilder, DeliveryItem> builder) Value to set.Value to set.
-
Constructor Details
-
OrderSetParcelItemsActionBuilder
public OrderSetParcelItemsActionBuilder()
-
-
Method Details
-
parcelId
id
of an existing Parcel.Either
parcelId
orparcelKey
must be provided.- Parameters:
parcelId
- value to be set- Returns:
- Builder
-
parcelKey
key
of an existing Parcel.Either
parcelId
orparcelKey
must be provided.- Parameters:
parcelKey
- value to be set- Returns:
- Builder
-
items
Value to set. If empty, any existing value is removed.
- Parameters:
items
- value to be set- Returns:
- Builder
-
items
Value to set. If empty, any existing value is removed.
- Parameters:
items
- value to be set- Returns:
- Builder
-
plusItems
Value to set. If empty, any existing value is removed.
- Parameters:
items
- value to be set- Returns:
- Builder
-
plusItems
public OrderSetParcelItemsActionBuilder plusItems(Function<DeliveryItemBuilder, DeliveryItemBuilder> builder) Value to set. If empty, any existing value is removed.
- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
withItems
public OrderSetParcelItemsActionBuilder withItems(Function<DeliveryItemBuilder, DeliveryItemBuilder> builder) Value to set. If empty, any existing value is removed.
- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
addItems
public OrderSetParcelItemsActionBuilder addItems(Function<DeliveryItemBuilder, DeliveryItem> builder) Value to set. If empty, any existing value is removed.
- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
setItems
public OrderSetParcelItemsActionBuilder setItems(Function<DeliveryItemBuilder, DeliveryItem> builder) Value to set. If empty, any existing value is removed.
- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
getParcelId
id
of an existing Parcel.Either
parcelId
orparcelKey
must be provided.- Returns:
- parcelId
-
getParcelKey
key
of an existing Parcel.Either
parcelId
orparcelKey
must be provided.- Returns:
- parcelKey
-
getItems
Value to set. If empty, any existing value is removed.
- Returns:
- items
-
build
builds OrderSetParcelItemsAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<OrderSetParcelItemsAction>
- Returns:
- OrderSetParcelItemsAction
-
buildUnchecked
builds OrderSetParcelItemsAction without checking for non-null required values- Returns:
- OrderSetParcelItemsAction
-
of
factory method for an instance of OrderSetParcelItemsActionBuilder- Returns:
- builder
-
of
create builder for OrderSetParcelItemsAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-