Class StagedOrderChangeLineItemQuantityActionImpl
- All Implemented Interfaces:
StagedOrderChangeLineItemQuantityAction
,StagedOrderUpdateAction
,ResourceUpdateAction<StagedOrderUpdateAction>
,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 Order update command.
The LineItem price is updated as described in LineItem Price selection.
-
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.order_edit.StagedOrderChangeLineItemQuantityAction
CHANGE_LINE_ITEM_QUANTITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Sets the LineItemprice
to the given value when changing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.Sets the LineItemprice
andtotalPrice
to the given value when changing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.id
of the LineItem to update.key
of the LineItem to update.New value to set.int
hashCode()
void
setExternalPrice
(Money externalPrice) Sets the LineItemprice
to the given value when changing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.void
setExternalTotalPrice
(ExternalLineItemTotalPrice externalTotalPrice) Sets the LineItemprice
andtotalPrice
to the given value when changing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.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.ResourceUpdateAction
get
Methods inherited from interface com.commercetools.api.models.order_edit.StagedOrderChangeLineItemQuantityAction
withStagedOrderChangeLineItemQuantityAction
Methods inherited from interface com.commercetools.api.models.order.StagedOrderUpdateAction
withStagedOrderUpdateAction
-
Constructor Details
-
StagedOrderChangeLineItemQuantityActionImpl
public StagedOrderChangeLineItemQuantityActionImpl()create empty instance
-
-
Method Details
-
getAction
- Specified by:
getAction
in interfaceResourceUpdateAction<StagedOrderUpdateAction>
- Specified by:
getAction
in interfaceStagedOrderUpdateAction
- Returns:
- action
-
getLineItemId
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Specified by:
getLineItemId
in interfaceStagedOrderChangeLineItemQuantityAction
- Returns:
- lineItemId
-
getLineItemKey
key
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Specified by:
getLineItemKey
in interfaceStagedOrderChangeLineItemQuantityAction
- Returns:
- lineItemKey
-
getQuantity
New value to set. If
0
, the LineItem is removed from the Order.- Specified by:
getQuantity
in interfaceStagedOrderChangeLineItemQuantityAction
- Returns:
- quantity
-
getExternalPrice
Sets the LineItem
price
to the given value when changing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.The LineItem price is updated as described in LineItem Price selection.
- Specified by:
getExternalPrice
in interfaceStagedOrderChangeLineItemQuantityAction
- Returns:
- externalPrice
-
getExternalTotalPrice
Sets the LineItem
price
andtotalPrice
to the given value when changing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.- Specified by:
getExternalTotalPrice
in interfaceStagedOrderChangeLineItemQuantityAction
- Returns:
- externalTotalPrice
-
setLineItemId
Description copied from interface:StagedOrderChangeLineItemQuantityAction
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Specified by:
setLineItemId
in interfaceStagedOrderChangeLineItemQuantityAction
- Parameters:
lineItemId
- value to be set
-
setLineItemKey
Description copied from interface:StagedOrderChangeLineItemQuantityAction
key
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Specified by:
setLineItemKey
in interfaceStagedOrderChangeLineItemQuantityAction
- Parameters:
lineItemKey
- value to be set
-
setQuantity
Description copied from interface:StagedOrderChangeLineItemQuantityAction
New value to set. If
0
, the LineItem is removed from the Order.- Specified by:
setQuantity
in interfaceStagedOrderChangeLineItemQuantityAction
- Parameters:
quantity
- value to be set
-
setExternalPrice
Description copied from interface:StagedOrderChangeLineItemQuantityAction
Sets the LineItem
price
to the given value when changing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.The LineItem price is updated as described in LineItem Price selection.
- Specified by:
setExternalPrice
in interfaceStagedOrderChangeLineItemQuantityAction
- Parameters:
externalPrice
- value to be set
-
setExternalTotalPrice
Description copied from interface:StagedOrderChangeLineItemQuantityAction
Sets the LineItem
price
andtotalPrice
to the given value when changing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.- Specified by:
setExternalTotalPrice
in interfaceStagedOrderChangeLineItemQuantityAction
- Parameters:
externalTotalPrice
- value to be set
-
equals
-
hashCode
public int hashCode()
-