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

import typing

import pydantic
import typing_extensions
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ...core.serialization import FieldMetadata
from .transfer_out_detail_bill_attachment import TransferOutDetailBillAttachment


class TransferOutDetailBill(UniversalBaseModel):
    """
    Bill information for an outbound transfer detail.
    """

    bill_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="billId")] = pydantic.Field(
        default=None
    )
    """
    Unique identifier for the bill.
    """

    lot_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="LotNumber")] = pydantic.Field(
        default=None
    )
    """
    Lot number.
    """

    accounting_field_1: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="AccountingField1")] = (
        pydantic.Field(default=None)
    )
    """
    Accounting field 1.
    """

    accounting_field_2: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="AccountingField2")] = (
        pydantic.Field(default=None)
    )
    """
    Accounting field 2.
    """

    terms: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="Terms")] = pydantic.Field(
        default=None
    )
    """
    Payment terms.
    """

    additional_data: typing_extensions.Annotated[
        typing.Optional[typing.Dict[str, typing.Any]], FieldMetadata(alias="AdditionalData")
    ] = pydantic.Field(default=None)
    """
    Additional data for the bill.
    """

    attachments: typing.Optional[typing.List[TransferOutDetailBillAttachment]] = pydantic.Field(default=None)
    """
    Attachments for the bill.
    """

    invoice_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="invoiceNumber")] = (
        pydantic.Field(default=None)
    )
    """
    Invoice number.
    """

    net_amount: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="netAmount")] = pydantic.Field(
        default=None
    )
    """
    Net amount of the bill.
    """

    invoice_date: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="invoiceDate")] = (
        pydantic.Field(default=None)
    )
    """
    Date of the invoice.
    """

    due_date: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dueDate")] = pydantic.Field(
        default=None
    )
    """
    Due date for the bill.
    """

    comments: typing.Optional[str] = pydantic.Field(default=None)
    """
    Comments on the bill.
    """

    identifier: typing.Optional[str] = pydantic.Field(default=None)
    """
    Identifier for the bill.
    """

    discount: typing.Optional[float] = pydantic.Field(default=None)
    """
    Discount applied.
    """

    total_amount: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="totalAmount")] = (
        pydantic.Field(default=None)
    )
    """
    Total amount of the bill.
    """

    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
