Class CartDiscountChangeIsActiveActionBuilder
java.lang.Object
com.commercetools.api.models.cart_discount.CartDiscountChangeIsActiveActionBuilder
- All Implemented Interfaces:
Builder<CartDiscountChangeIsActiveAction>
public class CartDiscountChangeIsActiveActionBuilder
extends Object
implements Builder<CartDiscountChangeIsActiveAction>
CartDiscountChangeIsActiveActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartDiscountChangeIsActiveAction cartDiscountChangeIsActiveAction = CartDiscountChangeIsActiveAction.builder()
.isActive(true)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartDiscountChangeIsActiveAction with checking for non-null required valuesbuilds CartDiscountChangeIsActiveAction without checking for non-null required valuesNew value to set.New value to set.of()
factory method for an instance of CartDiscountChangeIsActiveActionBuilderof
(CartDiscountChangeIsActiveAction template) create builder for CartDiscountChangeIsActiveAction instance
-
Constructor Details
-
CartDiscountChangeIsActiveActionBuilder
public CartDiscountChangeIsActiveActionBuilder()
-
-
Method Details
-
isActive
New value to set. If set to
true
, the Discount will be applied to the Cart.If the limit for active Cart Discounts is reached, a MaxCartDiscountsReached error is returned.
- Parameters:
isActive
- value to be set- Returns:
- Builder
-
getIsActive
New value to set. If set to
true
, the Discount will be applied to the Cart.If the limit for active Cart Discounts is reached, a MaxCartDiscountsReached error is returned.
- Returns:
- isActive
-
build
builds CartDiscountChangeIsActiveAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartDiscountChangeIsActiveAction>
- Returns:
- CartDiscountChangeIsActiveAction
-
buildUnchecked
builds CartDiscountChangeIsActiveAction without checking for non-null required values- Returns:
- CartDiscountChangeIsActiveAction
-
of
factory method for an instance of CartDiscountChangeIsActiveActionBuilder- Returns:
- builder
-
of
create builder for CartDiscountChangeIsActiveAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-