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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for OrderTransitionLineItemStateAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for OrderTransitionLineItemStateActionbuilder(OrderTransitionLineItemStateAction template) create builder for OrderTransitionLineItemStateAction instancecopyDeep()deepCopy(OrderTransitionLineItemStateAction template) factory method to create a deep copy of OrderTransitionLineItemStateActionDate and time (UTC) to perform the State transition.@NotNull @Valid StateResourceIdentifierState the Line Item should transition from.idof the LineItem to update.keyof the LineItem to update.@NotNull LongNumber of Line Items that should transition State.@NotNull @Valid StateResourceIdentifierState the Line Item should transition to.of()factory methodof(OrderTransitionLineItemStateAction template) factory method to create a shallow copy OrderTransitionLineItemStateActionvoidsetActualTransitionDate(ZonedDateTime actualTransitionDate) Date and time (UTC) to perform the State transition.voidsetFromState(StateResourceIdentifier fromState) State the Line Item should transition from.voidsetLineItemId(String lineItemId) idof the LineItem to update.voidsetLineItemKey(String lineItemKey) keyof the LineItem to update.voidsetQuantity(Long quantity) Number of Line Items that should transition State.voidsetToState(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> Taccessor map functionMethods inherited from interface com.commercetools.api.models.order.OrderUpdateAction
getAction, withOrderUpdateActionMethods 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()idof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Returns:
- lineItemId
-
getLineItemKey
String getLineItemKey()keyof the LineItem to update. EitherlineItemIdorlineItemKeyis 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
idof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Parameters:
lineItemId- value to be set
-
setLineItemKey
keyof the LineItem to update. EitherlineItemIdorlineItemKeyis 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
-
copyDeep
OrderTransitionLineItemStateAction copyDeep()- Specified by:
copyDeepin interfaceOrderUpdateAction
-
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
-