Interface CustomLineItemStateTransitionMessagePayload
- All Superinterfaces:
MessagePayload
,MessagePayloadMixin
,OrderMessagePayload
Generated after a successful Transition CustomLineItem State update action.
Example to create an instance using the builder pattern
CustomLineItemStateTransitionMessagePayload customLineItemStateTransitionMessagePayload = CustomLineItemStateTransitionMessagePayload.builder()
.customLineItemId("{customLineItemId}")
.transitionDate(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.quantity(0.3)
.fromState(fromStateBuilder -> fromStateBuilder)
.toState(toStateBuilder -> toStateBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for CustomLineItemStateTransitionMessagePayload -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CustomLineItemStateTransitionMessagePayloadcreate builder for CustomLineItemStateTransitionMessagePayload instancefactory method to create a deep copy of CustomLineItemStateTransitionMessagePayload@NotNull String
Unique identifier of the Custom Line Item.User-defined unique identifier of the Custom Line Item.@NotNull @Valid StateReference
State the Custom Line Item was transitioned from.@NotNull Long
Number of Custom Line Items for which the State was transitioned.@NotNull @Valid StateReference
State the Custom Line Item was transitioned to.@NotNull ZonedDateTime
Date and time (UTC) the transition of the Custom Line Item State was performed.of()
factory methodfactory method to create a shallow copy CustomLineItemStateTransitionMessagePayloadvoid
setCustomLineItemId
(String customLineItemId) Unique identifier of the Custom Line Item.void
setCustomLineItemKey
(String customLineItemKey) User-defined unique identifier of the Custom Line Item.void
setFromState
(StateReference fromState) State the Custom Line Item was transitioned from.void
setQuantity
(Long quantity) Number of Custom Line Items for which the State was transitioned.void
setToState
(StateReference toState) State the Custom Line Item was transitioned to.void
setTransitionDate
(ZonedDateTime transitionDate) Date and time (UTC) the transition of the Custom Line Item State was performed.static com.fasterxml.jackson.core.type.TypeReference<CustomLineItemStateTransitionMessagePayload>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withCustomLineItemStateTransitionMessagePayload
(Function<CustomLineItemStateTransitionMessagePayload, 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
-
CUSTOM_LINE_ITEM_STATE_TRANSITION
discriminator value for CustomLineItemStateTransitionMessagePayload- See Also:
-
-
Method Details
-
getCustomLineItemId
Unique identifier of the Custom Line Item.
- Returns:
- customLineItemId
-
getCustomLineItemKey
String getCustomLineItemKey()User-defined unique identifier of the Custom Line Item.
- Returns:
- customLineItemKey
-
getTransitionDate
Date and time (UTC) the transition of the Custom Line Item State was performed.
- Returns:
- transitionDate
-
getQuantity
Number of Custom Line Items for which the State was transitioned.
- Returns:
- quantity
-
getFromState
State the Custom Line Item was transitioned from.
- Returns:
- fromState
-
getToState
State the Custom Line Item was transitioned to.
- Returns:
- toState
-
setCustomLineItemId
Unique identifier of the Custom Line Item.
- Parameters:
customLineItemId
- value to be set
-
setCustomLineItemKey
User-defined unique identifier of the Custom Line Item.
- Parameters:
customLineItemKey
- value to be set
-
setTransitionDate
Date and time (UTC) the transition of the Custom Line Item State was performed.
- Parameters:
transitionDate
- value to be set
-
setQuantity
Number of Custom Line Items for which the State was transitioned.
- Parameters:
quantity
- value to be set
-
setFromState
State the Custom Line Item was transitioned from.
- Parameters:
fromState
- value to be set
-
setToState
State the Custom Line Item was transitioned to.
- Parameters:
toState
- value to be set
-
of
factory method- Returns:
- instance of CustomLineItemStateTransitionMessagePayload
-
of
static CustomLineItemStateTransitionMessagePayload of(CustomLineItemStateTransitionMessagePayload template) factory method to create a shallow copy CustomLineItemStateTransitionMessagePayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static CustomLineItemStateTransitionMessagePayload deepCopy(@Nullable CustomLineItemStateTransitionMessagePayload template) factory method to create a deep copy of CustomLineItemStateTransitionMessagePayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CustomLineItemStateTransitionMessagePayload- Returns:
- builder
-
builder
static CustomLineItemStateTransitionMessagePayloadBuilder builder(CustomLineItemStateTransitionMessagePayload template) create builder for CustomLineItemStateTransitionMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCustomLineItemStateTransitionMessagePayload
default <T> T withCustomLineItemStateTransitionMessagePayload(Function<CustomLineItemStateTransitionMessagePayload, 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<CustomLineItemStateTransitionMessagePayload> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-