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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for StagedOrderTransitionLineItemStateAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for StagedOrderTransitionLineItemStateActioncreate builder for StagedOrderTransitionLineItemStateAction instancecopyDeep()factory method to create a deep copy of StagedOrderTransitionLineItemStateActionDate 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(StagedOrderTransitionLineItemStateAction template) factory method to create a shallow copy StagedOrderTransitionLineItemStateActionvoidsetActualTransitionDate(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<StagedOrderTransitionLineItemStateAction>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithStagedOrderTransitionLineItemStateAction(Function<StagedOrderTransitionLineItemStateAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
getMethods 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()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 StagedOrderTransitionLineItemStateAction
-
of
static StagedOrderTransitionLineItemStateAction of(StagedOrderTransitionLineItemStateAction template) factory method to create a shallow copy StagedOrderTransitionLineItemStateAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
StagedOrderTransitionLineItemStateAction copyDeep()- Specified by:
copyDeepin interfaceStagedOrderUpdateAction
-
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
-