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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds ShoppingListChangeLineItemQuantityAction with checking for non-null required valuesbuilds ShoppingListChangeLineItemQuantityAction without checking for non-null required valuesTheidof the ShoppingListLineItem to update.Thekeyof the ShoppingListLineItem to update.New value to set.lineItemId(String lineItemId) Theidof the ShoppingListLineItem to update.lineItemKey(String lineItemKey) Thekeyof 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
idof the ShoppingListLineItem to update. EitherlineItemIdorlineItemKeyis required.- Parameters:
lineItemId- value to be set- Returns:
- Builder
-
lineItemKey
The
keyof the ShoppingListLineItem to update. EitherlineItemIdorlineItemKeyis 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
idof the ShoppingListLineItem to update. EitherlineItemIdorlineItemKeyis required.- Returns:
- lineItemId
-
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
-
build
builds ShoppingListChangeLineItemQuantityAction with checking for non-null required values- Specified by:
buildin 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
-