Class ItemShippingTargetBuilder
java.lang.Object
com.commercetools.importapi.models.orders.ItemShippingTargetBuilder
- All Implemented Interfaces:
Builder<ItemShippingTarget>
ItemShippingTargetBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ItemShippingTarget itemShippingTarget = ItemShippingTarget.builder()
.addressKey("{addressKey}")
.quantity(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddressKey
(String addressKey) Maps toItemShippingTarget.addressKey
.build()
builds ItemShippingTarget with checking for non-null required valuesbuilds ItemShippingTarget without checking for non-null required valuesMaps toItemShippingTarget.addressKey
.Maps toItemShippingTarget.quantity
.static ItemShippingTargetBuilder
of()
factory method for an instance of ItemShippingTargetBuilderstatic ItemShippingTargetBuilder
of
(ItemShippingTarget template) create builder for ItemShippingTarget instanceMaps toItemShippingTarget.quantity
.
-
Constructor Details
-
ItemShippingTargetBuilder
public ItemShippingTargetBuilder()
-
-
Method Details
-
addressKey
Maps to
ItemShippingTarget.addressKey
.- Parameters:
addressKey
- value to be set- Returns:
- Builder
-
quantity
Maps to
ItemShippingTarget.quantity
.- Parameters:
quantity
- value to be set- Returns:
- Builder
-
getAddressKey
Maps to
ItemShippingTarget.addressKey
.- Returns:
- addressKey
-
getQuantity
Maps to
ItemShippingTarget.quantity
.- Returns:
- quantity
-
build
builds ItemShippingTarget with checking for non-null required values- Specified by:
build
in interfaceBuilder<ItemShippingTarget>
- Returns:
- ItemShippingTarget
-
buildUnchecked
builds ItemShippingTarget without checking for non-null required values- Returns:
- ItemShippingTarget
-
of
factory method for an instance of ItemShippingTargetBuilder- Returns:
- builder
-
of
create builder for ItemShippingTarget instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-