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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
from .subscription_pricing_type import SubscriptionPricingType
import pydantic
from .money import Money
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class SubscriptionPricing(UncheckedBaseModel):
    """
    Describes the pricing for the subscription.
    """

    type: typing.Optional[SubscriptionPricingType] = pydantic.Field(default=None)
    """
    RELATIVE or STATIC
    See [SubscriptionPricingType](#type-subscriptionpricingtype) for possible values
    """

    discount_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    The ids of the discount catalog objects
    """

    price_money: typing.Optional[Money] = pydantic.Field(default=None)
    """
    The price of the subscription, if STATIC
    """

    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
