Class StagedOrderTransitionLineItemStateActionBuilder
- All Implemented Interfaces:
Builder<StagedOrderTransitionLineItemStateAction>
Example to create an instance using the builder pattern
StagedOrderTransitionLineItemStateAction stagedOrderTransitionLineItemStateAction = StagedOrderTransitionLineItemStateAction.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 StagedOrderTransitionLineItemStateAction with checking for non-null required valuesbuilds StagedOrderTransitionLineItemStateAction 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 StagedOrderTransitionLineItemStateActionBuilderof
(StagedOrderTransitionLineItemStateAction template) create builder for StagedOrderTransitionLineItemStateAction 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
-
StagedOrderTransitionLineItemStateActionBuilder
public StagedOrderTransitionLineItemStateActionBuilder()
-
-
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 StagedOrderTransitionLineItemStateActionBuilder fromState(Function<StateResourceIdentifierBuilder, StateResourceIdentifierBuilder> builder) State the Line Item should transition from.
- Parameters:
builder
- function to build the fromState value- Returns:
- Builder
-
withFromState
public StagedOrderTransitionLineItemStateActionBuilder 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 StagedOrderTransitionLineItemStateActionBuilder toState(Function<StateResourceIdentifierBuilder, StateResourceIdentifierBuilder> builder) State the Line Item should transition to.
- Parameters:
builder
- function to build the toState value- Returns:
- Builder
-
withToState
public StagedOrderTransitionLineItemStateActionBuilder 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 StagedOrderTransitionLineItemStateActionBuilder 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 StagedOrderTransitionLineItemStateAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<StagedOrderTransitionLineItemStateAction>
- Returns:
- StagedOrderTransitionLineItemStateAction
-
buildUnchecked
builds StagedOrderTransitionLineItemStateAction without checking for non-null required values- Returns:
- StagedOrderTransitionLineItemStateAction
-
of
factory method for an instance of StagedOrderTransitionLineItemStateActionBuilder- Returns:
- builder
-
of
public static StagedOrderTransitionLineItemStateActionBuilder of(StagedOrderTransitionLineItemStateAction template) create builder for StagedOrderTransitionLineItemStateAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-