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 DeliveryBuilder
builder()
builder factory method for Deliverystatic DeliveryBuilder
create builder for Delivery instancestatic Delivery
factory method to create a deep copy of Delivery@Valid Address
Address to which Parcels are delivered.@NotNull ZonedDateTime
Date and time (UTC) the Delivery was created.@Valid CustomFields
Custom Fields of the Delivery.@NotNull String
getId()
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 Delivery
of()
factory methodstatic Delivery
factory method to create a shallow copy Deliveryvoid
setAddress
(Address address) Address to which Parcels are delivered.void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Delivery was created.void
setCustom
(CustomFields custom) Custom Fields of the Delivery.void
Unique identifier of the Delivery.void
setItems
(DeliveryItem... items) Line Items or Custom Line Items that are delivered.void
setItems
(List<DeliveryItem> items) Line Items or Custom Line Items that are delivered.void
User-defined unique identifier of the Delivery.void
setParcels
(Parcel... parcels) Information regarding the appearance, content, and shipment of a Parcel.void
setParcels
(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> T
withDelivery
(Function<Delivery, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
Methods 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:
getItems
in interfaceDeliveryMixin
- Returns:
- items
-
getParcels
Information regarding the appearance, content, and shipment of a Parcel.
- Specified by:
getParcels
in interfaceDeliveryMixin
- Returns:
- parcels
-
getAddress
Address to which Parcels are delivered.
- Specified by:
getAddress
in interfaceDeliveryMixin
- Returns:
- address
-
getCustom
Custom Fields of the Delivery.
- Specified by:
getCustom
in interfaceCustomizable<Delivery>
- Specified by:
getCustom
in 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:
setCustom
in 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
-
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
-