Class CartChangeCustomLineItemQuantityActionBuilder
java.lang.Object
com.commercetools.api.models.cart.CartChangeCustomLineItemQuantityActionBuilder
- All Implemented Interfaces:
Builder<CartChangeCustomLineItemQuantityAction>
public class CartChangeCustomLineItemQuantityActionBuilder
extends Object
implements Builder<CartChangeCustomLineItemQuantityAction>
CartChangeCustomLineItemQuantityActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartChangeCustomLineItemQuantityAction cartChangeCustomLineItemQuantityAction = CartChangeCustomLineItemQuantityAction.builder()
.quantity(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartChangeCustomLineItemQuantityAction with checking for non-null required valuesbuilds CartChangeCustomLineItemQuantityAction without checking for non-null required valuescustomLineItemId
(String customLineItemId) id
of the CustomLineItem to update.customLineItemKey
(String customLineItemKey) key
of the CustomLineItem to update.id
of the CustomLineItem to update.key
of the CustomLineItem to update.New value to set.of()
factory method for an instance of CartChangeCustomLineItemQuantityActionBuilderof
(CartChangeCustomLineItemQuantityAction template) create builder for CartChangeCustomLineItemQuantityAction instanceNew value to set.
-
Constructor Details
-
CartChangeCustomLineItemQuantityActionBuilder
public CartChangeCustomLineItemQuantityActionBuilder()
-
-
Method Details
-
customLineItemId
public CartChangeCustomLineItemQuantityActionBuilder customLineItemId(@Nullable String customLineItemId) id
of the CustomLineItem to update. EithercustomLineItemId
orcustomLineItemKey
is required.- Parameters:
customLineItemId
- value to be set- Returns:
- Builder
-
customLineItemKey
public CartChangeCustomLineItemQuantityActionBuilder customLineItemKey(@Nullable String customLineItemKey) key
of the CustomLineItem to update. EithercustomLineItemId
orcustomLineItemKey
is required.- Parameters:
customLineItemKey
- value to be set- Returns:
- Builder
-
quantity
New value to set.
If
0
, the Custom Line Item is removed from the Cart.- Parameters:
quantity
- value to be set- Returns:
- Builder
-
getCustomLineItemId
id
of the CustomLineItem to update. EithercustomLineItemId
orcustomLineItemKey
is required.- Returns:
- customLineItemId
-
getCustomLineItemKey
key
of the CustomLineItem to update. EithercustomLineItemId
orcustomLineItemKey
is required.- Returns:
- customLineItemKey
-
getQuantity
New value to set.
If
0
, the Custom Line Item is removed from the Cart.- Returns:
- quantity
-
build
builds CartChangeCustomLineItemQuantityAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartChangeCustomLineItemQuantityAction>
- Returns:
- CartChangeCustomLineItemQuantityAction
-
buildUnchecked
builds CartChangeCustomLineItemQuantityAction without checking for non-null required values- Returns:
- CartChangeCustomLineItemQuantityAction
-
of
factory method for an instance of CartChangeCustomLineItemQuantityActionBuilder- Returns:
- builder
-
of
public static CartChangeCustomLineItemQuantityActionBuilder of(CartChangeCustomLineItemQuantityAction template) create builder for CartChangeCustomLineItemQuantityAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-