Class CartChangeCustomLineItemQuantityActionImpl
- All Implemented Interfaces:
CartChangeCustomLineItemQuantityAction
,CartUpdateAction
,ResourceUpdateAction<CartUpdateAction>
,io.vrap.rmf.base.client.ModelBase
When multiple shipping addresses are set for a Custom Line Item, use the Add CustomLineItem update action to change the shipping details. Since it is not possible for the API to infer how the overall change in the Custom Line Item quantity should be distributed over the sub-quantities, the shippingDetails
field is kept in its current state to avoid data loss.
To change the Custom Line Item quantity and shipping details together, use this update action in combination with the Set CustomLineItem ShippingDetails update action in a single Cart update command.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Field Summary
Fields inherited from interface com.commercetools.api.models.cart.CartChangeCustomLineItemQuantityAction
CHANGE_CUSTOM_LINE_ITEM_QUANTITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
id
of the CustomLineItem to update.key
of the CustomLineItem to update.New value to set.int
hashCode()
void
setCustomLineItemId
(String customLineItemId) id
of the CustomLineItem to update.void
setCustomLineItemKey
(String customLineItemKey) key
of the CustomLineItem to update.void
setQuantity
(Long quantity) New value to set.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.cart.CartChangeCustomLineItemQuantityAction
withCartChangeCustomLineItemQuantityAction
Methods inherited from interface com.commercetools.api.models.cart.CartUpdateAction
withCartUpdateAction
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Constructor Details
-
CartChangeCustomLineItemQuantityActionImpl
public CartChangeCustomLineItemQuantityActionImpl()create empty instance
-
-
Method Details
-
getAction
- Specified by:
getAction
in interfaceCartUpdateAction
- Specified by:
getAction
in interfaceResourceUpdateAction<CartUpdateAction>
- Returns:
- action
-
getCustomLineItemId
id
of the CustomLineItem to update. EithercustomLineItemId
orcustomLineItemKey
is required.- Specified by:
getCustomLineItemId
in interfaceCartChangeCustomLineItemQuantityAction
- Returns:
- customLineItemId
-
getCustomLineItemKey
key
of the CustomLineItem to update. EithercustomLineItemId
orcustomLineItemKey
is required.- Specified by:
getCustomLineItemKey
in interfaceCartChangeCustomLineItemQuantityAction
- Returns:
- customLineItemKey
-
getQuantity
New value to set.
If
0
, the Custom Line Item is removed from the Cart.- Specified by:
getQuantity
in interfaceCartChangeCustomLineItemQuantityAction
- Returns:
- quantity
-
setCustomLineItemId
Description copied from interface:CartChangeCustomLineItemQuantityAction
id
of the CustomLineItem to update. EithercustomLineItemId
orcustomLineItemKey
is required.- Specified by:
setCustomLineItemId
in interfaceCartChangeCustomLineItemQuantityAction
- Parameters:
customLineItemId
- value to be set
-
setCustomLineItemKey
Description copied from interface:CartChangeCustomLineItemQuantityAction
key
of the CustomLineItem to update. EithercustomLineItemId
orcustomLineItemKey
is required.- Specified by:
setCustomLineItemKey
in interfaceCartChangeCustomLineItemQuantityAction
- Parameters:
customLineItemKey
- value to be set
-
setQuantity
Description copied from interface:CartChangeCustomLineItemQuantityAction
New value to set.
If
0
, the Custom Line Item is removed from the Cart.- Specified by:
setQuantity
in interfaceCartChangeCustomLineItemQuantityAction
- Parameters:
quantity
- value to be set
-
equals
-
hashCode
public int hashCode()
-