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

import datetime as dt
import typing

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


class InvoiceResponseData(UniversalBaseModel):
    amount_due: int
    amount_paid: int
    amount_remaining: int
    collection_method: str
    company_id: typing.Optional[str] = None
    created_at: dt.datetime
    currency: str
    customer_external_id: str
    due_date: typing.Optional[dt.datetime] = None
    environment_id: str
    external_id: typing.Optional[str] = None
    id: str
    payment_method_external_id: typing.Optional[str] = None
    subscription_external_id: typing.Optional[str] = None
    subtotal: int
    updated_at: dt.datetime
    url: typing.Optional[str] = None

    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
