Class OrderStateTransitionMessagePayloadBuilder
java.lang.Object
com.commercetools.api.models.message.OrderStateTransitionMessagePayloadBuilder
- All Implemented Interfaces:
Builder<OrderStateTransitionMessagePayload>
public class OrderStateTransitionMessagePayloadBuilder
extends Object
implements Builder<OrderStateTransitionMessagePayload>
OrderStateTransitionMessagePayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
OrderStateTransitionMessagePayload orderStateTransitionMessagePayload = OrderStateTransitionMessagePayload.builder()
.state(stateBuilder -> stateBuilder)
.force(true)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds OrderStateTransitionMessagePayload with checking for non-null required valuesbuilds OrderStateTransitionMessagePayload without checking for non-null required valuesWhether State transition validations were turned off during the Transition State update action.getForce()
Whether State transition validations were turned off during the Transition State update action.OrderState before the Transition State update action.getState()
OrderState after the Transition State update action.of()
factory method for an instance of OrderStateTransitionMessagePayloadBuilderof
(OrderStateTransitionMessagePayload template) create builder for OrderStateTransitionMessagePayload instanceoldState
(StateReference oldState) OrderState before the Transition State update action.OrderState before the Transition State update action.state
(StateReference state) OrderState after the Transition State update action.OrderState after the Transition State update action.OrderState before the Transition State update action.withState
(Function<StateReferenceBuilder, StateReference> builder) OrderState after the Transition State update action.
-
Constructor Details
-
OrderStateTransitionMessagePayloadBuilder
public OrderStateTransitionMessagePayloadBuilder()
-
-
Method Details
-
state
public OrderStateTransitionMessagePayloadBuilder state(Function<StateReferenceBuilder, StateReferenceBuilder> builder) OrderState after the Transition State update action.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
public OrderStateTransitionMessagePayloadBuilder withState(Function<StateReferenceBuilder, StateReference> builder) OrderState after the Transition State update action.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
state
OrderState after the Transition State update action.
- Parameters:
state
- value to be set- Returns:
- Builder
-
oldState
public OrderStateTransitionMessagePayloadBuilder oldState(Function<StateReferenceBuilder, StateReferenceBuilder> builder) OrderState before the Transition State update action.
- Parameters:
builder
- function to build the oldState value- Returns:
- Builder
-
withOldState
public OrderStateTransitionMessagePayloadBuilder withOldState(Function<StateReferenceBuilder, StateReference> builder) OrderState before the Transition State update action.
- Parameters:
builder
- function to build the oldState value- Returns:
- Builder
-
oldState
OrderState before the Transition State update action.
- Parameters:
oldState
- value to be set- Returns:
- Builder
-
force
Whether State transition validations were turned off during the Transition State update action.
- Parameters:
force
- value to be set- Returns:
- Builder
-
getState
OrderState after the Transition State update action.
- Returns:
- state
-
getOldState
OrderState before the Transition State update action.
- Returns:
- oldState
-
getForce
Whether State transition validations were turned off during the Transition State update action.
- Returns:
- force
-
build
builds OrderStateTransitionMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<OrderStateTransitionMessagePayload>
- Returns:
- OrderStateTransitionMessagePayload
-
buildUnchecked
builds OrderStateTransitionMessagePayload without checking for non-null required values- Returns:
- OrderStateTransitionMessagePayload
-
of
factory method for an instance of OrderStateTransitionMessagePayloadBuilder- Returns:
- builder
-
of
public static OrderStateTransitionMessagePayloadBuilder of(OrderStateTransitionMessagePayload template) create builder for OrderStateTransitionMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-