Interface PaymentTransitionStateAction
- All Superinterfaces:
PaymentUpdateAction,ResourceUpdateAction<PaymentUpdateAction>
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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for PaymentTransitionStateAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for PaymentTransitionStateActionbuilder(PaymentTransitionStateAction template) create builder for PaymentTransitionStateAction instancecopyDeep()static PaymentTransitionStateActiondeepCopy(PaymentTransitionStateAction template) factory method to create a deep copy of PaymentTransitionStateActiongetForce()Set totrueto skip validations when transitioning to the new State.@NotNull @Valid StateResourceIdentifiergetState()ResourceIdentifier to a State.static PaymentTransitionStateActionof()factory methodstatic PaymentTransitionStateActionof(PaymentTransitionStateAction template) factory method to create a shallow copy PaymentTransitionStateActionvoidSet totrueto skip validations when transitioning to the new State.voidsetState(StateResourceIdentifier state) ResourceIdentifier to a State.static com.fasterxml.jackson.core.type.TypeReference<PaymentTransitionStateAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.payment.PaymentUpdateAction
getAction, withPaymentUpdateActionMethods 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
trueto skip validations when transitioning to the new State.- Returns:
- force
-
setState
ResourceIdentifier to a State.
- Parameters:
state- value to be set
-
setForce
Set to
trueto 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
-
copyDeep
PaymentTransitionStateAction copyDeep()- Specified by:
copyDeepin interfacePaymentUpdateAction
-
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
-