Interface StagedOrderTransitionLineItemStateAction
- All Superinterfaces:
ResourceUpdateAction<StagedOrderUpdateAction>
,StagedOrderUpdateAction
Produces the Line Item State Transition Message.
Example to create an instance using the builder pattern
StagedOrderTransitionLineItemStateAction stagedOrderTransitionLineItemStateAction = StagedOrderTransitionLineItemStateAction.builder()
.quantity(0.3)
.fromState(fromStateBuilder -> fromStateBuilder)
.toState(toStateBuilder -> toStateBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for StagedOrderTransitionLineItemStateAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for StagedOrderTransitionLineItemStateActioncreate builder for StagedOrderTransitionLineItemStateAction instancefactory method to create a deep copy of StagedOrderTransitionLineItemStateActionDate and time (UTC) to perform the State transition.@NotNull @Valid StateResourceIdentifier
State the Line Item should transition from.id
of the LineItem to update.key
of the LineItem to update.@NotNull Long
Number of Line Items that should transition State.@NotNull @Valid StateResourceIdentifier
State the Line Item should transition to.of()
factory methodof
(StagedOrderTransitionLineItemStateAction template) factory method to create a shallow copy StagedOrderTransitionLineItemStateActionvoid
setActualTransitionDate
(ZonedDateTime actualTransitionDate) Date and time (UTC) to perform the State transition.void
setFromState
(StateResourceIdentifier fromState) State the Line Item should transition from.void
setLineItemId
(String lineItemId) id
of the LineItem to update.void
setLineItemKey
(String lineItemKey) key
of the LineItem to update.void
setQuantity
(Long quantity) Number of Line Items that should transition State.void
setToState
(StateResourceIdentifier toState) State the Line Item should transition to.static com.fasterxml.jackson.core.type.TypeReference<StagedOrderTransitionLineItemStateAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withStagedOrderTransitionLineItemStateAction
(Function<StagedOrderTransitionLineItemStateAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
Methods inherited from interface com.commercetools.api.models.order.StagedOrderUpdateAction
getAction, withStagedOrderUpdateAction
-
Field Details
-
TRANSITION_LINE_ITEM_STATE
discriminator value for StagedOrderTransitionLineItemStateAction- See Also:
-
-
Method Details
-
getLineItemId
String getLineItemId()id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Returns:
- lineItemId
-
getLineItemKey
String getLineItemKey()key
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Returns:
- lineItemKey
-
getQuantity
Number of Line Items that should transition State.
- Returns:
- quantity
-
getFromState
State the Line Item should transition from.
- Returns:
- fromState
-
getToState
State the Line Item should transition to.
- Returns:
- toState
-
getActualTransitionDate
ZonedDateTime getActualTransitionDate()Date and time (UTC) to perform the State transition.
- Returns:
- actualTransitionDate
-
setLineItemId
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemId
- value to be set
-
setLineItemKey
key
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemKey
- value to be set
-
setQuantity
Number of Line Items that should transition State.
- Parameters:
quantity
- value to be set
-
setFromState
State the Line Item should transition from.
- Parameters:
fromState
- value to be set
-
setToState
State the Line Item should transition to.
- Parameters:
toState
- value to be set
-
setActualTransitionDate
Date and time (UTC) to perform the State transition.
- Parameters:
actualTransitionDate
- value to be set
-
of
factory method- Returns:
- instance of StagedOrderTransitionLineItemStateAction
-
of
static StagedOrderTransitionLineItemStateAction of(StagedOrderTransitionLineItemStateAction template) factory method to create a shallow copy StagedOrderTransitionLineItemStateAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static StagedOrderTransitionLineItemStateAction deepCopy(@Nullable StagedOrderTransitionLineItemStateAction template) factory method to create a deep copy of StagedOrderTransitionLineItemStateAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for StagedOrderTransitionLineItemStateAction- Returns:
- builder
-
builder
static StagedOrderTransitionLineItemStateActionBuilder builder(StagedOrderTransitionLineItemStateAction template) create builder for StagedOrderTransitionLineItemStateAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withStagedOrderTransitionLineItemStateAction
default <T> T withStagedOrderTransitionLineItemStateAction(Function<StagedOrderTransitionLineItemStateAction, 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<StagedOrderTransitionLineItemStateAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-