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 ParcelDraftBuilderbuilder()builder factory method for ParcelDraftstatic ParcelDraftBuilderbuilder(ParcelDraft template) create builder for ParcelDraft instancecopyDeep()static ParcelDraftdeepCopy(ParcelDraft template) factory method to create a deep copy of ParcelDraft@Valid CustomFieldsDraftCustom 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 ParcelMeasurementsInformation about the dimensions for the Parcel.@Valid TrackingDataShipment tracking information for the Parcel.static ParcelDraftof()factory methodstatic ParcelDraftof(ParcelDraft template) factory method to create a shallow copy ParcelDraftvoidsetCustom(CustomFieldsDraft custom) Custom Fields for the Parcel.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.voidUser-defined unique identifier of the Parcel.voidsetMeasurements(ParcelMeasurements measurements) Information about the dimensions for the Parcel.voidsetTrackingData(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> TwithParcelDraft(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:
getCustomin 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:
setCustomin 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
-
copyDeep
ParcelDraft copyDeep() -
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
-