Class OrderTransitionStateActionBuilder
java.lang.Object
com.commercetools.api.models.order.OrderTransitionStateActionBuilder
- All Implemented Interfaces:
Builder<OrderTransitionStateAction>
public class OrderTransitionStateActionBuilder
extends Object
implements Builder<OrderTransitionStateAction>
OrderTransitionStateActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
OrderTransitionStateAction orderTransitionStateAction = OrderTransitionStateAction.builder()
.state(stateBuilder -> stateBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds OrderTransitionStateAction with checking for non-null required valuesbuilds OrderTransitionStateAction without checking for non-null required valuesSet totrue
to turn off validation.getForce()
Set totrue
to turn off validation.getState()
Value to set.of()
factory method for an instance of OrderTransitionStateActionBuilderof
(OrderTransitionStateAction template) create builder for OrderTransitionStateAction instancestate
(StateResourceIdentifier state) Value to set.Value to set.Value to set.
-
Constructor Details
-
OrderTransitionStateActionBuilder
public OrderTransitionStateActionBuilder()
-
-
Method Details
-
state
public OrderTransitionStateActionBuilder state(Function<StateResourceIdentifierBuilder, StateResourceIdentifierBuilder> builder) Value to set. If there is no State yet, the new State must be an initial State.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
public OrderTransitionStateActionBuilder withState(Function<StateResourceIdentifierBuilder, StateResourceIdentifier> builder) Value to set. If there is no State yet, the new State must be an initial State.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
state
Value to set. If there is no State yet, the new State must be an initial State.
- Parameters:
state
- value to be set- Returns:
- Builder
-
force
Set to
true
to turn off validation.- Parameters:
force
- value to be set- Returns:
- Builder
-
getState
Value to set. If there is no State yet, the new State must be an initial State.
- Returns:
- state
-
getForce
Set to
true
to turn off validation.- Returns:
- force
-
build
builds OrderTransitionStateAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<OrderTransitionStateAction>
- Returns:
- OrderTransitionStateAction
-
buildUnchecked
builds OrderTransitionStateAction without checking for non-null required values- Returns:
- OrderTransitionStateAction
-
of
factory method for an instance of OrderTransitionStateActionBuilder- Returns:
- builder
-
of
create builder for OrderTransitionStateAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-