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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .fixed_rate_interface import FixedRateInterface
from .rate_card_resource_billing_interval import RateCardResourceBillingInterval
from .rate_card_resource_usage_based_rates_item import RateCardResourceUsageBasedRatesItem


class RateCardResource(UniversalBaseModel):
    id: str
    name: str
    description: str
    usage_based_rates: typing.List[RateCardResourceUsageBasedRatesItem]
    fixed_rates: typing.List[FixedRateInterface]
    billing_interval: RateCardResourceBillingInterval
    created_at: str
    updated_at: str
    metadata: typing.Dict[str, str]

    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
