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