Interface ShoppingListChangeLineItemQuantityAction
- All Superinterfaces:
ResourceUpdateAction<ShoppingListUpdateAction>
,ShoppingListUpdateAction
ShoppingListChangeLineItemQuantityAction
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ShoppingListChangeLineItemQuantityAction shoppingListChangeLineItemQuantityAction = ShoppingListChangeLineItemQuantityAction.builder()
.quantity(0.3)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ShoppingListChangeLineItemQuantityAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ShoppingListChangeLineItemQuantityActioncreate builder for ShoppingListChangeLineItemQuantityAction instancefactory method to create a deep copy of ShoppingListChangeLineItemQuantityActionTheid
of the ShoppingListLineItem to update.Thekey
of the ShoppingListLineItem to update.@NotNull Long
New value to set.of()
factory methodof
(ShoppingListChangeLineItemQuantityAction template) factory method to create a shallow copy ShoppingListChangeLineItemQuantityActionvoid
setLineItemId
(String lineItemId) Theid
of the ShoppingListLineItem to update.void
setLineItemKey
(String lineItemKey) Thekey
of the ShoppingListLineItem to update.void
setQuantity
(Long quantity) New value to set.static com.fasterxml.jackson.core.type.TypeReference<ShoppingListChangeLineItemQuantityAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withShoppingListChangeLineItemQuantityAction
(Function<ShoppingListChangeLineItemQuantityAction, T> helper) 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
-
CHANGE_LINE_ITEM_QUANTITY
discriminator value for ShoppingListChangeLineItemQuantityAction- 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
New value to set. If
0
, 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
New value to set. If
0
, the ShoppingListLineItem is removed from the ShoppingList.- Parameters:
quantity
- value to be set
-
of
factory method- Returns:
- instance of ShoppingListChangeLineItemQuantityAction
-
of
static ShoppingListChangeLineItemQuantityAction of(ShoppingListChangeLineItemQuantityAction template) factory method to create a shallow copy ShoppingListChangeLineItemQuantityAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ShoppingListChangeLineItemQuantityAction deepCopy(@Nullable ShoppingListChangeLineItemQuantityAction template) factory method to create a deep copy of ShoppingListChangeLineItemQuantityAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ShoppingListChangeLineItemQuantityAction- Returns:
- builder
-
builder
static ShoppingListChangeLineItemQuantityActionBuilder builder(ShoppingListChangeLineItemQuantityAction template) create builder for ShoppingListChangeLineItemQuantityAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withShoppingListChangeLineItemQuantityAction
default <T> T withShoppingListChangeLineItemQuantityAction(Function<ShoppingListChangeLineItemQuantityAction, 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<ShoppingListChangeLineItemQuantityAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-