Class MyCartChangeLineItemQuantityActionImpl
- All Implemented Interfaces:
MyCartChangeLineItemQuantityAction
,MyCartUpdateAction
,ResourceUpdateAction<MyCartUpdateAction>
,io.vrap.rmf.base.client.ModelBase
When multiple shipping addresses are set for a Line Item, use the Remove LineItem and Add LineItem update action to change the shipping details. Since it is not possible for the API to infer how the overall change in the 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 Line Item quantity and shipping details together, use this update action in combination with the Set LineItem ShippingDetails update action in a single Cart update command.
When the action applies to LineItems with ExternalTotal
LineItemPriceMode, it will be changed to ExternalPrice
and the existing externalPrice
value, i.e. LineItem.price
, will be retained. The LineItem total will be calculated by the system instead, so that the externalTotalPrice
will be dropped.
-
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.me.MyCartChangeLineItemQuantityAction
CHANGE_LINE_ITEM_QUANTITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
id
of the LineItem to update.key
of the LineItem to update.New value to set.int
hashCode()
void
setLineItemId
(String lineItemId) id
of the LineItem to update.void
setLineItemKey
(String lineItemKey) key
of the LineItem 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 io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.me.MyCartChangeLineItemQuantityAction
withMyCartChangeLineItemQuantityAction
Methods inherited from interface com.commercetools.api.models.me.MyCartUpdateAction
withMyCartUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Constructor Details
-
MyCartChangeLineItemQuantityActionImpl
public MyCartChangeLineItemQuantityActionImpl()create empty instance
-
-
Method Details
-
getAction
- Specified by:
getAction
in interfaceMyCartUpdateAction
- Specified by:
getAction
in interfaceResourceUpdateAction<MyCartUpdateAction>
- Returns:
- action
-
getLineItemId
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Specified by:
getLineItemId
in interfaceMyCartChangeLineItemQuantityAction
- Returns:
- lineItemId
-
getLineItemKey
key
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Specified by:
getLineItemKey
in interfaceMyCartChangeLineItemQuantityAction
- Returns:
- lineItemKey
-
getQuantity
New value to set.
If
0
, the Line Item is removed from the Cart.- Specified by:
getQuantity
in interfaceMyCartChangeLineItemQuantityAction
- Returns:
- quantity
-
setLineItemId
Description copied from interface:MyCartChangeLineItemQuantityAction
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Specified by:
setLineItemId
in interfaceMyCartChangeLineItemQuantityAction
- Parameters:
lineItemId
- value to be set
-
setLineItemKey
Description copied from interface:MyCartChangeLineItemQuantityAction
key
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Specified by:
setLineItemKey
in interfaceMyCartChangeLineItemQuantityAction
- Parameters:
lineItemKey
- value to be set
-
setQuantity
Description copied from interface:MyCartChangeLineItemQuantityAction
New value to set.
If
0
, the Line Item is removed from the Cart.- Specified by:
setQuantity
in interfaceMyCartChangeLineItemQuantityAction
- Parameters:
quantity
- value to be set
-
equals
-
hashCode
public int hashCode()
-