Interface OrderTransitionLineItemStateAction
- All Superinterfaces:
OrderUpdateAction
,ResourceUpdateAction<OrderUpdateAction>
Produces the Line Item State Transition Message.
Example to create an instance using the builder pattern
OrderTransitionLineItemStateAction orderTransitionLineItemStateAction = OrderTransitionLineItemStateAction.builder()
.quantity(0.3)
.fromState(fromStateBuilder -> fromStateBuilder)
.toState(toStateBuilder -> toStateBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for OrderTransitionLineItemStateAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for OrderTransitionLineItemStateActionbuilder
(OrderTransitionLineItemStateAction template) create builder for OrderTransitionLineItemStateAction instancedeepCopy
(OrderTransitionLineItemStateAction template) factory method to create a deep copy of OrderTransitionLineItemStateActionDate 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
(OrderTransitionLineItemStateAction template) factory method to create a shallow copy OrderTransitionLineItemStateActionvoid
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<OrderTransitionLineItemStateAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.order.OrderUpdateAction
getAction, withOrderUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
TRANSITION_LINE_ITEM_STATE
discriminator value for OrderTransitionLineItemStateAction- 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 OrderTransitionLineItemStateAction
-
of
factory method to create a shallow copy OrderTransitionLineItemStateAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static OrderTransitionLineItemStateAction deepCopy(@Nullable OrderTransitionLineItemStateAction template) factory method to create a deep copy of OrderTransitionLineItemStateAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for OrderTransitionLineItemStateAction- Returns:
- builder
-
builder
static OrderTransitionLineItemStateActionBuilder builder(OrderTransitionLineItemStateAction template) create builder for OrderTransitionLineItemStateAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withOrderTransitionLineItemStateAction
default <T> T withOrderTransitionLineItemStateAction(Function<OrderTransitionLineItemStateAction, 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<OrderTransitionLineItemStateAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-