Class OrderTransitionLineItemStateActionBuilder
- All Implemented Interfaces:
Builder<OrderTransitionLineItemStateAction>
Example to create an instance using the builder pattern
OrderTransitionLineItemStateAction orderTransitionLineItemStateAction = OrderTransitionLineItemStateAction.builder()
.quantity(0.3)
.fromState(fromStateBuilder -> fromStateBuilder)
.toState(toStateBuilder -> toStateBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactualTransitionDate
(ZonedDateTime actualTransitionDate) Date and time (UTC) to perform the State transition.build()
builds OrderTransitionLineItemStateAction with checking for non-null required valuesbuilds OrderTransitionLineItemStateAction without checking for non-null required valuesfromState
(StateResourceIdentifier fromState) State the Line Item should transition from.State the Line Item should transition from.Date and time (UTC) to perform the State transition.State the Line Item should transition from.id
of the LineItem to update.key
of the LineItem to update.Number of Line Items that should transition State.State the Line Item should transition to.lineItemId
(String lineItemId) id
of the LineItem to update.lineItemKey
(String lineItemKey) key
of the LineItem to update.of()
factory method for an instance of OrderTransitionLineItemStateActionBuilderof
(OrderTransitionLineItemStateAction template) create builder for OrderTransitionLineItemStateAction instanceNumber of Line Items that should transition State.toState
(StateResourceIdentifier toState) State the Line Item should transition to.State the Line Item should transition to.State the Line Item should transition from.State the Line Item should transition to.
-
Constructor Details
-
OrderTransitionLineItemStateActionBuilder
public OrderTransitionLineItemStateActionBuilder()
-
-
Method Details
-
lineItemId
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemId
- value to be set- Returns:
- Builder
-
lineItemKey
key
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemKey
- value to be set- Returns:
- Builder
-
quantity
Number of Line Items that should transition State.
- Parameters:
quantity
- value to be set- Returns:
- Builder
-
fromState
public OrderTransitionLineItemStateActionBuilder fromState(Function<StateResourceIdentifierBuilder, StateResourceIdentifierBuilder> builder) State the Line Item should transition from.
- Parameters:
builder
- function to build the fromState value- Returns:
- Builder
-
withFromState
public OrderTransitionLineItemStateActionBuilder withFromState(Function<StateResourceIdentifierBuilder, StateResourceIdentifier> builder) State the Line Item should transition from.
- Parameters:
builder
- function to build the fromState value- Returns:
- Builder
-
fromState
State the Line Item should transition from.
- Parameters:
fromState
- value to be set- Returns:
- Builder
-
toState
public OrderTransitionLineItemStateActionBuilder toState(Function<StateResourceIdentifierBuilder, StateResourceIdentifierBuilder> builder) State the Line Item should transition to.
- Parameters:
builder
- function to build the toState value- Returns:
- Builder
-
withToState
public OrderTransitionLineItemStateActionBuilder withToState(Function<StateResourceIdentifierBuilder, StateResourceIdentifier> builder) State the Line Item should transition to.
- Parameters:
builder
- function to build the toState value- Returns:
- Builder
-
toState
State the Line Item should transition to.
- Parameters:
toState
- value to be set- Returns:
- Builder
-
actualTransitionDate
public OrderTransitionLineItemStateActionBuilder actualTransitionDate(@Nullable ZonedDateTime actualTransitionDate) Date and time (UTC) to perform the State transition.
- Parameters:
actualTransitionDate
- value to be set- Returns:
- Builder
-
getLineItemId
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Returns:
- lineItemId
-
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
Date and time (UTC) to perform the State transition.
- Returns:
- actualTransitionDate
-
build
builds OrderTransitionLineItemStateAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<OrderTransitionLineItemStateAction>
- Returns:
- OrderTransitionLineItemStateAction
-
buildUnchecked
builds OrderTransitionLineItemStateAction without checking for non-null required values- Returns:
- OrderTransitionLineItemStateAction
-
of
factory method for an instance of OrderTransitionLineItemStateActionBuilder- Returns:
- builder
-
of
public static OrderTransitionLineItemStateActionBuilder of(OrderTransitionLineItemStateAction template) create builder for OrderTransitionLineItemStateAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-