# 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 .company_detail_response_data import CompanyDetailResponseData
from .company_subscription_response_data import CompanySubscriptionResponseData
from .feature_usage_detail_response_data import FeatureUsageDetailResponseData
from .plan_detail_response_data import PlanDetailResponseData
from .usage_based_entitlement_response_data import UsageBasedEntitlementResponseData


class CheckoutDataResponseData(UniversalBaseModel):
    """
    The requested resource
    """

    active_add_ons: typing.List[PlanDetailResponseData]
    active_plan: typing.Optional[PlanDetailResponseData] = None
    active_usage_based_entitlements: typing.List[UsageBasedEntitlementResponseData]
    company: typing.Optional[CompanyDetailResponseData] = None
    feature_usage: typing.Optional[FeatureUsageDetailResponseData] = None
    selected_plan: typing.Optional[PlanDetailResponseData] = None
    selected_usage_based_entitlements: typing.List[UsageBasedEntitlementResponseData]
    subscription: typing.Optional[CompanySubscriptionResponseData] = None

    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
