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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .billing_cycles import BillingCycles
from .determined_billing_limits import DeterminedBillingLimits
from .friendly_payment_methods import FriendlyPaymentMethods
from .invoice import Invoice
from .subscription import Subscription


class SrcAppHttpRoutesBillingGetBillingData(UncheckedBaseModel):
    payment_methods: typing.List[FriendlyPaymentMethods]
    has_payment_method: bool
    has_default_payment_method: bool
    needs_billing_email: bool
    active_plan: typing.Optional[Subscription] = None
    future_plans: typing.List[Subscription]
    billing_cycles: typing.Optional[BillingCycles] = None
    failed_invoices: typing.List[Invoice]
    has_failed_payment: bool
    workflow_invocations: int
    billing_limits: DeterminedBillingLimits
    agent_interactions: int

    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
