Class CartDiscountResourceIdentifierBuilder
java.lang.Object
com.commercetools.api.models.cart_discount.CartDiscountResourceIdentifierBuilder
- All Implemented Interfaces:
Builder<CartDiscountResourceIdentifier>
public class CartDiscountResourceIdentifierBuilder
extends Object
implements Builder<CartDiscountResourceIdentifier>
CartDiscountResourceIdentifierBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartDiscountResourceIdentifier cartDiscountResourceIdentifier = CartDiscountResourceIdentifier.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartDiscountResourceIdentifier with checking for non-null required valuesbuilds CartDiscountResourceIdentifier without checking for non-null required valuesgetId()
Unique identifier of the referenced CartDiscount.getKey()
User-defined unique identifier of the referenced CartDiscount.Unique identifier of the referenced CartDiscount.User-defined unique identifier of the referenced CartDiscount.of()
factory method for an instance of CartDiscountResourceIdentifierBuilderof
(CartDiscountResourceIdentifier template) create builder for CartDiscountResourceIdentifier instance
-
Constructor Details
-
CartDiscountResourceIdentifierBuilder
public CartDiscountResourceIdentifierBuilder()
-
-
Method Details
-
id
Unique identifier of the referenced CartDiscount. Required if
key
is absent.- Parameters:
id
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the referenced CartDiscount. Required if
id
is absent.- Parameters:
key
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the referenced CartDiscount. Required if
key
is absent.- Returns:
- id
-
getKey
User-defined unique identifier of the referenced CartDiscount. Required if
id
is absent.- Returns:
- key
-
build
builds CartDiscountResourceIdentifier with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartDiscountResourceIdentifier>
- Returns:
- CartDiscountResourceIdentifier
-
buildUnchecked
builds CartDiscountResourceIdentifier without checking for non-null required values- Returns:
- CartDiscountResourceIdentifier
-
of
factory method for an instance of CartDiscountResourceIdentifierBuilder- Returns:
- builder
-
of
create builder for CartDiscountResourceIdentifier instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-