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

from ..core.unchecked_base_model import UncheckedBaseModel
from .catalog_quick_amount_type import CatalogQuickAmountType
import pydantic
from .money import Money
import typing
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class CatalogQuickAmount(UncheckedBaseModel):
    """
    Represents a Quick Amount in the Catalog.
    """

    type: CatalogQuickAmountType = pydantic.Field()
    """
    Represents the type of the Quick Amount.
    See [CatalogQuickAmountType](#type-catalogquickamounttype) for possible values
    """

    amount: Money = pydantic.Field()
    """
    Represents the actual amount of the Quick Amount with Money type.
    """

    score: typing.Optional[int] = pydantic.Field(default=None)
    """
    Describes the ranking of the Quick Amount provided by machine learning model, in the range [0, 100].
    MANUAL type amount will always have score = 100.
    """

    ordinal: typing.Optional[int] = pydantic.Field(default=None)
    """
    The order in which this Quick Amount should be displayed.
    """

    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
