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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class InvoiceOrderByField(str, enum.Enum):
    AMOUNT = "AMOUNT"
    DUE_DATE = "DUE_DATE"
    CREATED_AT = "CREATED_AT"
    UPDATED_AT = "UPDATED_AT"
    INVOICE_NUMBER = "INVOICE_NUMBER"
    VENDOR_NAME = "VENDOR_NAME"
    PAYER_NAME = "PAYER_NAME"

    def visit(
        self,
        amount: typing.Callable[[], T_Result],
        due_date: typing.Callable[[], T_Result],
        created_at: typing.Callable[[], T_Result],
        updated_at: typing.Callable[[], T_Result],
        invoice_number: typing.Callable[[], T_Result],
        vendor_name: typing.Callable[[], T_Result],
        payer_name: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is InvoiceOrderByField.AMOUNT:
            return amount()
        if self is InvoiceOrderByField.DUE_DATE:
            return due_date()
        if self is InvoiceOrderByField.CREATED_AT:
            return created_at()
        if self is InvoiceOrderByField.UPDATED_AT:
            return updated_at()
        if self is InvoiceOrderByField.INVOICE_NUMBER:
            return invoice_number()
        if self is InvoiceOrderByField.VENDOR_NAME:
            return vendor_name()
        if self is InvoiceOrderByField.PAYER_NAME:
            return payer_name()
