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