Interface ItemShippingTarget
Determines the address (as a reference to an address in itemShippingAddresses) and the quantity shipped to the address.
If multiple shipping addresses are present for a Line Item or Custom Line Item, sub-quantities must be specified. An array of addresses and sub-quantities is stored per Line Item or Custom Line Item.
Example to create an instance using the builder pattern
ItemShippingTarget itemShippingTarget = ItemShippingTarget.builder()
.addressKey("{addressKey}")
.quantity(0.3)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ItemShippingTargetBuilderbuilder()builder factory method for ItemShippingTargetstatic ItemShippingTargetBuilderbuilder(ItemShippingTarget template) create builder for ItemShippingTarget instancecopyDeep()static ItemShippingTargetdeepCopy(ItemShippingTarget template) factory method to create a deep copy of ItemShippingTarget@NotNull StringKey of the address in the CartitemShippingAddresses.@NotNull LongQuantity 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 withMultipleShippingMode.static ItemShippingTargetof()factory methodstatic ItemShippingTargetof(ItemShippingTarget template) factory method to create a shallow copy ItemShippingTargetvoidsetAddressKey(String addressKey) Key of the address in the CartitemShippingAddresses.voidsetQuantity(Long quantity) Quantity of Line Items or Custom Line Items shipped to the address with the specifiedaddressKey.voidsetShippingMethodKey(String shippingMethodKey) User-defined unique identifier of the Shipping Method in a Cart withMultipleShippingMode.static tools.jackson.core.type.TypeReference<ItemShippingTarget>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithItemShippingTarget(Function<ItemShippingTarget, T> helper) accessor map function
-
Method Details
-
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
0when defining ItemShippingDetailsDraft, thetargetsare removed from a Line Item or Custom Line Item in the resulting ItemShippingDetails.- Returns:
- quantity
-
getShippingMethodKey
String getShippingMethodKey()User-defined unique identifier of the Shipping Method in a Cart with
MultipleShippingMode.It connects Line Item or Custom Line Item quantities with individual Shipping Methods.
Required when the Cart has
MultipleShippingMode. Omitting this field in that case returns an InvalidOperation error.- Returns:
- shippingMethodKey
-
setAddressKey
Key of the address in the Cart
itemShippingAddresses. Duplicate address keys are not allowed.- Parameters:
addressKey- value to be set
-
setQuantity
Quantity of Line Items or Custom Line Items shipped to the address with the specified
addressKey.If a quantity is updated to
0when defining ItemShippingDetailsDraft, thetargetsare removed from a Line Item or Custom Line Item in the resulting ItemShippingDetails.- Parameters:
quantity- value to be set
-
setShippingMethodKey
User-defined unique identifier of the Shipping Method in a Cart with
MultipleShippingMode.It connects Line Item or Custom Line Item quantities with individual Shipping Methods.
Required when the Cart has
MultipleShippingMode. Omitting this field in that case returns an InvalidOperation error.- Parameters:
shippingMethodKey- value to be set
-
of
factory method- Returns:
- instance of ItemShippingTarget
-
of
factory method to create a shallow copy ItemShippingTarget- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ItemShippingTarget copyDeep() -
deepCopy
factory method to create a deep copy of ItemShippingTarget- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ItemShippingTarget- Returns:
- builder
-
builder
create builder for ItemShippingTarget instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withItemShippingTarget
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-