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

import datetime as dt
import typing

from ...core.datetime_utils import serialize_datetime
from ...core.pydantic_utilities import pydantic_v1
from .currency import Currency


class FinancialsProperties(pydantic_v1.BaseModel):
    assets: typing.Optional[float] = pydantic_v1.Field(default=None)
    """
    The total value of assets owned by a company
    """

    currency: typing.Optional[Currency] = pydantic_v1.Field(default=None)
    """
    Reporting currency
    """

    date: typing.Optional[str] = pydantic_v1.Field(default=None)
    """
    as-of date
    """

    employees: typing.Optional[int] = pydantic_v1.Field(default=None)
    """
    Total employees
    """

    from_date: typing.Optional[str] = pydantic_v1.Field(default=None)
    """
    start date
    """

    liabilities: typing.Optional[float] = pydantic_v1.Field(default=None)
    """
    Sum of the combined debts a company owes
    """

    net_income: typing.Optional[float] = pydantic_v1.Field(default=None)
    """
    Company's earnings for a period after subtracting operating costs, taxes, and interest
    """

    paid_up_capital: typing.Optional[float] = pydantic_v1.Field(default=None)
    """
    Paid-up capital is the capital already held by the company
    """

    registered_capital: typing.Optional[float] = pydantic_v1.Field(default=None)
    """
    Registered capital is the maximum amount of share capital that a company is authorized to raise
    """

    revenue: typing.Optional[float] = pydantic_v1.Field(default=None)
    """
    The total amount of income generated by the sale of goods or services related to the company's primary operations
    """

    to_date: typing.Optional[str] = pydantic_v1.Field(default=None)
    """
    end date
    """

    def json(self, **kwargs: typing.Any) -> str:
        kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
        return super().json(**kwargs_with_defaults)

    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
        kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
        return super().dict(**kwargs_with_defaults)

    class Config:
        frozen = True
        smart_union = True
        extra = pydantic_v1.Extra.allow
        json_encoders = {dt.datetime: serialize_datetime}
