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