Interface LineItemStateTransitionMessagePayload
- All Superinterfaces:
MessagePayload
,MessagePayloadMixin
,OrderMessagePayload
Generated after a successful Transition LineItem State update action.
Example to create an instance using the builder pattern
LineItemStateTransitionMessagePayload lineItemStateTransitionMessagePayload = LineItemStateTransitionMessagePayload.builder()
.lineItemId("{lineItemId}")
.transitionDate(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.quantity(0.3)
.fromState(fromStateBuilder -> fromStateBuilder)
.toState(toStateBuilder -> toStateBuilder)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
discriminator value for LineItemStateTransitionMessagePayload -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for LineItemStateTransitionMessagePayloadbuilder
(LineItemStateTransitionMessagePayload template) create builder for LineItemStateTransitionMessagePayload instancecopyDeep()
factory method to create a deep copy of LineItemStateTransitionMessagePayload@NotNull @Valid StateReference
@NotNull String
Unique identifier of the Line Item.User-defined unique identifier of the LineItem.@NotNull Long
Number of Line Items for which the State was transitioned.@NotNull @Valid StateReference
@NotNull ZonedDateTime
of()
factory methodof
(LineItemStateTransitionMessagePayload template) factory method to create a shallow copy LineItemStateTransitionMessagePayloadvoid
setFromState
(StateReference fromState) void
setLineItemId
(String lineItemId) Unique identifier of the Line Item.void
setLineItemKey
(String lineItemKey) User-defined unique identifier of the LineItem.void
setQuantity
(Long quantity) Number of Line Items for which the State was transitioned.void
setToState
(StateReference toState) void
setTransitionDate
(ZonedDateTime transitionDate) static com.fasterxml.jackson.core.type.TypeReference<LineItemStateTransitionMessagePayload>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
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
-
LINE_ITEM_STATE_TRANSITION
discriminator value for LineItemStateTransitionMessagePayload- See Also:
-
-
Method Details
-
getLineItemId
Unique identifier of the Line Item.
- Returns:
- lineItemId
-
getLineItemKey
String getLineItemKey()User-defined unique identifier of the LineItem.
- Returns:
- lineItemKey
-
getTransitionDate
- Returns:
- transitionDate
-
getQuantity
Number of Line Items for which the State was transitioned.
- Returns:
- quantity
-
getFromState
- Returns:
- fromState
-
getToState
- Returns:
- toState
-
setLineItemId
Unique identifier of the Line Item.
- Parameters:
lineItemId
- value to be set
-
setLineItemKey
User-defined unique identifier of the LineItem.
- Parameters:
lineItemKey
- value to be set
-
setTransitionDate
- Parameters:
transitionDate
- value to be set
-
setQuantity
Number of Line Items for which the State was transitioned.
- Parameters:
quantity
- value to be set
-
setFromState
- Parameters:
fromState
- value to be set
-
setToState
- Parameters:
toState
- value to be set
-
of
factory method- Returns:
- instance of LineItemStateTransitionMessagePayload
-
of
factory method to create a shallow copy LineItemStateTransitionMessagePayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
copyDeep
LineItemStateTransitionMessagePayload copyDeep()- Specified by:
copyDeep
in interfaceMessagePayload
- Specified by:
copyDeep
in interfaceOrderMessagePayload
-
deepCopy
@Nullable static LineItemStateTransitionMessagePayload deepCopy(@Nullable LineItemStateTransitionMessagePayload template) factory method to create a deep copy of LineItemStateTransitionMessagePayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for LineItemStateTransitionMessagePayload- Returns:
- builder
-
builder
static LineItemStateTransitionMessagePayloadBuilder builder(LineItemStateTransitionMessagePayload template) create builder for LineItemStateTransitionMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withLineItemStateTransitionMessagePayload
default <T> T withLineItemStateTransitionMessagePayload(Function<LineItemStateTransitionMessagePayload, 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<LineItemStateTransitionMessagePayload> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-