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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata


class BillingFeeDetail(UniversalBaseModel):
    billable_event: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="billableEvent")] = None
    service: typing.Optional[str] = None
    event_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventId")] = None
    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Description of the billing fee
    """

    category: typing.Optional[str] = pydantic.Field(default=None)
    """
    Category of the billing fee
    """

    fix_price: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="fixPrice")] = pydantic.Field(
        default=None
    )
    """
    Fixed price component of the fee
    """

    float_price: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="floatPrice")] = (
        pydantic.Field(default=None)
    )
    """
    Percentage component of the fee
    """

    billable_amount: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="billableAmount")] = (
        pydantic.Field(default=None)
    )
    """
    Amount eligible for the fee
    """

    bill_amount: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="billAmount")] = (
        pydantic.Field(default=None)
    )
    """
    Total fee amount charged
    """

    frequency: typing.Optional[str] = None
    service_group: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serviceGroup")] = None

    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
