Class DiscountCodeCreatedMessagePayloadBuilder
java.lang.Object
com.commercetools.api.models.message.DiscountCodeCreatedMessagePayloadBuilder
- All Implemented Interfaces:
Builder<DiscountCodeCreatedMessagePayload>
public class DiscountCodeCreatedMessagePayloadBuilder
extends Object
implements Builder<DiscountCodeCreatedMessagePayload>
DiscountCodeCreatedMessagePayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DiscountCodeCreatedMessagePayload discountCodeCreatedMessagePayload = DiscountCodeCreatedMessagePayload.builder()
.discountCode(discountCodeBuilder -> discountCodeBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds DiscountCodeCreatedMessagePayload with checking for non-null required valuesbuilds DiscountCodeCreatedMessagePayload without checking for non-null required valuesdiscountCode
(DiscountCode discountCode) The Discount Code that was created.The Discount Code that was created.The Discount Code that was created.of()
factory method for an instance of DiscountCodeCreatedMessagePayloadBuilderof
(DiscountCodeCreatedMessagePayload template) create builder for DiscountCodeCreatedMessagePayload instanceThe Discount Code that was created.
-
Constructor Details
-
DiscountCodeCreatedMessagePayloadBuilder
public DiscountCodeCreatedMessagePayloadBuilder()
-
-
Method Details
-
discountCode
public DiscountCodeCreatedMessagePayloadBuilder discountCode(Function<DiscountCodeBuilder, DiscountCodeBuilder> builder) The Discount Code that was created.
- Parameters:
builder
- function to build the discountCode value- Returns:
- Builder
-
withDiscountCode
public DiscountCodeCreatedMessagePayloadBuilder withDiscountCode(Function<DiscountCodeBuilder, DiscountCode> builder) The Discount Code that was created.
- Parameters:
builder
- function to build the discountCode value- Returns:
- Builder
-
discountCode
The Discount Code that was created.
- Parameters:
discountCode
- value to be set- Returns:
- Builder
-
getDiscountCode
The Discount Code that was created.
- Returns:
- discountCode
-
build
builds DiscountCodeCreatedMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<DiscountCodeCreatedMessagePayload>
- Returns:
- DiscountCodeCreatedMessagePayload
-
buildUnchecked
builds DiscountCodeCreatedMessagePayload without checking for non-null required values- Returns:
- DiscountCodeCreatedMessagePayload
-
of
factory method for an instance of DiscountCodeCreatedMessagePayloadBuilder- Returns:
- builder
-
of
public static DiscountCodeCreatedMessagePayloadBuilder of(DiscountCodeCreatedMessagePayload template) create builder for DiscountCodeCreatedMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-