"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .balancebytransaction import BalanceByTransaction, BalanceByTransactionTypedDict
from apideck_unify.types import BaseModel
from datetime import date
from typing import List, Optional
from typing_extensions import NotRequired, TypedDict


class BalanceByPeriodTypedDict(TypedDict):
    start_date: NotRequired[date]
    r"""Start date of the period."""
    end_date: NotRequired[date]
    r"""End date of the period."""
    total_amount: NotRequired[float]
    r"""Total amount of the period."""
    balances_by_transaction: NotRequired[List[BalanceByTransactionTypedDict]]


class BalanceByPeriod(BaseModel):
    start_date: Optional[date] = None
    r"""Start date of the period."""

    end_date: Optional[date] = None
    r"""End date of the period."""

    total_amount: Optional[float] = None
    r"""Total amount of the period."""

    balances_by_transaction: Optional[List[BalanceByTransaction]] = None
