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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class InvoiceMetricsPerDateGroupBy(str, enum.Enum):
    CREATION_DATE = "CREATION_DATE"
    DUE_DATE = "DUE_DATE"
    INVOICE_DATE = "INVOICE_DATE"
    DEDUCTION_DATE = "DEDUCTION_DATE"

    def visit(
        self,
        creation_date: typing.Callable[[], T_Result],
        due_date: typing.Callable[[], T_Result],
        invoice_date: typing.Callable[[], T_Result],
        deduction_date: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is InvoiceMetricsPerDateGroupBy.CREATION_DATE:
            return creation_date()
        if self is InvoiceMetricsPerDateGroupBy.DUE_DATE:
            return due_date()
        if self is InvoiceMetricsPerDateGroupBy.INVOICE_DATE:
            return invoice_date()
        if self is InvoiceMetricsPerDateGroupBy.DEDUCTION_DATE:
            return deduction_date()
