Class TrackingDataBuilder
java.lang.Object
com.commercetools.api.models.order.TrackingDataBuilder
- All Implemented Interfaces:
Builder<TrackingData>
TrackingDataBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
TrackingData trackingData = TrackingData.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds TrackingData with checking for non-null required valuesbuilds TrackingData without checking for non-null required valuesName of the carrier that delivers the Parcel.Name of the carrier that delivers the Parcel.Iftrue
, the Parcel is being returned. Iffalse
, the Parcel is being delivered to the customer.Name of the provider that serves as facade to several carriers.Transaction identifier with theprovider
.Identifier to track the Parcel.Iftrue
, the Parcel is being returned. Iffalse
, the Parcel is being delivered to the customer.static TrackingDataBuilder
of()
factory method for an instance of TrackingDataBuilderstatic TrackingDataBuilder
of
(TrackingData template) create builder for TrackingData instanceName of the provider that serves as facade to several carriers.providerTransaction
(String providerTransaction) Transaction identifier with theprovider
.trackingId
(String trackingId) Identifier to track the Parcel.
-
Constructor Details
-
TrackingDataBuilder
public TrackingDataBuilder()
-
-
Method Details
-
trackingId
Identifier to track the Parcel.
- Parameters:
trackingId
- value to be set- Returns:
- Builder
-
carrier
Name of the carrier that delivers the Parcel.
- Parameters:
carrier
- value to be set- Returns:
- Builder
-
provider
Name of the provider that serves as facade to several carriers.
- Parameters:
provider
- value to be set- Returns:
- Builder
-
providerTransaction
Transaction identifier with the
provider
.- Parameters:
providerTransaction
- value to be set- Returns:
- Builder
-
isReturn
- If
true
, the Parcel is being returned. - If
false
, the Parcel is being delivered to the customer.
- Parameters:
isReturn
- value to be set- Returns:
- Builder
- If
-
getTrackingId
Identifier to track the Parcel.
- Returns:
- trackingId
-
getCarrier
Name of the carrier that delivers the Parcel.
- Returns:
- carrier
-
getProvider
Name of the provider that serves as facade to several carriers.
- Returns:
- provider
-
getProviderTransaction
Transaction identifier with the
provider
.- Returns:
- providerTransaction
-
getIsReturn
- If
true
, the Parcel is being returned. - If
false
, the Parcel is being delivered to the customer.
- Returns:
- isReturn
- If
-
build
builds TrackingData with checking for non-null required values- Specified by:
build
in interfaceBuilder<TrackingData>
- Returns:
- TrackingData
-
buildUnchecked
builds TrackingData without checking for non-null required values- Returns:
- TrackingData
-
of
factory method for an instance of TrackingDataBuilder- Returns:
- builder
-
of
create builder for TrackingData instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-