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
Modifier and TypeFieldDescriptionstatic final String
discriminator value for OrderTransitionCustomLineItemStateAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for OrderTransitionCustomLineItemStateActioncreate builder for OrderTransitionCustomLineItemStateAction instancefactory method to create a deep copy of OrderTransitionCustomLineItemStateActionDate and time (UTC) to perform the State transition.id
of the CustomLineItem to update.key
of the CustomLineItem to update.@NotNull @Valid StateResourceIdentifier
State the Custom Line Item should transition from.@NotNull Long
Number of Custom Line Items that should transition State.@NotNull @Valid StateResourceIdentifier
State the Custom Line Item should transition to.of()
factory methodof
(OrderTransitionCustomLineItemStateAction template) factory method to create a shallow copy OrderTransitionCustomLineItemStateActionvoid
setActualTransitionDate
(ZonedDateTime actualTransitionDate) Date and time (UTC) to perform the State transition.void
setCustomLineItemId
(String customLineItemId) id
of the CustomLineItem to update.void
setCustomLineItemKey
(String customLineItemKey) key
of the CustomLineItem to update.void
setFromState
(StateResourceIdentifier fromState) State the Custom Line Item should transition from.void
setQuantity
(Long quantity) Number of Custom Line Items that should transition State.void
setToState
(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> T
withOrderTransitionCustomLineItemStateAction
(Function<OrderTransitionCustomLineItemStateAction, T> helper) 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_CUSTOM_LINE_ITEM_STATE
discriminator value for OrderTransitionCustomLineItemStateAction- See Also:
-
-
Method Details
-
getCustomLineItemId
String getCustomLineItemId()id
of the CustomLineItem to update. EithercustomLineItemId
orcustomLineItemKey
is required.- Returns:
- customLineItemId
-
getCustomLineItemKey
String getCustomLineItemKey()key
of the CustomLineItem to update. EithercustomLineItemId
orcustomLineItemKey
is 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
id
of the CustomLineItem to update. EithercustomLineItemId
orcustomLineItemKey
is required.- Parameters:
customLineItemId
- value to be set
-
setCustomLineItemKey
key
of the CustomLineItem to update. EithercustomLineItemId
orcustomLineItemKey
is 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
-
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
-