Interface OrderAddDeliveryAction
- All Superinterfaces:
CustomizableDraft<OrderAddDeliveryAction>
,OrderUpdateAction
,ResourceUpdateAction<OrderUpdateAction>
A Delivery can only be added to an Order if its shippingInfo
(for shippingMode
= Single
), or its shipping
(for shippingMode
= Multiple
) exists.
Produces the Delivery Added Message.
Example to create an instance using the builder pattern
OrderAddDeliveryAction orderAddDeliveryAction = OrderAddDeliveryAction.builder()
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for OrderAddDeliveryAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for OrderAddDeliveryActionbuilder
(OrderAddDeliveryAction template) create builder for OrderAddDeliveryAction instancestatic OrderAddDeliveryAction
deepCopy
(OrderAddDeliveryAction template) factory method to create a deep copy of OrderAddDeliveryAction@Valid BaseAddress
Address theparcels
should be delivered to.@Valid CustomFieldsDraft
Custom Fields for the Delivery.key
of an existing Delivery.@Valid List<DeliveryItem>
getItems()
Line Items or Custom Line Items to be included in the Delivery.@Valid List<ParcelDraft>
Parcels of the Delivery.key
of the ShippingMethod, required forMultiple
ShippingMode.static OrderAddDeliveryAction
of()
factory methodstatic OrderAddDeliveryAction
of
(OrderAddDeliveryAction template) factory method to create a shallow copy OrderAddDeliveryActionvoid
setAddress
(BaseAddress address) Address theparcels
should be delivered to.void
setCustom
(CustomFieldsDraft custom) Custom Fields for the Delivery.void
setDeliveryKey
(String deliveryKey) key
of an existing Delivery.void
setItems
(DeliveryItem... items) Line Items or Custom Line Items to be included in the Delivery.void
setItems
(List<DeliveryItem> items) Line Items or Custom Line Items to be included in the Delivery.void
setParcels
(ParcelDraft... parcels) Parcels of the Delivery.void
setParcels
(List<ParcelDraft> parcels) Parcels of the Delivery.void
setShippingKey
(String shippingKey) key
of the ShippingMethod, required forMultiple
ShippingMode.static com.fasterxml.jackson.core.type.TypeReference<OrderAddDeliveryAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
Methods inherited from interface com.commercetools.api.models.order.OrderUpdateAction
getAction, withOrderUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
ADD_DELIVERY
discriminator value for OrderAddDeliveryAction- See Also:
-
-
Method Details
-
getDeliveryKey
String getDeliveryKey()key
of an existing Delivery.- Returns:
- deliveryKey
-
getShippingKey
String getShippingKey()key
of the ShippingMethod, required forMultiple
ShippingMode.- Returns:
- shippingKey
-
getItems
Line Items or Custom Line Items to be included in the Delivery.
- Returns:
- items
-
getAddress
Address the
parcels
should be delivered to.- Returns:
- address
-
getParcels
Parcels of the Delivery.
If provided, this update action produces the Parcel Added To Delivery Message.
- Returns:
- parcels
-
getCustom
Custom Fields for the Delivery.
- Specified by:
getCustom
in interfaceCustomizableDraft<OrderAddDeliveryAction>
- Returns:
- custom
-
setDeliveryKey
key
of an existing Delivery.- Parameters:
deliveryKey
- value to be set
-
setShippingKey
key
of the ShippingMethod, required forMultiple
ShippingMode.- Parameters:
shippingKey
- value to be set
-
setItems
Line Items or Custom Line Items to be included in the Delivery.
- Parameters:
items
- values to be set
-
setItems
Line Items or Custom Line Items to be included in the Delivery.
- Parameters:
items
- values to be set
-
setAddress
Address the
parcels
should be delivered to.- Parameters:
address
- value to be set
-
setParcels
Parcels of the Delivery.
If provided, this update action produces the Parcel Added To Delivery Message.
- Parameters:
parcels
- values to be set
-
setParcels
Parcels of the Delivery.
If provided, this update action produces the Parcel Added To Delivery Message.
- Parameters:
parcels
- values to be set
-
setCustom
Custom Fields for the Delivery.
- Specified by:
setCustom
in interfaceCustomizableDraft<OrderAddDeliveryAction>
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of OrderAddDeliveryAction
-
of
factory method to create a shallow copy OrderAddDeliveryAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of OrderAddDeliveryAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for OrderAddDeliveryAction- Returns:
- builder
-
builder
create builder for OrderAddDeliveryAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withOrderAddDeliveryAction
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-