Interface DeliveryDraft
- All Superinterfaces:
CustomizableDraft<DeliveryDraft>
,Draft<DeliveryDraft>
Example to create an instance using the builder pattern
DeliveryDraft deliveryDraft = DeliveryDraft.builder()
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic DeliveryDraftBuilder
builder()
builder factory method for DeliveryDraftstatic DeliveryDraftBuilder
builder
(DeliveryDraft template) create builder for DeliveryDraft instancestatic DeliveryDraft
deepCopy
(DeliveryDraft template) factory method to create a deep copy of DeliveryDraft@Valid AddressDraft
Address to which the Parcels are delivered.@Valid CustomFieldsDraft
Custom Fields for the Delivery.@Valid List<DeliveryItem>
getItems()
Line Items or Custom Line Items to deliver.getKey()
User-defined unique identifier of the Delivery.@Valid List<ParcelDraft>
Information regarding the appearance, content, and shipment of a parcel.static DeliveryDraft
of()
factory methodstatic DeliveryDraft
of
(DeliveryDraft template) factory method to create a shallow copy DeliveryDraftvoid
setAddress
(AddressDraft address) Address to which the Parcels are delivered.void
setCustom
(CustomFieldsDraft custom) Custom Fields for the Delivery.void
setItems
(DeliveryItem... items) Line Items or Custom Line Items to deliver.void
setItems
(List<DeliveryItem> items) Line Items or Custom Line Items to deliver.void
User-defined unique identifier of the Delivery.void
setParcels
(ParcelDraft... parcels) Information regarding the appearance, content, and shipment of a parcel.void
setParcels
(List<ParcelDraft> parcels) Information regarding the appearance, content, and shipment of a parcel.static com.fasterxml.jackson.core.type.TypeReference<DeliveryDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withDeliveryDraft
(Function<DeliveryDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
-
Method Details
-
getKey
String getKey()User-defined unique identifier of the Delivery.
- Returns:
- key
-
getItems
Line Items or Custom Line Items to deliver. It can also be specified individually for each Parcel.
- Returns:
- items
-
getParcels
Information regarding the appearance, content, and shipment of a parcel.
- Returns:
- parcels
-
getAddress
Address to which the Parcels are delivered.
- Returns:
- address
-
getCustom
Custom Fields for the Delivery.
- Specified by:
getCustom
in interfaceCustomizableDraft<DeliveryDraft>
- Returns:
- custom
-
setKey
User-defined unique identifier of the Delivery.
- Parameters:
key
- value to be set
-
setItems
Line Items or Custom Line Items to deliver. It can also be specified individually for each Parcel.
- Parameters:
items
- values to be set
-
setItems
Line Items or Custom Line Items to deliver. It can also be specified individually for each Parcel.
- Parameters:
items
- values to be set
-
setParcels
Information regarding the appearance, content, and shipment of a parcel.
- Parameters:
parcels
- values to be set
-
setParcels
Information regarding the appearance, content, and shipment of a parcel.
- Parameters:
parcels
- values to be set
-
setAddress
Address to which the Parcels are delivered.
- Parameters:
address
- value to be set
-
setCustom
Custom Fields for the Delivery.
- Specified by:
setCustom
in interfaceCustomizableDraft<DeliveryDraft>
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of DeliveryDraft
-
of
factory method to create a shallow copy DeliveryDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of DeliveryDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DeliveryDraft- Returns:
- builder
-
builder
create builder for DeliveryDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDeliveryDraft
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
-