Class TrackingDataBuilder
java.lang.Object
com.commercetools.importapi.models.orders.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 valuesset the value to the carriervalue of carrier}value of isReturn}value of provider}value of providerTransaction}value of trackingId}set the value to the isReturnstatic TrackingDataBuilder
of()
factory method for an instance of TrackingDataBuilderstatic TrackingDataBuilder
of
(TrackingData template) create builder for TrackingData instanceset the value to the providerproviderTransaction
(String providerTransaction) set the value to the providerTransactiontrackingId
(String trackingId) set the value to the trackingId
-
Constructor Details
-
TrackingDataBuilder
public TrackingDataBuilder()
-
-
Method Details
-
trackingId
set the value to the trackingId- Parameters:
trackingId
- value to be set- Returns:
- Builder
-
carrier
set the value to the carrier- Parameters:
carrier
- value to be set- Returns:
- Builder
-
provider
set the value to the provider- Parameters:
provider
- value to be set- Returns:
- Builder
-
providerTransaction
set the value to the providerTransaction- Parameters:
providerTransaction
- value to be set- Returns:
- Builder
-
isReturn
set the value to the isReturn- Parameters:
isReturn
- value to be set- Returns:
- Builder
-
getTrackingId
value of trackingId}- Returns:
- trackingId
-
getCarrier
value of carrier}- Returns:
- carrier
-
getProvider
value of provider}- Returns:
- provider
-
getProviderTransaction
value of providerTransaction}- Returns:
- providerTransaction
-
getIsReturn
value of isReturn}- Returns:
- isReturn
-
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
-