Interface OrderTransitionCustomLineItemStateAction
- All Superinterfaces:
OrderUpdateAction,ResourceUpdateAction<OrderUpdateAction>
Produces the Custom Line Item State Transition Message.
Example to create an instance using the builder pattern
OrderTransitionCustomLineItemStateAction orderTransitionCustomLineItemStateAction = OrderTransitionCustomLineItemStateAction.builder()
.quantity(0.3)
.fromState(fromStateBuilder -> fromStateBuilder)
.toState(toStateBuilder -> toStateBuilder)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for OrderTransitionCustomLineItemStateAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for OrderTransitionCustomLineItemStateActioncreate builder for OrderTransitionCustomLineItemStateAction instancecopyDeep()factory method to create a deep copy of OrderTransitionCustomLineItemStateActionDate and time (UTC) to perform the State transition.idof the CustomLineItem to update.keyof the CustomLineItem to update.@NotNull @Valid StateResourceIdentifierState the Custom Line Item should transition from.@NotNull LongNumber of Custom Line Items that should transition State.@NotNull @Valid StateResourceIdentifierState the Custom Line Item should transition to.of()factory methodof(OrderTransitionCustomLineItemStateAction template) factory method to create a shallow copy OrderTransitionCustomLineItemStateActionvoidsetActualTransitionDate(ZonedDateTime actualTransitionDate) Date and time (UTC) to perform the State transition.voidsetCustomLineItemId(String customLineItemId) idof the CustomLineItem to update.voidsetCustomLineItemKey(String customLineItemKey) keyof the CustomLineItem to update.voidsetFromState(StateResourceIdentifier fromState) State the Custom Line Item should transition from.voidsetQuantity(Long quantity) Number of Custom Line Items that should transition State.voidsetToState(StateResourceIdentifier toState) State the Custom Line Item should transition to.static com.fasterxml.jackson.core.type.TypeReference<OrderTransitionCustomLineItemStateAction>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithOrderTransitionCustomLineItemStateAction(Function<OrderTransitionCustomLineItemStateAction, T> helper) accessor 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_CUSTOM_LINE_ITEM_STATE
discriminator value for OrderTransitionCustomLineItemStateAction- See Also:
-
-
Method Details
-
getCustomLineItemId
String getCustomLineItemId()idof the CustomLineItem to update. EithercustomLineItemIdorcustomLineItemKeyis required.- Returns:
- customLineItemId
-
getCustomLineItemKey
String getCustomLineItemKey()keyof the CustomLineItem to update. EithercustomLineItemIdorcustomLineItemKeyis required.- Returns:
- customLineItemKey
-
getQuantity
Number of Custom Line Items that should transition State.
- Returns:
- quantity
-
getFromState
State the Custom Line Item should transition from.
- Returns:
- fromState
-
getToState
State the Custom Line Item should transition to.
- Returns:
- toState
-
getActualTransitionDate
ZonedDateTime getActualTransitionDate()Date and time (UTC) to perform the State transition.
- Returns:
- actualTransitionDate
-
setCustomLineItemId
idof the CustomLineItem to update. EithercustomLineItemIdorcustomLineItemKeyis required.- Parameters:
customLineItemId- value to be set
-
setCustomLineItemKey
keyof the CustomLineItem to update. EithercustomLineItemIdorcustomLineItemKeyis required.- Parameters:
customLineItemKey- value to be set
-
setQuantity
Number of Custom Line Items that should transition State.
- Parameters:
quantity- value to be set
-
setFromState
State the Custom Line Item should transition from.
- Parameters:
fromState- value to be set
-
setToState
State the Custom 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 OrderTransitionCustomLineItemStateAction
-
of
static OrderTransitionCustomLineItemStateAction of(OrderTransitionCustomLineItemStateAction template) factory method to create a shallow copy OrderTransitionCustomLineItemStateAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
OrderTransitionCustomLineItemStateAction copyDeep()- Specified by:
copyDeepin interfaceOrderUpdateAction
-
deepCopy
@Nullable static OrderTransitionCustomLineItemStateAction deepCopy(@Nullable OrderTransitionCustomLineItemStateAction template) factory method to create a deep copy of OrderTransitionCustomLineItemStateAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for OrderTransitionCustomLineItemStateAction- Returns:
- builder
-
builder
static OrderTransitionCustomLineItemStateActionBuilder builder(OrderTransitionCustomLineItemStateAction template) create builder for OrderTransitionCustomLineItemStateAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withOrderTransitionCustomLineItemStateAction
default <T> T withOrderTransitionCustomLineItemStateAction(Function<OrderTransitionCustomLineItemStateAction, 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<OrderTransitionCustomLineItemStateAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-