Class CartReferenceBuilder
java.lang.Object
com.commercetools.api.models.cart.CartReferenceBuilder
- All Implemented Interfaces:
Builder<CartReference>
CartReferenceBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartReference cartReference = CartReference.builder()
.id("{id}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartReference with checking for non-null required valuesbuilds CartReference without checking for non-null required valuesgetId()
Unique identifier of the referenced Cart.getObj()
Contains the representation of the expanded Cart.Unique identifier of the referenced Cart.Contains the representation of the expanded Cart.obj
(Function<CartBuilder, CartBuilder> builder) Contains the representation of the expanded Cart.static CartReferenceBuilder
of()
factory method for an instance of CartReferenceBuilderstatic CartReferenceBuilder
of
(CartReference template) create builder for CartReference instancewithObj
(Function<CartBuilder, Cart> builder) Contains the representation of the expanded Cart.
-
Constructor Details
-
CartReferenceBuilder
public CartReferenceBuilder()
-
-
Method Details
-
id
Unique identifier of the referenced Cart.
- Parameters:
id
- value to be set- Returns:
- Builder
-
obj
Contains the representation of the expanded Cart. Only present in responses to requests with Reference Expansion for Carts.
- Parameters:
builder
- function to build the obj value- Returns:
- Builder
-
withObj
Contains the representation of the expanded Cart. Only present in responses to requests with Reference Expansion for Carts.
- Parameters:
builder
- function to build the obj value- Returns:
- Builder
-
obj
Contains the representation of the expanded Cart. Only present in responses to requests with Reference Expansion for Carts.
- Parameters:
obj
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the referenced Cart.
- Returns:
- id
-
getObj
Contains the representation of the expanded Cart. Only present in responses to requests with Reference Expansion for Carts.
- Returns:
- obj
-
build
builds CartReference with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartReference>
- Returns:
- CartReference
-
buildUnchecked
builds CartReference without checking for non-null required values- Returns:
- CartReference
-
of
factory method for an instance of CartReferenceBuilder- Returns:
- builder
-
of
create builder for CartReference instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-