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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class DoNotInvoiceReason(str, enum.Enum):
    BANKRUPTCY = "BANKRUPTCY"
    DECEASED = "DECEASED"
    HARDSHIP = "HARDSHIP"
    OTHER = "OTHER"

    def visit(
        self,
        bankruptcy: typing.Callable[[], T_Result],
        deceased: typing.Callable[[], T_Result],
        hardship: typing.Callable[[], T_Result],
        other: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is DoNotInvoiceReason.BANKRUPTCY:
            return bankruptcy()
        if self is DoNotInvoiceReason.DECEASED:
            return deceased()
        if self is DoNotInvoiceReason.HARDSHIP:
            return hardship()
        if self is DoNotInvoiceReason.OTHER:
            return other()
