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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for ShoppingListChangeLineItemQuantityAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for ShoppingListChangeLineItemQuantityActioncreate builder for ShoppingListChangeLineItemQuantityAction instancecopyDeep()factory method to create a deep copy of ShoppingListChangeLineItemQuantityActionTheidof the ShoppingListLineItem to update.Thekeyof the ShoppingListLineItem to update.@NotNull LongNew value to set.of()factory methodof(ShoppingListChangeLineItemQuantityAction template) factory method to create a shallow copy ShoppingListChangeLineItemQuantityActionvoidsetLineItemId(String lineItemId) Theidof the ShoppingListLineItem to update.voidsetLineItemKey(String lineItemKey) Thekeyof the ShoppingListLineItem to update.voidsetQuantity(Long quantity) New value to set.static com.fasterxml.jackson.core.type.TypeReference<ShoppingListChangeLineItemQuantityAction>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithShoppingListChangeLineItemQuantityAction(Function<ShoppingListChangeLineItemQuantityAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
getMethods 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
idof the ShoppingListLineItem to update. EitherlineItemIdorlineItemKeyis required.- Returns:
- lineItemId
-
getLineItemKey
String getLineItemKey()The
keyof the ShoppingListLineItem to update. EitherlineItemIdorlineItemKeyis required.- Returns:
- lineItemKey
-
getQuantity
New value to set. If
0, the ShoppingListLineItem is removed from the ShoppingList.- Returns:
- quantity
-
setLineItemId
The
idof the ShoppingListLineItem to update. EitherlineItemIdorlineItemKeyis required.- Parameters:
lineItemId- value to be set
-
setLineItemKey
The
keyof the ShoppingListLineItem to update. EitherlineItemIdorlineItemKeyis 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
-
copyDeep
ShoppingListChangeLineItemQuantityAction copyDeep()- Specified by:
copyDeepin interfaceShoppingListUpdateAction
-
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
-