Interface ParcelDraft
- All Superinterfaces:
CustomizableDraft<ParcelDraft>
,Draft<ParcelDraft>
ParcelDraft
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ParcelDraft parcelDraft = ParcelDraft.builder()
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ParcelDraftBuilder
builder()
builder factory method for ParcelDraftstatic ParcelDraftBuilder
builder
(ParcelDraft template) create builder for ParcelDraft instancestatic ParcelDraft
deepCopy
(ParcelDraft template) factory method to create a deep copy of ParcelDraft@Valid CustomFieldsDraft
Custom Fields for the Parcel.@Valid List<DeliveryItem>
getItems()
Line Items or Custom Line Items delivered in this Parcel.getKey()
User-defined unique identifier of the Parcel.@Valid ParcelMeasurements
Information about the dimensions for the Parcel.@Valid TrackingData
Shipment tracking information for the Parcel.static ParcelDraft
of()
factory methodstatic ParcelDraft
of
(ParcelDraft template) factory method to create a shallow copy ParcelDraftvoid
setCustom
(CustomFieldsDraft custom) Custom Fields for the Parcel.void
setItems
(DeliveryItem... items) Line Items or Custom Line Items delivered in this Parcel.void
setItems
(List<DeliveryItem> items) Line Items or Custom Line Items delivered in this Parcel.void
User-defined unique identifier of the Parcel.void
setMeasurements
(ParcelMeasurements measurements) Information about the dimensions for the Parcel.void
setTrackingData
(TrackingData trackingData) Shipment tracking information for the Parcel.static com.fasterxml.jackson.core.type.TypeReference<ParcelDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withParcelDraft
(Function<ParcelDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
-
Method Details
-
getKey
String getKey()User-defined unique identifier of the Parcel.
- Returns:
- key
-
getMeasurements
Information about the dimensions for the Parcel.
- Returns:
- measurements
-
getTrackingData
Shipment tracking information for the Parcel.
- Returns:
- trackingData
-
getItems
Line Items or Custom Line Items delivered in this Parcel.
- Returns:
- items
-
getCustom
Custom Fields for the Parcel.
- Specified by:
getCustom
in interfaceCustomizableDraft<ParcelDraft>
- Returns:
- custom
-
setKey
User-defined unique identifier of the Parcel.
- Parameters:
key
- value to be set
-
setMeasurements
Information about the dimensions for the Parcel.
- Parameters:
measurements
- value to be set
-
setTrackingData
Shipment tracking information for 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
-
setCustom
Custom Fields for the Parcel.
- Specified by:
setCustom
in interfaceCustomizableDraft<ParcelDraft>
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of ParcelDraft
-
of
factory method to create a shallow copy ParcelDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ParcelDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ParcelDraft- Returns:
- builder
-
builder
create builder for ParcelDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withParcelDraft
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
-