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