Interface MyCartRemoveLineItemAction
- All Superinterfaces:
MyCartUpdateAction
,ResourceUpdateAction<MyCartUpdateAction>
- All Known Implementing Classes:
MyCartRemoveLineItemActionImpl
The LineItem price is updated as described in LineItem Price selection.
Example to create an instance using the builder pattern
MyCartRemoveLineItemAction myCartRemoveLineItemAction = MyCartRemoveLineItemAction.builder()
.lineItemId("{lineItemId}")
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
discriminator value for MyCartRemoveLineItemAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for MyCartRemoveLineItemActionbuilder
(MyCartRemoveLineItemAction template) create builder for MyCartRemoveLineItemAction instancestatic MyCartRemoveLineItemAction
deepCopy
(MyCartRemoveLineItemAction template) factory method to create a deep copy of MyCartRemoveLineItemAction@Valid Money
Sets the LineItemprice
to the given value when decreasing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.@Valid ExternalLineItemTotalPrice
Sets the LineItemprice
andtotalPrice
to the given value when decreasing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.@NotNull String
id
of the Line Item to remove.New value to set.@Valid ItemShippingDetailsDraft
Container for Line Item-specific addresses to remove.static MyCartRemoveLineItemAction
of()
factory methodstatic MyCartRemoveLineItemAction
of
(MyCartRemoveLineItemAction template) factory method to create a shallow copy MyCartRemoveLineItemActionvoid
setExternalPrice
(Money externalPrice) Sets the LineItemprice
to the given value when decreasing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.void
setExternalTotalPrice
(ExternalLineItemTotalPrice externalTotalPrice) Sets the LineItemprice
andtotalPrice
to the given value when decreasing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.void
setLineItemId
(String lineItemId) id
of the Line Item to remove.void
setQuantity
(Long quantity) New value to set.void
setShippingDetailsToRemove
(ItemShippingDetailsDraft shippingDetailsToRemove) Container for Line Item-specific addresses to remove.static com.fasterxml.jackson.core.type.TypeReference<MyCartRemoveLineItemAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.me.MyCartUpdateAction
getAction, withMyCartUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
REMOVE_LINE_ITEM
discriminator value for MyCartRemoveLineItemAction- See Also:
-
-
Method Details
-
getLineItemId
id
of the Line Item to remove.- Returns:
- lineItemId
-
getQuantity
New value to set.
If
0
, the Line Item is removed from the Cart.- Returns:
- quantity
-
getExternalPrice
Sets the LineItem
price
to the given value when decreasing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.- Returns:
- externalPrice
-
getExternalTotalPrice
Sets the LineItem
price
andtotalPrice
to the given value when decreasing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.- Returns:
- externalTotalPrice
-
getShippingDetailsToRemove
Container for Line Item-specific addresses to remove.
- Returns:
- shippingDetailsToRemove
-
setLineItemId
id
of the Line Item to remove.- Parameters:
lineItemId
- value to be set
-
setQuantity
New value to set.
If
0
, the Line Item is removed from the Cart.- Parameters:
quantity
- value to be set
-
setExternalPrice
Sets the LineItem
price
to the given value when decreasing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.- Parameters:
externalPrice
- value to be set
-
setExternalTotalPrice
Sets the LineItem
price
andtotalPrice
to the given value when decreasing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.- Parameters:
externalTotalPrice
- value to be set
-
setShippingDetailsToRemove
Container for Line Item-specific addresses to remove.
- Parameters:
shippingDetailsToRemove
- value to be set
-
of
factory method- Returns:
- instance of MyCartRemoveLineItemAction
-
of
factory method to create a shallow copy MyCartRemoveLineItemAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of MyCartRemoveLineItemAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MyCartRemoveLineItemAction- Returns:
- builder
-
builder
create builder for MyCartRemoveLineItemAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withMyCartRemoveLineItemAction
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-