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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .billing_product_price_response_data import BillingProductPriceResponseData


class BillingCreditBundleView(UniversalBaseModel):
    billing_invoice_id: typing.Optional[str] = None
    bundle_type: str
    created_at: dt.datetime
    credit_description: typing.Optional[str] = None
    credit_icon: typing.Optional[str] = None
    credit_id: str
    credit_name: str
    expiry_type: str
    expiry_unit: str
    expiry_unit_count: typing.Optional[int] = None
    has_grants: bool
    id: str
    name: str
    plural_name: typing.Optional[str] = None
    price: typing.Optional[BillingProductPriceResponseData] = None
    quantity: typing.Optional[int] = None
    singular_name: typing.Optional[str] = None
    status: str
    unit_price: typing.Optional[BillingProductPriceResponseData] = None
    updated_at: dt.datetime

    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
