Interface Delivery
- All Superinterfaces:
Customizable<Delivery>,DeliveryMixin
Contains information on how items are shipped to Customers, for example, a delivery note.
Example to create an instance using the builder pattern
Delivery delivery = Delivery.builder()
.id("{id}")
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.plusItems(itemsBuilder -> itemsBuilder)
.plusParcels(parcelsBuilder -> parcelsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic DeliveryBuilderbuilder()builder factory method for Deliverystatic DeliveryBuildercreate builder for Delivery instancecopyDeep()static Deliveryfactory method to create a deep copy of Delivery@Valid AddressAddress to which Parcels are delivered.@NotNull ZonedDateTimeDate and time (UTC) the Delivery was created.@Valid CustomFieldsCustom Fields of the Delivery.@NotNull StringgetId()Unique identifier of the Delivery.@NotNull @Valid List<DeliveryItem>getItems()Line Items or Custom Line Items that are delivered.getKey()User-defined unique identifier of the Delivery.Information regarding the appearance, content, and shipment of a Parcel.static Deliveryof()factory methodstatic Deliveryfactory method to create a shallow copy DeliveryvoidsetAddress(Address address) Address to which Parcels are delivered.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the Delivery was created.voidsetCustom(CustomFields custom) Custom Fields of the Delivery.voidUnique identifier of the Delivery.voidsetItems(DeliveryItem... items) Line Items or Custom Line Items that are delivered.voidsetItems(List<DeliveryItem> items) Line Items or Custom Line Items that are delivered.voidUser-defined unique identifier of the Delivery.voidsetParcels(Parcel... parcels) Information regarding the appearance, content, and shipment of a Parcel.voidsetParcels(List<Parcel> parcels) Information regarding the appearance, content, and shipment of a Parcel.static com.fasterxml.jackson.core.type.TypeReference<Delivery>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithDelivery(Function<Delivery, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizableMethods inherited from interface com.commercetools.api.models.order.DeliveryMixin
toDraft, toDraftBuilder
-
Method Details
-
getId
Unique identifier of the Delivery.
- Returns:
- id
-
getKey
String getKey()User-defined unique identifier of the Delivery.
- Returns:
- key
-
getCreatedAt
Date and time (UTC) the Delivery was created.
- Returns:
- createdAt
-
getItems
Line Items or Custom Line Items that are delivered.
- Specified by:
getItemsin interfaceDeliveryMixin- Returns:
- items
-
getParcels
Information regarding the appearance, content, and shipment of a Parcel.
- Specified by:
getParcelsin interfaceDeliveryMixin- Returns:
- parcels
-
getAddress
Address to which Parcels are delivered.
- Specified by:
getAddressin interfaceDeliveryMixin- Returns:
- address
-
getCustom
Custom Fields of the Delivery.
- Specified by:
getCustomin interfaceCustomizable<Delivery>- Specified by:
getCustomin interfaceDeliveryMixin- Returns:
- custom
-
setId
Unique identifier of the Delivery.
- Parameters:
id- value to be set
-
setKey
User-defined unique identifier of the Delivery.
- Parameters:
key- value to be set
-
setCreatedAt
Date and time (UTC) the Delivery was created.
- Parameters:
createdAt- value to be set
-
setItems
Line Items or Custom Line Items that are delivered.
- Parameters:
items- values to be set
-
setItems
Line Items or Custom Line Items that are delivered.
- 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 Parcels are delivered.
- Parameters:
address- value to be set
-
setCustom
Custom Fields of the Delivery.
- Specified by:
setCustomin interfaceCustomizable<Delivery>- Parameters:
custom- value to be set
-
of
factory method- Returns:
- instance of Delivery
-
of
factory method to create a shallow copy Delivery- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
Delivery copyDeep() -
deepCopy
factory method to create a deep copy of Delivery- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Delivery- Returns:
- builder
-
builder
create builder for Delivery instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withDelivery
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
-