Class OrderAddParcelToDeliveryActionBuilder
java.lang.Object
com.commercetools.api.models.order.OrderAddParcelToDeliveryActionBuilder
- All Implemented Interfaces:
Builder<OrderAddParcelToDeliveryAction>
public class OrderAddParcelToDeliveryActionBuilder
extends Object
implements Builder<OrderAddParcelToDeliveryAction>
OrderAddParcelToDeliveryActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
OrderAddParcelToDeliveryAction orderAddParcelToDeliveryAction = OrderAddParcelToDeliveryAction.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddItems
(Function<DeliveryItemBuilder, DeliveryItem> builder) Value to set.build()
builds OrderAddParcelToDeliveryAction with checking for non-null required valuesbuilds OrderAddParcelToDeliveryAction without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields for the Parcel.Custom Fields for the Parcel.deliveryId
(String deliveryId) id
of an existing Delivery.deliveryKey
(String deliveryKey) key
of an existing Delivery.Custom Fields for the Parcel.id
of an existing Delivery.key
of an existing Delivery.getItems()
Value to set.Value to set.key
of an existing Parcel.Value to set.items
(DeliveryItem... items) Value to set.items
(List<DeliveryItem> items) Value to set.measurements
(ParcelMeasurements measurements) Value to set.Value to set.of()
factory method for an instance of OrderAddParcelToDeliveryActionBuilderof
(OrderAddParcelToDeliveryAction template) create builder for OrderAddParcelToDeliveryAction instancekey
of an existing Parcel.plusItems
(DeliveryItem... items) Value to set.Value to set.setItems
(Function<DeliveryItemBuilder, DeliveryItem> builder) Value to set.trackingData
(TrackingData trackingData) Value to set.Value to set.Custom Fields for the Parcel.Value to set.Value to set.Value to set.
-
Constructor Details
-
OrderAddParcelToDeliveryActionBuilder
public OrderAddParcelToDeliveryActionBuilder()
-
-
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
-
parcelKey
key
of an existing Parcel.- Parameters:
parcelKey
- value to be set- Returns:
- Builder
-
measurements
public OrderAddParcelToDeliveryActionBuilder measurements(Function<ParcelMeasurementsBuilder, ParcelMeasurementsBuilder> builder) Value to set.
- Parameters:
builder
- function to build the measurements value- Returns:
- Builder
-
withMeasurements
public OrderAddParcelToDeliveryActionBuilder withMeasurements(Function<ParcelMeasurementsBuilder, ParcelMeasurements> builder) Value to set.
- Parameters:
builder
- function to build the measurements value- Returns:
- Builder
-
measurements
public OrderAddParcelToDeliveryActionBuilder measurements(@Nullable ParcelMeasurements measurements) Value to set.
- Parameters:
measurements
- value to be set- Returns:
- Builder
-
trackingData
public OrderAddParcelToDeliveryActionBuilder trackingData(Function<TrackingDataBuilder, TrackingDataBuilder> builder) Value to set.
- Parameters:
builder
- function to build the trackingData value- Returns:
- Builder
-
withTrackingData
public OrderAddParcelToDeliveryActionBuilder withTrackingData(Function<TrackingDataBuilder, TrackingData> builder) Value to set.
- Parameters:
builder
- function to build the trackingData value- Returns:
- Builder
-
trackingData
Value to set.
- Parameters:
trackingData
- value to be set- Returns:
- Builder
-
items
Value to set.
- Parameters:
items
- value to be set- Returns:
- Builder
-
items
Value to set.
- Parameters:
items
- value to be set- Returns:
- Builder
-
plusItems
Value to set.
- Parameters:
items
- value to be set- Returns:
- Builder
-
plusItems
public OrderAddParcelToDeliveryActionBuilder plusItems(Function<DeliveryItemBuilder, DeliveryItemBuilder> builder) Value to set.
- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
withItems
public OrderAddParcelToDeliveryActionBuilder withItems(Function<DeliveryItemBuilder, DeliveryItemBuilder> builder) Value to set.
- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
addItems
public OrderAddParcelToDeliveryActionBuilder addItems(Function<DeliveryItemBuilder, DeliveryItem> builder) Value to set.
- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
setItems
public OrderAddParcelToDeliveryActionBuilder setItems(Function<DeliveryItemBuilder, DeliveryItem> builder) Value to set.
- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
custom
public OrderAddParcelToDeliveryActionBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the Parcel.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public OrderAddParcelToDeliveryActionBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the Parcel.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the Parcel.
- Parameters:
custom
- value to be set- 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
-
getParcelKey
key
of an existing Parcel.- Returns:
- parcelKey
-
getMeasurements
Value to set.
- Returns:
- measurements
-
getTrackingData
Value to set.
- Returns:
- trackingData
-
getItems
Value to set.
- Returns:
- items
-
getCustom
Custom Fields for the Parcel.
- Returns:
- custom
-
build
builds OrderAddParcelToDeliveryAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<OrderAddParcelToDeliveryAction>
- Returns:
- OrderAddParcelToDeliveryAction
-
buildUnchecked
builds OrderAddParcelToDeliveryAction without checking for non-null required values- Returns:
- OrderAddParcelToDeliveryAction
-
of
factory method for an instance of OrderAddParcelToDeliveryActionBuilder- Returns:
- builder
-
of
create builder for OrderAddParcelToDeliveryAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-