Interface OrderDiscountCodeStateSetMessagePayload
- All Superinterfaces:
MessagePayload
,MessagePayloadMixin
,OrderMessagePayload
Generated after the DiscountCodeState changes due to a recalculation.
Example to create an instance using the builder pattern
OrderDiscountCodeStateSetMessagePayload orderDiscountCodeStateSetMessagePayload = OrderDiscountCodeStateSetMessagePayload.builder()
.discountCode(discountCodeBuilder -> discountCodeBuilder)
.state(DiscountCodeState.NOT_ACTIVE)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for OrderDiscountCodeStateSetMessagePayload -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for OrderDiscountCodeStateSetMessagePayloadcreate builder for OrderDiscountCodeStateSetMessagePayload instancefactory method to create a deep copy of OrderDiscountCodeStateSetMessagePayload@NotNull @Valid DiscountCodeReference
DiscountCode that changed due to the recalculation.DiscountCodeState before the recalculation.@NotNull DiscountCodeState
getState()
DiscountCodeState after the recalculation.of()
factory methodof
(OrderDiscountCodeStateSetMessagePayload template) factory method to create a shallow copy OrderDiscountCodeStateSetMessagePayloadvoid
setDiscountCode
(DiscountCodeReference discountCode) DiscountCode that changed due to the recalculation.void
setOldState
(DiscountCodeState oldState) DiscountCodeState before the recalculation.void
setState
(DiscountCodeState state) DiscountCodeState after the recalculation.static com.fasterxml.jackson.core.type.TypeReference<OrderDiscountCodeStateSetMessagePayload>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withOrderDiscountCodeStateSetMessagePayload
(Function<OrderDiscountCodeStateSetMessagePayload, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.message.MessagePayload
getType, withMessagePayload
Methods inherited from interface com.commercetools.api.models.message.MessagePayloadMixin
as
Methods inherited from interface com.commercetools.api.models.message.OrderMessagePayload
withOrderMessagePayload
-
Field Details
-
ORDER_DISCOUNT_CODE_STATE_SET
discriminator value for OrderDiscountCodeStateSetMessagePayload- See Also:
-
-
Method Details
-
getDiscountCode
DiscountCode that changed due to the recalculation.
- Returns:
- discountCode
-
getState
DiscountCodeState after the recalculation.
- Returns:
- state
-
getOldState
DiscountCodeState getOldState()DiscountCodeState before the recalculation.
- Returns:
- oldState
-
setDiscountCode
DiscountCode that changed due to the recalculation.
- Parameters:
discountCode
- value to be set
-
setState
DiscountCodeState after the recalculation.
- Parameters:
state
- value to be set
-
setOldState
DiscountCodeState before the recalculation.
- Parameters:
oldState
- value to be set
-
of
factory method- Returns:
- instance of OrderDiscountCodeStateSetMessagePayload
-
of
factory method to create a shallow copy OrderDiscountCodeStateSetMessagePayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static OrderDiscountCodeStateSetMessagePayload deepCopy(@Nullable OrderDiscountCodeStateSetMessagePayload template) factory method to create a deep copy of OrderDiscountCodeStateSetMessagePayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for OrderDiscountCodeStateSetMessagePayload- Returns:
- builder
-
builder
static OrderDiscountCodeStateSetMessagePayloadBuilder builder(OrderDiscountCodeStateSetMessagePayload template) create builder for OrderDiscountCodeStateSetMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withOrderDiscountCodeStateSetMessagePayload
default <T> T withOrderDiscountCodeStateSetMessagePayload(Function<OrderDiscountCodeStateSetMessagePayload, T> helper) accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<OrderDiscountCodeStateSetMessagePayload> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-