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