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 LineItemShippingDetails 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
Deprecated.Deprecated.id
of the LineItem to update.New value to set.int
hashCode()
void
setExternalPrice
(Money externalPrice) Deprecated.void
setExternalTotalPrice
(ExternalLineItemTotalPrice externalTotalPrice) Deprecated.void
setLineItemId
(String lineItemId) id
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
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.- Specified by:
getLineItemId
in interfaceMyCartChangeLineItemQuantityAction
- Returns:
- lineItemId
-
getQuantity
New value to set.
If
0
, the Line Item is removed from the Cart.- Specified by:
getQuantity
in interfaceMyCartChangeLineItemQuantityAction
- Returns:
- quantity
-
getExternalPrice
Deprecated. Will be ignored.
- Specified by:
getExternalPrice
in interfaceMyCartChangeLineItemQuantityAction
- Returns:
- externalPrice
-
getExternalTotalPrice
Deprecated. Will be ignored.
- Specified by:
getExternalTotalPrice
in interfaceMyCartChangeLineItemQuantityAction
- Returns:
- externalTotalPrice
-
setLineItemId
Description copied from interface:MyCartChangeLineItemQuantityAction
id
of the LineItem to update.- Specified by:
setLineItemId
in interfaceMyCartChangeLineItemQuantityAction
- Parameters:
lineItemId
- 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
-
setExternalPrice
Description copied from interface:MyCartChangeLineItemQuantityAction
Deprecated. Will be ignored.
- Specified by:
setExternalPrice
in interfaceMyCartChangeLineItemQuantityAction
- Parameters:
externalPrice
- value to be set
-
setExternalTotalPrice
Description copied from interface:MyCartChangeLineItemQuantityAction
Deprecated. Will be ignored.
- Specified by:
setExternalTotalPrice
in interfaceMyCartChangeLineItemQuantityAction
- Parameters:
externalTotalPrice
- value to be set
-
equals
-
hashCode
-