Package com.commercetools.api.models.me
Class MyCartChangeLineItemQuantityActionBuilder
java.lang.Object
com.commercetools.api.models.me.MyCartChangeLineItemQuantityActionBuilder
- All Implemented Interfaces:
Builder<MyCartChangeLineItemQuantityAction>
public class MyCartChangeLineItemQuantityActionBuilder
extends Object
implements Builder<MyCartChangeLineItemQuantityAction>
MyCartChangeLineItemQuantityActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
MyCartChangeLineItemQuantityAction myCartChangeLineItemQuantityAction = MyCartChangeLineItemQuantityAction.builder()
.quantity(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds MyCartChangeLineItemQuantityAction with checking for non-null required valuesbuilds MyCartChangeLineItemQuantityAction without checking for non-null required valuesid
of the LineItem to update.key
of the LineItem to update.New value to set.lineItemId
(String lineItemId) id
of the LineItem to update.lineItemKey
(String lineItemKey) key
of the LineItem to update.of()
factory method for an instance of MyCartChangeLineItemQuantityActionBuilderof
(MyCartChangeLineItemQuantityAction template) create builder for MyCartChangeLineItemQuantityAction instanceNew value to set.
-
Constructor Details
-
MyCartChangeLineItemQuantityActionBuilder
public MyCartChangeLineItemQuantityActionBuilder()
-
-
Method Details
-
lineItemId
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemId
- value to be set- Returns:
- Builder
-
lineItemKey
key
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemKey
- value to be set- Returns:
- Builder
-
quantity
New value to set.
If
0
, the Line Item is removed from the Cart.- Parameters:
quantity
- value to be set- Returns:
- Builder
-
getLineItemId
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Returns:
- lineItemId
-
getLineItemKey
key
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Returns:
- lineItemKey
-
getQuantity
New value to set.
If
0
, the Line Item is removed from the Cart.- Returns:
- quantity
-
build
builds MyCartChangeLineItemQuantityAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<MyCartChangeLineItemQuantityAction>
- Returns:
- MyCartChangeLineItemQuantityAction
-
buildUnchecked
builds MyCartChangeLineItemQuantityAction without checking for non-null required values- Returns:
- MyCartChangeLineItemQuantityAction
-
of
factory method for an instance of MyCartChangeLineItemQuantityActionBuilder- Returns:
- builder
-
of
public static MyCartChangeLineItemQuantityActionBuilder of(MyCartChangeLineItemQuantityAction template) create builder for MyCartChangeLineItemQuantityAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-