Interface ShoppingListRemoveLineItemAction
- All Superinterfaces:
ResourceUpdateAction<ShoppingListUpdateAction>
,ShoppingListUpdateAction
Example to create an instance using the builder pattern
ShoppingListRemoveLineItemAction shoppingListRemoveLineItemAction = ShoppingListRemoveLineItemAction.builder()
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ShoppingListRemoveLineItemAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ShoppingListRemoveLineItemActionbuilder
(ShoppingListRemoveLineItemAction template) create builder for ShoppingListRemoveLineItemAction instancedeepCopy
(ShoppingListRemoveLineItemAction template) factory method to create a deep copy of ShoppingListRemoveLineItemActionTheid
of the ShoppingListLineItem to update.Thekey
of the ShoppingListLineItem to update.Amount to remove from thequantity
of the ShoppingListLineItem.of()
factory methodof
(ShoppingListRemoveLineItemAction template) factory method to create a shallow copy ShoppingListRemoveLineItemActionvoid
setLineItemId
(String lineItemId) Theid
of the ShoppingListLineItem to update.void
setLineItemKey
(String lineItemKey) Thekey
of the ShoppingListLineItem to update.void
setQuantity
(Long quantity) Amount to remove from thequantity
of the ShoppingListLineItem.static com.fasterxml.jackson.core.type.TypeReference<ShoppingListRemoveLineItemAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
Methods inherited from interface com.commercetools.api.models.shopping_list.ShoppingListUpdateAction
getAction, withShoppingListUpdateAction
-
Field Details
-
REMOVE_LINE_ITEM
discriminator value for ShoppingListRemoveLineItemAction- See Also:
-
-
Method Details
-
getLineItemId
String getLineItemId()The
id
of the ShoppingListLineItem to update. EitherlineItemId
orlineItemKey
is required.- Returns:
- lineItemId
-
getLineItemKey
String getLineItemKey()The
key
of the ShoppingListLineItem to update. EitherlineItemId
orlineItemKey
is required.- Returns:
- lineItemKey
-
getQuantity
Long getQuantity()Amount to remove from the
quantity
of the ShoppingListLineItem. If not set, the ShoppingListLineItem is removed from the ShoppingList. If this value matches or exceeds the currentquantity
of the ShoppingListLineItem, the ShoppingListLineItem is removed from the ShoppingList.- Returns:
- quantity
-
setLineItemId
The
id
of the ShoppingListLineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemId
- value to be set
-
setLineItemKey
The
key
of the ShoppingListLineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemKey
- value to be set
-
setQuantity
Amount to remove from the
quantity
of the ShoppingListLineItem. If not set, the ShoppingListLineItem is removed from the ShoppingList. If this value matches or exceeds the currentquantity
of the ShoppingListLineItem, the ShoppingListLineItem is removed from the ShoppingList.- Parameters:
quantity
- value to be set
-
of
factory method- Returns:
- instance of ShoppingListRemoveLineItemAction
-
of
factory method to create a shallow copy ShoppingListRemoveLineItemAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ShoppingListRemoveLineItemAction deepCopy(@Nullable ShoppingListRemoveLineItemAction template) factory method to create a deep copy of ShoppingListRemoveLineItemAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ShoppingListRemoveLineItemAction- Returns:
- builder
-
builder
create builder for ShoppingListRemoveLineItemAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withShoppingListRemoveLineItemAction
default <T> T withShoppingListRemoveLineItemAction(Function<ShoppingListRemoveLineItemAction, T> helper) accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<ShoppingListRemoveLineItemAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-