Interface Delivery
public interface Delivery
Delivery
Example to create an instance using the builder pattern
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 instancecopyDeep()
static 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.@NotNull String
getId()
Unique identifier of the Delivery.@NotNull @Valid List<DeliveryItem>
getItems()
Line Items or Custom Line Items that are delivered.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
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
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 function
-
Method Details
-
getId
Unique identifier of the Delivery.
- Returns:
- id
-
getCreatedAt
Date and time (UTC) the Delivery was created.
- Returns:
- createdAt
-
getItems
Line Items or Custom Line Items that are delivered.
- Returns:
- items
-
getParcels
Information regarding the appearance, content, and shipment of a Parcel.
- Returns:
- parcels
-
getAddress
Address to which Parcels are delivered.
- Returns:
- address
-
setId
Unique identifier of the Delivery.
- Parameters:
id
- 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
-
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
-