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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class PaymentMethodSchemaFieldType(str, enum.Enum):
    TEXT = "text"
    NUMBER = "number"
    SELECT = "select"

    def visit(
        self,
        text: typing.Callable[[], T_Result],
        number: typing.Callable[[], T_Result],
        select: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is PaymentMethodSchemaFieldType.TEXT:
            return text()
        if self is PaymentMethodSchemaFieldType.NUMBER:
            return number()
        if self is PaymentMethodSchemaFieldType.SELECT:
            return select()
