Interface DeliveryDraft
- All Superinterfaces:
Draft<DeliveryDraft>
DeliveryDraft
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DeliveryDraft deliveryDraft = DeliveryDraft.builder()
.plusItems(itemsBuilder -> itemsBuilder)
.plusParcels(parcelsBuilder -> parcelsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic DeliveryDraftBuilder
builder()
builder factory method for DeliveryDraftstatic DeliveryDraftBuilder
builder
(DeliveryDraft template) create builder for DeliveryDraft instancecopyDeep()
static DeliveryDraft
deepCopy
(DeliveryDraft template) factory method to create a deep copy of DeliveryDraft@Valid Address
Address to which the Parcels are delivered.@NotNull @Valid List<DeliveryItem>
getItems()
Line Items or Custom Line Items to deliver.@NotNull @Valid List<DeliveryParcelDraft>
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
(Address address) Address to which the Parcels are delivered.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
setParcels
(DeliveryParcelDraft... parcels) Information regarding the appearance, content, and shipment of a parcel.void
setParcels
(List<DeliveryParcelDraft> 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 function
-
Method Details
-
getItems
Line Items or Custom Line Items to deliver. It can also be specified individually for each Parcel.
- Returns:
- items
-
getAddress
Address to which the Parcels are delivered.
- Returns:
- address
-
getParcels
Information regarding the appearance, content, and shipment of a parcel.
- Returns:
- parcels
-
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
-
setAddress
Address to which the Parcels are delivered.
- Parameters:
address
- value 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
-
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
-
copyDeep
DeliveryDraft copyDeep() -
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
-