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

from __future__ import annotations
from .decimalcreate import DecimalCreate, DecimalCreateTypedDict
from .schedulepropertiescreate import (
    SchedulePropertiesCreate,
    SchedulePropertiesCreateTypedDict,
)
from ascend_sdk.types import BaseModel
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class WithdrawalScheduleDetailsCreateTypedDict(TypedDict):
    r"""Details of withdrawal schedule transfers"""

    client_schedule_id: str
    r"""External identifier supplied by the API caller. Each request must have a unique pairing of client_schedule_id and account"""
    schedule_properties: SchedulePropertiesCreateTypedDict
    r"""Properties common to all transfer schedules"""
    amount: NotRequired[DecimalCreateTypedDict]
    r"""A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's [BigDecimal][] or Python's [decimal.Decimal][].

    [BigDecimal]:
    https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html
    [decimal.Decimal]: https://docs.python.org/3/library/decimal.html
    """
    full_disbursement: NotRequired[bool]
    r"""Flag to indicate a full disbursement transfer (mutually exclusive with 'amount')"""


class WithdrawalScheduleDetailsCreate(BaseModel):
    r"""Details of withdrawal schedule transfers"""

    client_schedule_id: str
    r"""External identifier supplied by the API caller. Each request must have a unique pairing of client_schedule_id and account"""

    schedule_properties: SchedulePropertiesCreate
    r"""Properties common to all transfer schedules"""

    amount: Optional[DecimalCreate] = None
    r"""A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's [BigDecimal][] or Python's [decimal.Decimal][].

    [BigDecimal]:
    https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html
    [decimal.Decimal]: https://docs.python.org/3/library/decimal.html
    """

    full_disbursement: Optional[bool] = None
    r"""Flag to indicate a full disbursement transfer (mutually exclusive with 'amount')"""
