Class OrderSetDeliveryItemsActionBuilder
java.lang.Object
com.commercetools.api.models.order.OrderSetDeliveryItemsActionBuilder
- All Implemented Interfaces:
Builder<OrderSetDeliveryItemsAction>
public class OrderSetDeliveryItemsActionBuilder
extends Object
implements Builder<OrderSetDeliveryItemsAction>
OrderSetDeliveryItemsActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
OrderSetDeliveryItemsAction orderSetDeliveryItemsAction = OrderSetDeliveryItemsAction.builder()
.plusItems(itemsBuilder -> itemsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddItems
(Function<DeliveryItemBuilder, DeliveryItem> builder) Value to set.build()
builds OrderSetDeliveryItemsAction with checking for non-null required valuesbuilds OrderSetDeliveryItemsAction without checking for non-null required valuesdeliveryId
(String deliveryId) id
of an existing Delivery.deliveryKey
(String deliveryKey) key
of an existing Delivery.id
of an existing Delivery.key
of an existing Delivery.getItems()
Value to set.items
(DeliveryItem... items) Value to set.items
(List<DeliveryItem> items) Value to set.of()
factory method for an instance of OrderSetDeliveryItemsActionBuilderof
(OrderSetDeliveryItemsAction template) create builder for OrderSetDeliveryItemsAction instanceplusItems
(DeliveryItem... items) Value to set.Value to set.setItems
(Function<DeliveryItemBuilder, DeliveryItem> builder) Value to set.Value to set.
-
Constructor Details
-
OrderSetDeliveryItemsActionBuilder
public OrderSetDeliveryItemsActionBuilder()
-
-
Method Details
-
deliveryId
id
of an existing Delivery.Either
deliveryId
ordeliveryKey
must be provided.- Parameters:
deliveryId
- value to be set- Returns:
- Builder
-
deliveryKey
key
of an existing Delivery.Either
deliveryId
ordeliveryKey
must be provided.- Parameters:
deliveryKey
- 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 OrderSetDeliveryItemsActionBuilder 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 OrderSetDeliveryItemsActionBuilder 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 OrderSetDeliveryItemsActionBuilder 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 OrderSetDeliveryItemsActionBuilder 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
-
getDeliveryId
id
of an existing Delivery.Either
deliveryId
ordeliveryKey
must be provided.- Returns:
- deliveryId
-
getDeliveryKey
key
of an existing Delivery.Either
deliveryId
ordeliveryKey
must be provided.- Returns:
- deliveryKey
-
getItems
Value to set. If empty, any existing value is removed.
- Returns:
- items
-
build
builds OrderSetDeliveryItemsAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<OrderSetDeliveryItemsAction>
- Returns:
- OrderSetDeliveryItemsAction
-
buildUnchecked
builds OrderSetDeliveryItemsAction without checking for non-null required values- Returns:
- OrderSetDeliveryItemsAction
-
of
factory method for an instance of OrderSetDeliveryItemsActionBuilder- Returns:
- builder
-
of
create builder for OrderSetDeliveryItemsAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-