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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for OrderDiscountCodeStateSetMessage -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for OrderDiscountCodeStateSetMessagebuilder(OrderDiscountCodeStateSetMessage template) create builder for OrderDiscountCodeStateSetMessage instancecopyDeep()deepCopy(OrderDiscountCodeStateSetMessage template) factory method to create a deep copy of OrderDiscountCodeStateSetMessage@NotNull @Valid DiscountCodeReferenceDiscountCode that changed due to the recalculation.DiscountCodeState before the recalculation.@NotNull DiscountCodeStategetState()DiscountCodeState after the recalculation.of()factory methodof(OrderDiscountCodeStateSetMessage template) factory method to create a shallow copy OrderDiscountCodeStateSetMessagevoidsetDiscountCode(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<OrderDiscountCodeStateSetMessage>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResourceMethods inherited from interface com.commercetools.api.models.DomainResource
getMethods 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, withMessageMethods 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
-
copyDeep
OrderDiscountCodeStateSetMessage copyDeep()- Specified by:
copyDeepin interfaceBaseResource- Specified by:
copyDeepin interfaceMessage- Specified by:
copyDeepin interfaceOrderMessage
-
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
-