Result

sealed interface Result

Represents the result of the pay order operation. It can be either a success with the order ID or a failure with specific reasons.

  • Success: The order was successfully paid.

  • Failure: The attempt to pay for the order failed, with specific reasons:

  • OrderNotFound: The specified order does not exist.

  • AlreadyPaid: The specified order has already been paid.

Inheritors

Types

Link copied to clipboard
sealed interface Failure : PayOrder.Result
Link copied to clipboard
data object Success : PayOrder.Result