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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class WriteOffReason(str, enum.Enum):
    SMALL_BALANCE = "SMALL_BALANCE"
    NO_AUTH = "NO_AUTH"
    CODING = "CODING"
    CREDENTIALING = "CREDENTIALING"

    def visit(
        self,
        small_balance: typing.Callable[[], T_Result],
        no_auth: typing.Callable[[], T_Result],
        coding: typing.Callable[[], T_Result],
        credentialing: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is WriteOffReason.SMALL_BALANCE:
            return small_balance()
        if self is WriteOffReason.NO_AUTH:
            return no_auth()
        if self is WriteOffReason.CODING:
            return coding()
        if self is WriteOffReason.CREDENTIALING:
            return credentialing()
