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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class PaymentMethodType(str, enum.Enum):
    CUSTOM = "custom"
    CHECK = "check"
    BANK_ACCOUNT = "bankAccount"
    NA = "na"
    CARD = "card"
    BNPL = "bnpl"
    VIRTUAL_CARD = "virtualCard"

    def visit(
        self,
        custom: typing.Callable[[], T_Result],
        check: typing.Callable[[], T_Result],
        bank_account: typing.Callable[[], T_Result],
        na: typing.Callable[[], T_Result],
        card: typing.Callable[[], T_Result],
        bnpl: typing.Callable[[], T_Result],
        virtual_card: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is PaymentMethodType.CUSTOM:
            return custom()
        if self is PaymentMethodType.CHECK:
            return check()
        if self is PaymentMethodType.BANK_ACCOUNT:
            return bank_account()
        if self is PaymentMethodType.NA:
            return na()
        if self is PaymentMethodType.CARD:
            return card()
        if self is PaymentMethodType.BNPL:
            return bnpl()
        if self is PaymentMethodType.VIRTUAL_CARD:
            return virtual_card()
