Class CartAddDiscountCodeActionBuilder
java.lang.Object
com.commercetools.api.models.cart.CartAddDiscountCodeActionBuilder
- All Implemented Interfaces:
Builder<CartAddDiscountCodeAction>
public class CartAddDiscountCodeActionBuilder
extends Object
implements Builder<CartAddDiscountCodeAction>
CartAddDiscountCodeActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartAddDiscountCodeAction cartAddDiscountCodeAction = CartAddDiscountCodeAction.builder()
.code("{code}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartAddDiscountCodeAction with checking for non-null required valuesbuilds CartAddDiscountCodeAction without checking for non-null required valuescode
of a DiscountCode.getCode()
code
of a DiscountCode.of()
factory method for an instance of CartAddDiscountCodeActionBuilderof
(CartAddDiscountCodeAction template) create builder for CartAddDiscountCodeAction instance
-
Constructor Details
-
CartAddDiscountCodeActionBuilder
public CartAddDiscountCodeActionBuilder()
-
-
Method Details
-
code
code
of a DiscountCode.- Parameters:
code
- value to be set- Returns:
- Builder
-
getCode
code
of a DiscountCode.- Returns:
- code
-
build
builds CartAddDiscountCodeAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartAddDiscountCodeAction>
- Returns:
- CartAddDiscountCodeAction
-
buildUnchecked
builds CartAddDiscountCodeAction without checking for non-null required values- Returns:
- CartAddDiscountCodeAction
-
of
factory method for an instance of CartAddDiscountCodeActionBuilder- Returns:
- builder
-
of
create builder for CartAddDiscountCodeAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-