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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
from .currency import Currency
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class V1Money(UncheckedBaseModel):
    amount: typing.Optional[int] = pydantic.Field(default=None)
    """
    Amount in the lowest denominated value of this Currency. E.g. in USD
    these are cents, in JPY they are Yen (which do not have a 'cent' concept).
    """

    currency_code: typing.Optional[Currency] = pydantic.Field(default=None)
    """
    
    See [Currency](#type-currency) for possible values
    """

    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
