# 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_tier_response_data import BillingProductPriceTierResponseData


class BillingProductForSubscriptionResponseData(UniversalBaseModel):
    billing_scheme: str
    billing_threshold: typing.Optional[int] = None
    created_at: dt.datetime
    currency: str
    environment_id: str
    external_id: str
    id: str
    interval: str
    meter_id: typing.Optional[str] = None
    name: str
    package_size: int
    price: int
    price_decimal: typing.Optional[str] = None
    price_external_id: str
    price_id: str
    price_tier: typing.List[BillingProductPriceTierResponseData]
    quantity: float
    subscription_id: str
    subscription_item_external_id: typing.Optional[str] = None
    updated_at: dt.datetime
    usage_type: str

    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
