Class ItemShippingTargetImpl
- All Implemented Interfaces:
ItemShippingTarget
,io.vrap.rmf.base.client.ModelBase
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Key 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.int
hashCode()
void
setAddressKey
(String addressKey) Key of the address in the CartitemShippingAddresses
.void
setQuantity
(Long quantity) Quantity of Line Items or Custom Line Items shipped to the address with the specifiedaddressKey
.void
setShippingMethodKey
(String shippingMethodKey) User-defined unique identifier of the Shipping Method in a Cart withMultiple
ShippingMode.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.cart.ItemShippingTarget
withItemShippingTarget
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
-
Constructor Details
-
ItemShippingTargetImpl
public ItemShippingTargetImpl()create empty instance
-
-
Method Details
-
getAddressKey
Key of the address in the Cart
itemShippingAddresses
. Duplicate address keys are not allowed.- Specified by:
getAddressKey
in interfaceItemShippingTarget
- 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.- Specified by:
getQuantity
in interfaceItemShippingTarget
- Returns:
- quantity
-
getShippingMethodKey
User-defined unique identifier of the Shipping Method in a Cart with
Multiple
ShippingMode.It connects Line Item quantities with individual shipping addresses.
- Specified by:
getShippingMethodKey
in interfaceItemShippingTarget
- Returns:
- shippingMethodKey
-
setAddressKey
Description copied from interface:ItemShippingTarget
Key of the address in the Cart
itemShippingAddresses
. Duplicate address keys are not allowed.- Specified by:
setAddressKey
in interfaceItemShippingTarget
- Parameters:
addressKey
- value to be set
-
setQuantity
Description copied from interface:ItemShippingTarget
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.- Specified by:
setQuantity
in interfaceItemShippingTarget
- Parameters:
quantity
- value to be set
-
setShippingMethodKey
Description copied from interface:ItemShippingTarget
User-defined unique identifier of the Shipping Method in a Cart with
Multiple
ShippingMode.It connects Line Item quantities with individual shipping addresses.
- Specified by:
setShippingMethodKey
in interfaceItemShippingTarget
- Parameters:
shippingMethodKey
- value to be set
-
equals
-
hashCode
-