# This file was auto-generated by Fern from our API Definition.

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class PaymentMethodBalanceStatus(str, enum.Enum):
    AVAILABLE = "AVAILABLE"
    UNAVAILABLE = "UNAVAILABLE"
    ERROR = "ERROR"

    def visit(
        self,
        available: typing.Callable[[], T_Result],
        unavailable: typing.Callable[[], T_Result],
        error: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is PaymentMethodBalanceStatus.AVAILABLE:
            return available()
        if self is PaymentMethodBalanceStatus.UNAVAILABLE:
            return unavailable()
        if self is PaymentMethodBalanceStatus.ERROR:
            return error()
