Interface CartRemoveLineItemAction
- All Superinterfaces:
CartUpdateAction,ResourceUpdateAction<CartUpdateAction>
The LineItem price is updated as described in Line Item price selection.
Example to create an instance using the builder pattern
CartRemoveLineItemAction cartRemoveLineItemAction = CartRemoveLineItemAction.builder()
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CartRemoveLineItemAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CartRemoveLineItemActionbuilder(CartRemoveLineItemAction template) create builder for CartRemoveLineItemAction instancecopyDeep()static CartRemoveLineItemActiondeepCopy(CartRemoveLineItemAction template) factory method to create a deep copy of CartRemoveLineItemAction@Valid MoneySets the LineItempriceto the given value when decreasing the quantity of a Line Item with theExternalPriceLineItemPriceMode.@Valid ExternalLineItemTotalPriceSets the LineItempriceandtotalPriceto the given value when decreasing the quantity of a Line Item with theExternalTotalLineItemPriceMode.idof the LineItem to update.keyof the LineItem to update.Amount to subtract from the LineItem'squantity.@Valid ItemShippingDetailsDraftContainer for Line Item-specific addresses to remove.static CartRemoveLineItemActionof()factory methodstatic CartRemoveLineItemActionof(CartRemoveLineItemAction template) factory method to create a shallow copy CartRemoveLineItemActionvoidsetExternalPrice(Money externalPrice) Sets the LineItempriceto the given value when decreasing the quantity of a Line Item with theExternalPriceLineItemPriceMode.voidsetExternalTotalPrice(ExternalLineItemTotalPrice externalTotalPrice) Sets the LineItempriceandtotalPriceto the given value when decreasing the quantity of a Line Item with theExternalTotalLineItemPriceMode.voidsetLineItemId(String lineItemId) idof the LineItem to update.voidsetLineItemKey(String lineItemKey) keyof the LineItem to update.voidsetQuantity(Long quantity) Amount to subtract from the LineItem'squantity.voidsetShippingDetailsToRemove(ItemShippingDetailsDraft shippingDetailsToRemove) Container for Line Item-specific addresses to remove.static com.fasterxml.jackson.core.type.TypeReference<CartRemoveLineItemAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.cart.CartUpdateAction
getAction, withCartUpdateActionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
REMOVE_LINE_ITEM
discriminator value for CartRemoveLineItemAction- See Also:
-
-
Method Details
-
getLineItemId
String getLineItemId()idof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Returns:
- lineItemId
-
getLineItemKey
String getLineItemKey()keyof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Returns:
- lineItemKey
-
getQuantity
Long getQuantity()Amount to subtract from the LineItem's
quantity. If absent, the LineItem is removed from the Cart.- Returns:
- quantity
-
getExternalPrice
Sets the LineItem
priceto the given value when decreasing the quantity of a Line Item with theExternalPriceLineItemPriceMode.To set the money value in high precision, use HighPrecisionMoneyDraft.
- Returns:
- externalPrice
-
getExternalTotalPrice
Sets the LineItem
priceandtotalPriceto the given value when decreasing the quantity of a Line Item with theExternalTotalLineItemPriceMode.- Returns:
- externalTotalPrice
-
getShippingDetailsToRemove
Container for Line Item-specific addresses to remove.
- Returns:
- shippingDetailsToRemove
-
setLineItemId
idof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Parameters:
lineItemId- value to be set
-
setLineItemKey
keyof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Parameters:
lineItemKey- value to be set
-
setQuantity
Amount to subtract from the LineItem's
quantity. If absent, the LineItem is removed from the Cart.- Parameters:
quantity- value to be set
-
setExternalPrice
Sets the LineItem
priceto the given value when decreasing the quantity of a Line Item with theExternalPriceLineItemPriceMode.To set the money value in high precision, use HighPrecisionMoneyDraft.
- Parameters:
externalPrice- value to be set
-
setExternalTotalPrice
Sets the LineItem
priceandtotalPriceto the given value when decreasing the quantity of a Line Item with theExternalTotalLineItemPriceMode.- 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 CartRemoveLineItemAction
-
of
factory method to create a shallow copy CartRemoveLineItemAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CartRemoveLineItemAction copyDeep()- Specified by:
copyDeepin interfaceCartUpdateAction
-
deepCopy
factory method to create a deep copy of CartRemoveLineItemAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartRemoveLineItemAction- Returns:
- builder
-
builder
create builder for CartRemoveLineItemAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCartRemoveLineItemAction
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
-