Class DeliveryParcelDraftBuilder
java.lang.Object
com.commercetools.importapi.models.order_patches.DeliveryParcelDraftBuilder
- All Implemented Interfaces:
Builder<DeliveryParcelDraft>
DeliveryParcelDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DeliveryParcelDraft deliveryParcelDraft = DeliveryParcelDraft.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddItems
(Function<DeliveryItemBuilder, DeliveryItem> builder) add the value to the items using the builder functionbuild()
builds DeliveryParcelDraft with checking for non-null required valuesbuilds DeliveryParcelDraft without checking for non-null required valuesgetItems()
value of items}value of measurements}value of trackingData}items
(DeliveryItem... items) set values to the itemsitems
(List<DeliveryItem> items) set value to the itemsmeasurements
(ParcelMeasurements measurements) set the value to the measurementsset the value to the measurements using the builder functionstatic DeliveryParcelDraftBuilder
of()
factory method for an instance of DeliveryParcelDraftBuilderstatic DeliveryParcelDraftBuilder
of
(DeliveryParcelDraft template) create builder for DeliveryParcelDraft instanceplusItems
(DeliveryItem... items) add values to the itemsadd the value to the items using the builder functionsetItems
(Function<DeliveryItemBuilder, DeliveryItem> builder) set the value to the items using the builder functiontrackingData
(TrackingData trackingData) set the value to the trackingDataset the value to the trackingData using the builder functionset the value to the items using the builder functionset the value to the measurements using the builder functionset the value to the trackingData using the builder function
-
Constructor Details
-
DeliveryParcelDraftBuilder
public DeliveryParcelDraftBuilder()
-
-
Method Details
-
measurements
public DeliveryParcelDraftBuilder measurements(Function<ParcelMeasurementsBuilder, ParcelMeasurementsBuilder> builder) set the value to the measurements using the builder function- Parameters:
builder
- function to build the measurements value- Returns:
- Builder
-
withMeasurements
public DeliveryParcelDraftBuilder withMeasurements(Function<ParcelMeasurementsBuilder, ParcelMeasurements> builder) set the value to the measurements using the builder function- Parameters:
builder
- function to build the measurements value- Returns:
- Builder
-
measurements
set the value to the measurements- Parameters:
measurements
- value to be set- Returns:
- Builder
-
trackingData
public DeliveryParcelDraftBuilder trackingData(Function<TrackingDataBuilder, TrackingDataBuilder> builder) set the value to the trackingData using the builder function- Parameters:
builder
- function to build the trackingData value- Returns:
- Builder
-
withTrackingData
public DeliveryParcelDraftBuilder withTrackingData(Function<TrackingDataBuilder, TrackingData> builder) set the value to the trackingData using the builder function- Parameters:
builder
- function to build the trackingData value- Returns:
- Builder
-
trackingData
set the value to the trackingData- Parameters:
trackingData
- value to be set- Returns:
- Builder
-
items
set values to the items- Parameters:
items
- value to be set- Returns:
- Builder
-
items
set value to the items- Parameters:
items
- value to be set- Returns:
- Builder
-
plusItems
add values to the items- Parameters:
items
- value to be set- Returns:
- Builder
-
plusItems
public DeliveryParcelDraftBuilder plusItems(Function<DeliveryItemBuilder, DeliveryItemBuilder> builder) add the value to the items using the builder function- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
withItems
public DeliveryParcelDraftBuilder withItems(Function<DeliveryItemBuilder, DeliveryItemBuilder> builder) set the value to the items using the builder function- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
addItems
add the value to the items using the builder function- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
setItems
set the value to the items using the builder function- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
getMeasurements
value of measurements}- Returns:
- measurements
-
getTrackingData
value of trackingData}- Returns:
- trackingData
-
getItems
value of items}- Returns:
- items
-
build
builds DeliveryParcelDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<DeliveryParcelDraft>
- Returns:
- DeliveryParcelDraft
-
buildUnchecked
builds DeliveryParcelDraft without checking for non-null required values- Returns:
- DeliveryParcelDraft
-
of
factory method for an instance of DeliveryParcelDraftBuilder- Returns:
- builder
-
of
create builder for DeliveryParcelDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-