# 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 .create_rate_card_version_response_billing_interval import CreateRateCardVersionResponseBillingInterval
from .create_rate_card_version_response_usage_based_rates_item import CreateRateCardVersionResponseUsageBasedRatesItem
from .credit_grant_resource import CreditGrantResource
from .feature_access_resource import FeatureAccessResource
from .fixed_rate_interface import FixedRateInterface


class CreateRateCardVersionResponse(UniversalBaseModel):
    id: str
    name: str
    description: str
    usage_based_rates: typing.List[CreateRateCardVersionResponseUsageBasedRatesItem]
    fixed_rates: typing.List[FixedRateInterface]
    billing_interval: CreateRateCardVersionResponseBillingInterval
    credit_grants: typing.List[CreditGrantResource]
    created_at: str
    updated_at: str
    major_version: int
    minor_version: int
    feature_access: typing.List[FeatureAccessResource]
    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
