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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .variance_object_invoice_items_data_item import VarianceObjectInvoiceItemsDataItem


class VarianceObjectInvoiceItems(UniversalBaseModel):
    """
    Invoice items for this catalog entry. Only included when expand=invoice_items is specified. Returns up to 10 items with pagination metadata.
    """

    data: typing.List[VarianceObjectInvoiceItemsDataItem] = pydantic.Field()
    """
    Array of invoice items (limited to 10)
    """

    has_more: bool = pydantic.Field()
    """
    Indicates if there are more invoice items beyond the returned limit
    """

    total_count: int = pydantic.Field()
    """
    Total number of invoice items for this catalog entry
    """

    url: typing.Optional[str] = pydantic.Field(default=None)
    """
    URL to fetch paginated invoice items. Only present when has_more is true.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
