Interface PaymentTransitionStateAction
- All Superinterfaces:
PaymentUpdateAction
,ResourceUpdateAction<PaymentUpdateAction>
- All Known Implementing Classes:
PaymentTransitionStateActionImpl
If the Payment has no current State, initial
must be true
for the new State. If the existing State has transitions set, the new State must be a valid transition. If the existing State has no transitions set, no validations are performed when transitioning to the new State.
Transitioning the State of a Payment produces the PaymentStatusStateTransition Message.
Example to create an instance using the builder pattern
PaymentTransitionStateAction paymentTransitionStateAction = PaymentTransitionStateAction.builder()
.state(stateBuilder -> stateBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for PaymentTransitionStateAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for PaymentTransitionStateActionbuilder
(PaymentTransitionStateAction template) create builder for PaymentTransitionStateAction instancestatic PaymentTransitionStateAction
deepCopy
(PaymentTransitionStateAction template) factory method to create a deep copy of PaymentTransitionStateActiongetForce()
Set totrue
to skip validations when transitioning to the new State.@NotNull @Valid StateResourceIdentifier
getState()
ResourceIdentifier to a State.static PaymentTransitionStateAction
of()
factory methodstatic PaymentTransitionStateAction
of
(PaymentTransitionStateAction template) factory method to create a shallow copy PaymentTransitionStateActionvoid
Set totrue
to skip validations when transitioning to the new State.void
setState
(StateResourceIdentifier state) ResourceIdentifier to a State.static com.fasterxml.jackson.core.type.TypeReference<PaymentTransitionStateAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.payment.PaymentUpdateAction
getAction, withPaymentUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
TRANSITION_STATE
discriminator value for PaymentTransitionStateAction- See Also:
-
-
Method Details
-
getState
ResourceIdentifier to a State.
- Returns:
- state
-
getForce
Boolean getForce()Set to
true
to skip validations when transitioning to the new State.- Returns:
- force
-
setState
ResourceIdentifier to a State.
- Parameters:
state
- value to be set
-
setForce
Set to
true
to skip validations when transitioning to the new State.- Parameters:
force
- value to be set
-
of
factory method- Returns:
- instance of PaymentTransitionStateAction
-
of
factory method to create a shallow copy PaymentTransitionStateAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static PaymentTransitionStateAction deepCopy(@Nullable PaymentTransitionStateAction template) factory method to create a deep copy of PaymentTransitionStateAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for PaymentTransitionStateAction- Returns:
- builder
-
builder
create builder for PaymentTransitionStateAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withPaymentTransitionStateAction
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-