"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .sortdirection import SortDirection
from apideck_unify.types import BaseModel
from apideck_unify.utils import FieldMetadata
from enum import Enum
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class PaymentsSortBy(str, Enum):
    r"""The field on which to sort the Payments"""

    UPDATED_AT = "updated_at"
    CREATED_AT = "created_at"


class PaymentsSortTypedDict(TypedDict):
    by: NotRequired[PaymentsSortBy]
    r"""The field on which to sort the Payments"""
    direction: NotRequired[SortDirection]
    r"""The direction in which to sort the results"""


class PaymentsSort(BaseModel):
    by: Annotated[Optional[PaymentsSortBy], FieldMetadata(query=True)] = None
    r"""The field on which to sort the Payments"""

    direction: Annotated[Optional[SortDirection], FieldMetadata(query=True)] = (
        SortDirection.ASC
    )
    r"""The direction in which to sort the results"""
