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

import typing_extensions
import typing_extensions
from .search_orders_state_filter import SearchOrdersStateFilterParams
from .search_orders_date_time_filter import SearchOrdersDateTimeFilterParams
from .search_orders_fulfillment_filter import SearchOrdersFulfillmentFilterParams
from .search_orders_source_filter import SearchOrdersSourceFilterParams
from .search_orders_customer_filter import SearchOrdersCustomerFilterParams


class SearchOrdersFilterParams(typing_extensions.TypedDict):
    """
    Filtering criteria to use for a `SearchOrders` request. Multiple filters
    are ANDed together.
    """

    state_filter: typing_extensions.NotRequired[SearchOrdersStateFilterParams]
    """
    Filter by [OrderState](entity:OrderState).
    """

    date_time_filter: typing_extensions.NotRequired[SearchOrdersDateTimeFilterParams]
    """
    Filter for results within a time range.
    
    __Important:__ If you filter for orders by time range, you must set `SearchOrdersSort`
    to sort by the same field.
    [Learn more about filtering orders by time range.](https://developer.squareup.com/docs/orders-api/manage-orders/search-orders#important-note-about-filtering-orders-by-time-range)
    """

    fulfillment_filter: typing_extensions.NotRequired[SearchOrdersFulfillmentFilterParams]
    """
    Filter by the fulfillment type or state.
    """

    source_filter: typing_extensions.NotRequired[SearchOrdersSourceFilterParams]
    """
    Filter by the source of the order.
    """

    customer_filter: typing_extensions.NotRequired[SearchOrdersCustomerFilterParams]
    """
    Filter by customers associated with the order.
    """
