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

import typing

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


class PatientPaymentAllocation(UniversalBaseModel):
    source_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Payment identifier from the source system (e.g., patient portal, manual entry). Note multiple allocations may exist for a single payment and
    thus may share the same source_id.
    """

    amount_cents: int = pydantic.Field()
    """
    The amount of the patient payment in cents.
    """

    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
