Class OrderDiscountCodeStateSetMessagePayloadBuilder
java.lang.Object
com.commercetools.api.models.message.OrderDiscountCodeStateSetMessagePayloadBuilder
- All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<OrderDiscountCodeStateSetMessagePayload>
public class OrderDiscountCodeStateSetMessagePayloadBuilder
extends Object
implements io.vrap.rmf.base.client.Builder<OrderDiscountCodeStateSetMessagePayload>
OrderDiscountCodeStateSetMessagePayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
OrderDiscountCodeStateSetMessagePayload orderDiscountCodeStateSetMessagePayload = OrderDiscountCodeStateSetMessagePayload.builder()
.discountCode(discountCodeBuilder -> discountCodeBuilder)
.state(DiscountCodeState.NOT_ACTIVE)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds OrderDiscountCodeStateSetMessagePayload with checking for non-null required valuesbuilds OrderDiscountCodeStateSetMessagePayload without checking for non-null required valuesdiscountCode
(DiscountCodeReference discountCode) DiscountCode that changed due to the recalculation.DiscountCode that changed due to the recalculation.DiscountCode that changed due to the recalculation.DiscountCodeState before the recalculation.getState()
DiscountCodeState after the recalculation.of()
factory method for an instance of OrderDiscountCodeStateSetMessagePayloadBuilderof
(OrderDiscountCodeStateSetMessagePayload template) create builder for OrderDiscountCodeStateSetMessagePayload instanceoldState
(DiscountCodeState oldState) DiscountCodeState before the recalculation.state
(DiscountCodeState state) DiscountCodeState after the recalculation.DiscountCode that changed due to the recalculation.
-
Constructor Details
-
OrderDiscountCodeStateSetMessagePayloadBuilder
public OrderDiscountCodeStateSetMessagePayloadBuilder()
-
-
Method Details
-
discountCode
public OrderDiscountCodeStateSetMessagePayloadBuilder discountCode(Function<DiscountCodeReferenceBuilder, DiscountCodeReferenceBuilder> builder) DiscountCode that changed due to the recalculation.
- Parameters:
builder
- function to build the discountCode value- Returns:
- Builder
-
withDiscountCode
public OrderDiscountCodeStateSetMessagePayloadBuilder withDiscountCode(Function<DiscountCodeReferenceBuilder, DiscountCodeReference> builder) DiscountCode that changed due to the recalculation.
- Parameters:
builder
- function to build the discountCode value- Returns:
- Builder
-
discountCode
public OrderDiscountCodeStateSetMessagePayloadBuilder discountCode(DiscountCodeReference discountCode) DiscountCode that changed due to the recalculation.
- Parameters:
discountCode
- value to be set- Returns:
- Builder
-
state
DiscountCodeState after the recalculation.
- Parameters:
state
- value to be set- Returns:
- Builder
-
oldState
public OrderDiscountCodeStateSetMessagePayloadBuilder oldState(@Nullable DiscountCodeState oldState) DiscountCodeState before the recalculation.
- Parameters:
oldState
- value to be set- Returns:
- Builder
-
getDiscountCode
DiscountCode that changed due to the recalculation.
- Returns:
- discountCode
-
getState
DiscountCodeState after the recalculation.
- Returns:
- state
-
getOldState
DiscountCodeState before the recalculation.
- Returns:
- oldState
-
build
builds OrderDiscountCodeStateSetMessagePayload with checking for non-null required values- Specified by:
build
in interfaceio.vrap.rmf.base.client.Builder<OrderDiscountCodeStateSetMessagePayload>
- Returns:
- OrderDiscountCodeStateSetMessagePayload
-
buildUnchecked
builds OrderDiscountCodeStateSetMessagePayload without checking for non-null required values- Returns:
- OrderDiscountCodeStateSetMessagePayload
-
of
factory method for an instance of OrderDiscountCodeStateSetMessagePayloadBuilder- Returns:
- builder
-
of
public static OrderDiscountCodeStateSetMessagePayloadBuilder of(OrderDiscountCodeStateSetMessagePayload template) create builder for OrderDiscountCodeStateSetMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-