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