Class CartDiscountValueBuilder
java.lang.Object
com.commercetools.history.models.common.CartDiscountValueBuilder
- All Implemented Interfaces:
Builder<CartDiscountValue>
CartDiscountValueBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartDiscountValue cartDiscountValue = CartDiscountValue.builder()
.type("{type}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds CartDiscountValue with checking for non-null required valuesbuilds CartDiscountValue without checking for non-null required valuesgetType()value of type}static CartDiscountValueBuilderof()factory method for an instance of CartDiscountValueBuilderstatic CartDiscountValueBuilderof(CartDiscountValue template) create builder for CartDiscountValue instanceset the value to the type
-
Constructor Details
-
CartDiscountValueBuilder
public CartDiscountValueBuilder()
-
-
Method Details
-
type
set the value to the type- Parameters:
type- value to be set- Returns:
- Builder
-
getType
value of type}- Returns:
- type
-
build
builds CartDiscountValue with checking for non-null required values- Specified by:
buildin interfaceBuilder<CartDiscountValue>- Returns:
- CartDiscountValue
-
buildUnchecked
builds CartDiscountValue without checking for non-null required values- Returns:
- CartDiscountValue
-
of
factory method for an instance of CartDiscountValueBuilder- Returns:
- builder
-
of
create builder for CartDiscountValue instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-