Interface PaymentTransitionStateAction

All Superinterfaces:
PaymentUpdateAction, ResourceUpdateAction<PaymentUpdateAction>
All Known Implementing Classes:
PaymentTransitionStateActionImpl

public interface PaymentTransitionStateAction extends 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 Details

    • TRANSITION_STATE

      static final String TRANSITION_STATE
      discriminator value for PaymentTransitionStateAction
      See Also:
  • Method Details

    • getState

      @NotNull @Valid @NotNull @Valid StateResourceIdentifier 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

      void setState(StateResourceIdentifier state)

      ResourceIdentifier to a State.

      Parameters:
      state - value to be set
    • setForce

      void setForce(Boolean force)

      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

      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

      default <T> T withPaymentTransitionStateAction(Function<PaymentTransitionStateAction,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<PaymentTransitionStateAction> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference