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