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

from ..core.pydantic_utilities import UniversalBaseModel
import pydantic
import typing
import datetime as dt
from .parse_plan_level import ParsePlanLevel
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class Organization(UniversalBaseModel):
    """
    Schema for an organization.
    """

    id: str = pydantic.Field()
    """
    Unique identifier
    """

    created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Creation datetime
    """

    updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Update datetime
    """

    name: str = pydantic.Field()
    """
    A name for the organization.
    """

    stripe_customer_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The Stripe customer ID for the organization.
    """

    parse_plan_level: typing.Optional[ParsePlanLevel] = pydantic.Field(default=None)
    """
    Whether the organization is a Parse Premium customer.
    """

    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
