Interface DeliveryParcel
public interface DeliveryParcel
DeliveryParcel
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DeliveryParcel deliveryParcel = DeliveryParcel.builder()
.deliveryId("{deliveryId}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic DeliveryParcelBuilderbuilder()builder factory method for DeliveryParcelstatic DeliveryParcelBuilderbuilder(DeliveryParcel template) create builder for DeliveryParcel instancecopyDeep()static DeliveryParceldeepCopy(DeliveryParcel template) factory method to create a deep copy of DeliveryParcel@NotNull StringUnique identifier of the Delivery.@Valid List<DeliveryItem>getItems()Line Items or Custom Line Items delivered in this Parcel.@Valid ParcelMeasurementsInformation about the dimensions of the Parcel.@Valid TrackingDataShipment tracking information of the Parcel.static DeliveryParcelof()factory methodstatic DeliveryParcelof(DeliveryParcel template) factory method to create a shallow copy DeliveryParcelvoidsetDeliveryId(String deliveryId) Unique identifier of the Delivery.voidsetItems(DeliveryItem... items) Line Items or Custom Line Items delivered in this Parcel.voidsetItems(List<DeliveryItem> items) Line Items or Custom Line Items delivered in this Parcel.voidsetMeasurements(ParcelMeasurements measurements) Information about the dimensions of the Parcel.voidsetTrackingData(TrackingData trackingData) Shipment tracking information of the Parcel.static com.fasterxml.jackson.core.type.TypeReference<DeliveryParcel>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithDeliveryParcel(Function<DeliveryParcel, T> helper) accessor map function
-
Method Details
-
getDeliveryId
Unique identifier of the Delivery.
- Returns:
- deliveryId
-
getMeasurements
Information about the dimensions of the Parcel.
- Returns:
- measurements
-
getTrackingData
Shipment tracking information of the Parcel.
- Returns:
- trackingData
-
getItems
Line Items or Custom Line Items delivered in this Parcel.
- Returns:
- items
-
setDeliveryId
Unique identifier of the Delivery.
- Parameters:
deliveryId- value to be set
-
setMeasurements
Information about the dimensions of the Parcel.
- Parameters:
measurements- value to be set
-
setTrackingData
Shipment tracking information of the Parcel.
- Parameters:
trackingData- value to be set
-
setItems
Line Items or Custom Line Items delivered in this Parcel.
- Parameters:
items- values to be set
-
setItems
Line Items or Custom Line Items delivered in this Parcel.
- Parameters:
items- values to be set
-
of
factory method- Returns:
- instance of DeliveryParcel
-
of
factory method to create a shallow copy DeliveryParcel- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
DeliveryParcel copyDeep() -
deepCopy
factory method to create a deep copy of DeliveryParcel- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DeliveryParcel- Returns:
- builder
-
builder
create builder for DeliveryParcel instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withDeliveryParcel
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
-