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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for OrderDiscountCodeStateSetMessagePayload -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for OrderDiscountCodeStateSetMessagePayloadcreate builder for OrderDiscountCodeStateSetMessagePayload instancecopyDeep()factory method to create a deep copy of OrderDiscountCodeStateSetMessagePayload@NotNull @Valid DiscountCodeReferenceDiscountCode that changed due to the recalculation.DiscountCodeState before the recalculation.@NotNull DiscountCodeStategetState()DiscountCodeState after the recalculation.of()factory methodof(OrderDiscountCodeStateSetMessagePayload template) factory method to create a shallow copy OrderDiscountCodeStateSetMessagePayloadvoidsetDiscountCode(DiscountCodeReference discountCode) DiscountCode that changed due to the recalculation.voidsetOldState(DiscountCodeState oldState) DiscountCodeState before the recalculation.voidsetState(DiscountCodeState state) DiscountCodeState after the recalculation.static com.fasterxml.jackson.core.type.TypeReference<OrderDiscountCodeStateSetMessagePayload>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithOrderDiscountCodeStateSetMessagePayload(Function<OrderDiscountCodeStateSetMessagePayload, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.message.MessagePayload
getType, withMessagePayloadMethods inherited from interface com.commercetools.api.models.message.MessagePayloadMixin
asMethods 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
-
copyDeep
OrderDiscountCodeStateSetMessagePayload copyDeep()- Specified by:
copyDeepin interfaceMessagePayload- Specified by:
copyDeepin interfaceOrderMessagePayload
-
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
-