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

from ......core.pydantic_utilities import UniversalBaseModel
from .....payers.resources.v_3.types.payer_identifier import PayerIdentifier
import typing
import datetime as dt
from .....financials.types.allocation_create import AllocationCreate
from ......core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class InsurancePaymentCreate(UniversalBaseModel):
    payer_identifier: PayerIdentifier
    amount_cents: int
    payment_timestamp: typing.Optional[dt.datetime] = None
    payment_note: typing.Optional[str] = None
    allocations: typing.List[AllocationCreate]

    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
