Class ItemShippingTargetBuilder
- All Implemented Interfaces:
Builder<ItemShippingTarget>
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) Key of the address in the CartitemShippingAddresses
.build()
builds ItemShippingTarget with checking for non-null required valuesbuilds ItemShippingTarget without checking for non-null required valuesKey of the address in the CartitemShippingAddresses
.Quantity of Line Items or Custom Line Items shipped to the address with the specifiedaddressKey
.User-defined unique identifier of the Shipping Method in a Cart withMultiple
ShippingMode.static ItemShippingTargetBuilder
of()
factory method for an instance of ItemShippingTargetBuilderstatic ItemShippingTargetBuilder
of
(ItemShippingTarget template) create builder for ItemShippingTarget instanceQuantity of Line Items or Custom Line Items shipped to the address with the specifiedaddressKey
.shippingMethodKey
(String shippingMethodKey) User-defined unique identifier of the Shipping Method in a Cart withMultiple
ShippingMode.
-
Constructor Details
-
ItemShippingTargetBuilder
public ItemShippingTargetBuilder()
-
-
Method Details
-
addressKey
Key of the address in the Cart
itemShippingAddresses
. Duplicate address keys are not allowed.- Parameters:
addressKey
- value to be set- Returns:
- Builder
-
quantity
Quantity of Line Items or Custom Line Items shipped to the address with the specified
addressKey
.If a quantity is updated to
0
when defining ItemShippingDetailsDraft, thetargets
are removed from a Line Item or Custom Line Item in the resulting ItemShippingDetails.- Parameters:
quantity
- value to be set- Returns:
- Builder
-
shippingMethodKey
User-defined unique identifier of the Shipping Method in a Cart with
Multiple
ShippingMode.It connects Line Item or Custom Line Item quantities with individual Shipping Methods.
- Parameters:
shippingMethodKey
- value to be set- Returns:
- Builder
-
getAddressKey
Key of the address in the Cart
itemShippingAddresses
. Duplicate address keys are not allowed.- Returns:
- addressKey
-
getQuantity
Quantity of Line Items or Custom Line Items shipped to the address with the specified
addressKey
.If a quantity is updated to
0
when defining ItemShippingDetailsDraft, thetargets
are removed from a Line Item or Custom Line Item in the resulting ItemShippingDetails.- Returns:
- quantity
-
getShippingMethodKey
User-defined unique identifier of the Shipping Method in a Cart with
Multiple
ShippingMode.It connects Line Item or Custom Line Item quantities with individual Shipping Methods.
- Returns:
- shippingMethodKey
-
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
-