Class ShoppingListChangeLineItemQuantityActionBuilder
java.lang.Object
com.commercetools.api.models.shopping_list.ShoppingListChangeLineItemQuantityActionBuilder
- All Implemented Interfaces:
Builder<ShoppingListChangeLineItemQuantityAction>
public class ShoppingListChangeLineItemQuantityActionBuilder
extends Object
implements Builder<ShoppingListChangeLineItemQuantityAction>
ShoppingListChangeLineItemQuantityActionBuilder
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()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ShoppingListChangeLineItemQuantityAction with checking for non-null required valuesbuilds ShoppingListChangeLineItemQuantityAction without checking for non-null required valuesTheid
of the ShoppingListLineItem to update.Thekey
of the ShoppingListLineItem to update.New value to set.lineItemId
(String lineItemId) Theid
of the ShoppingListLineItem to update.lineItemKey
(String lineItemKey) Thekey
of the ShoppingListLineItem to update.of()
factory method for an instance of ShoppingListChangeLineItemQuantityActionBuilderof
(ShoppingListChangeLineItemQuantityAction template) create builder for ShoppingListChangeLineItemQuantityAction instanceNew value to set.
-
Constructor Details
-
ShoppingListChangeLineItemQuantityActionBuilder
public ShoppingListChangeLineItemQuantityActionBuilder()
-
-
Method Details
-
lineItemId
The
id
of the ShoppingListLineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemId
- value to be set- Returns:
- Builder
-
lineItemKey
The
key
of the ShoppingListLineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemKey
- value to be set- Returns:
- Builder
-
quantity
New value to set. If
0
, the ShoppingListLineItem is removed from the ShoppingList.- Parameters:
quantity
- value to be set- Returns:
- Builder
-
getLineItemId
The
id
of the ShoppingListLineItem to update. EitherlineItemId
orlineItemKey
is required.- Returns:
- lineItemId
-
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
-
build
builds ShoppingListChangeLineItemQuantityAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<ShoppingListChangeLineItemQuantityAction>
- Returns:
- ShoppingListChangeLineItemQuantityAction
-
buildUnchecked
builds ShoppingListChangeLineItemQuantityAction without checking for non-null required values- Returns:
- ShoppingListChangeLineItemQuantityAction
-
of
factory method for an instance of ShoppingListChangeLineItemQuantityActionBuilder- Returns:
- builder
-
of
public static ShoppingListChangeLineItemQuantityActionBuilder of(ShoppingListChangeLineItemQuantityAction template) create builder for ShoppingListChangeLineItemQuantityAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-