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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class NotificationType(str, enum.Enum):
    INVOICE_APPROVAL_NEEDED = "INVOICE_APPROVAL_NEEDED"
    INVOICE_APPROVED = "INVOICE_APPROVED"
    INVOICE_REJECTED = "INVOICE_REJECTED"
    INVOICE_SCHEDULED = "INVOICE_SCHEDULED"
    INVOICE_PENDING = "INVOICE_PENDING"
    INVOICE_PAID = "INVOICE_PAID"
    INVOICE_CANCELED = "INVOICE_CANCELED"
    INVOICE_CREATED = "INVOICE_CREATED"
    INVOICE_EMAILED = "INVOICE_EMAILED"

    def visit(
        self,
        invoice_approval_needed: typing.Callable[[], T_Result],
        invoice_approved: typing.Callable[[], T_Result],
        invoice_rejected: typing.Callable[[], T_Result],
        invoice_scheduled: typing.Callable[[], T_Result],
        invoice_pending: typing.Callable[[], T_Result],
        invoice_paid: typing.Callable[[], T_Result],
        invoice_canceled: typing.Callable[[], T_Result],
        invoice_created: typing.Callable[[], T_Result],
        invoice_emailed: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is NotificationType.INVOICE_APPROVAL_NEEDED:
            return invoice_approval_needed()
        if self is NotificationType.INVOICE_APPROVED:
            return invoice_approved()
        if self is NotificationType.INVOICE_REJECTED:
            return invoice_rejected()
        if self is NotificationType.INVOICE_SCHEDULED:
            return invoice_scheduled()
        if self is NotificationType.INVOICE_PENDING:
            return invoice_pending()
        if self is NotificationType.INVOICE_PAID:
            return invoice_paid()
        if self is NotificationType.INVOICE_CANCELED:
            return invoice_canceled()
        if self is NotificationType.INVOICE_CREATED:
            return invoice_created()
        if self is NotificationType.INVOICE_EMAILED:
            return invoice_emailed()
