Interface OrderDiscountCodeStateSetMessage
- All Superinterfaces:
BaseResource
,DomainResource<Message>
,Identifiable<Message>
,Message
,OrderMessage
,Versioned<Message>
Generated after the DiscountCodeState changes due to a recalculation.
Example to create an instance using the builder pattern
OrderDiscountCodeStateSetMessage orderDiscountCodeStateSetMessage = OrderDiscountCodeStateSetMessage.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.sequenceNumber(0.3)
.resource(resourceBuilder -> resourceBuilder)
.resourceVersion(0.3)
.discountCode(discountCodeBuilder -> discountCodeBuilder)
.state(DiscountCodeState.NOT_ACTIVE)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for OrderDiscountCodeStateSetMessage -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for OrderDiscountCodeStateSetMessagebuilder
(OrderDiscountCodeStateSetMessage template) create builder for OrderDiscountCodeStateSetMessage instancedeepCopy
(OrderDiscountCodeStateSetMessage template) factory method to create a deep copy of OrderDiscountCodeStateSetMessage@NotNull @Valid DiscountCodeReference
DiscountCode that changed due to the recalculation.DiscountCodeState before the recalculation.@NotNull DiscountCodeState
getState()
DiscountCodeState after the recalculation.of()
factory methodof
(OrderDiscountCodeStateSetMessage template) factory method to create a shallow copy OrderDiscountCodeStateSetMessagevoid
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<OrderDiscountCodeStateSetMessage>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.DomainResource
get
Methods inherited from interface com.commercetools.api.models.message.Message
getCreatedAt, getCreatedBy, getId, getLastModifiedAt, getLastModifiedBy, getResource, getResourceUserProvidedIdentifiers, getResourceVersion, getSequenceNumber, getType, getVersion, setCreatedAt, setCreatedBy, setId, setLastModifiedAt, setLastModifiedBy, setResource, setResourceUserProvidedIdentifiers, setResourceVersion, setSequenceNumber, setVersion, withMessage
Methods inherited from interface com.commercetools.api.models.message.OrderMessage
withOrderMessage
-
Field Details
-
ORDER_DISCOUNT_CODE_STATE_SET
discriminator value for OrderDiscountCodeStateSetMessage- 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 OrderDiscountCodeStateSetMessage
-
of
factory method to create a shallow copy OrderDiscountCodeStateSetMessage- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static OrderDiscountCodeStateSetMessage deepCopy(@Nullable OrderDiscountCodeStateSetMessage template) factory method to create a deep copy of OrderDiscountCodeStateSetMessage- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for OrderDiscountCodeStateSetMessage- Returns:
- builder
-
builder
create builder for OrderDiscountCodeStateSetMessage instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withOrderDiscountCodeStateSetMessage
default <T> T withOrderDiscountCodeStateSetMessage(Function<OrderDiscountCodeStateSetMessage, 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<OrderDiscountCodeStateSetMessage> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-