# 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"
    INVOICE_NUMBER = "INVOICE_NUMBER"

    def visit(
        self,
        amount: typing.Callable[[], T_Result],
        due_date: typing.Callable[[], T_Result],
        created_at: typing.Callable[[], T_Result],
        invoice_number: 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.INVOICE_NUMBER:
            return invoice_number()
