Class PaymentTransitionStateActionBuilder
java.lang.Object
com.commercetools.api.models.payment.PaymentTransitionStateActionBuilder
- All Implemented Interfaces:
Builder<PaymentTransitionStateAction>
public class PaymentTransitionStateActionBuilder
extends Object
implements Builder<PaymentTransitionStateAction>
PaymentTransitionStateActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
PaymentTransitionStateAction paymentTransitionStateAction = PaymentTransitionStateAction.builder()
.state(stateBuilder -> stateBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds PaymentTransitionStateAction with checking for non-null required valuesbuilds PaymentTransitionStateAction without checking for non-null required valuesSet totrue
to skip validations when transitioning to the new State.getForce()
Set totrue
to skip validations when transitioning to the new State.getState()
ResourceIdentifier to a State.of()
factory method for an instance of PaymentTransitionStateActionBuilderof
(PaymentTransitionStateAction template) create builder for PaymentTransitionStateAction instancestate
(StateResourceIdentifier state) ResourceIdentifier to a State.ResourceIdentifier to a State.ResourceIdentifier to a State.
-
Constructor Details
-
PaymentTransitionStateActionBuilder
public PaymentTransitionStateActionBuilder()
-
-
Method Details
-
state
public PaymentTransitionStateActionBuilder state(Function<StateResourceIdentifierBuilder, StateResourceIdentifierBuilder> builder) ResourceIdentifier to a State.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
public PaymentTransitionStateActionBuilder withState(Function<StateResourceIdentifierBuilder, StateResourceIdentifier> builder) ResourceIdentifier to a State.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
state
ResourceIdentifier to a State.
- Parameters:
state
- value to be set- Returns:
- Builder
-
force
Set to
true
to skip validations when transitioning to the new State.- Parameters:
force
- value to be set- Returns:
- Builder
-
getState
ResourceIdentifier to a State.
- Returns:
- state
-
getForce
Set to
true
to skip validations when transitioning to the new State.- Returns:
- force
-
build
builds PaymentTransitionStateAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<PaymentTransitionStateAction>
- Returns:
- PaymentTransitionStateAction
-
buildUnchecked
builds PaymentTransitionStateAction without checking for non-null required values- Returns:
- PaymentTransitionStateAction
-
of
factory method for an instance of PaymentTransitionStateActionBuilder- Returns:
- builder
-
of
create builder for PaymentTransitionStateAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-