# 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_price_response_data import BillingPriceResponseData
from .billing_product_response_data import BillingProductResponseData


class BillingCreditResponseData(UniversalBaseModel):
    burn_strategy: str
    created_at: dt.datetime
    default_expiry_unit: str
    default_expiry_unit_count: typing.Optional[int] = None
    default_rollover_policy: str
    description: str
    icon: typing.Optional[str] = None
    id: str
    name: str
    plural_name: typing.Optional[str] = None
    price: typing.Optional[BillingPriceResponseData] = None
    product: typing.Optional[BillingProductResponseData] = None
    singular_name: typing.Optional[str] = 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
