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

from __future__ import annotations
from .decimalcreate import DecimalCreate, DecimalCreateTypedDict
from .retirementdistributioncreate import (
    RetirementDistributionCreate,
    RetirementDistributionCreateTypedDict,
)
from .wirewithdrawal_beneficiarycreate import (
    WireWithdrawalBeneficiaryCreate,
    WireWithdrawalBeneficiaryCreateTypedDict,
)
from .wirewithdrawal_intermediarycreate import (
    WireWithdrawalIntermediaryCreate,
    WireWithdrawalIntermediaryCreateTypedDict,
)
from .wirewithdrawal_recipientbankcreate import (
    WireWithdrawalRecipientBankCreate,
    WireWithdrawalRecipientBankCreateTypedDict,
)
from ascend_sdk.types import BaseModel
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class WireWithdrawalCreateTypedDict(TypedDict):
    r"""A withdrawal transfer using the wire mechanism"""

    beneficiary: WireWithdrawalBeneficiaryCreateTypedDict
    r"""The person or entity taking receipt of the wired funds"""
    client_transfer_id: str
    r"""External identifier supplied by the API caller. Each request must have a unique pairing of client_transfer_id and account"""
    recipient_bank: WireWithdrawalRecipientBankCreateTypedDict
    r"""A recipient bank / financial institution"""
    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"""Whether the entire account balance is being withdrawn. If this field is set to True, a transfer amount must not be specified"""
    intermediary: NotRequired[WireWithdrawalIntermediaryCreateTypedDict]
    r"""An intermediary party"""
    ira_distribution: NotRequired[RetirementDistributionCreateTypedDict]
    r"""A distribution from a retirement account."""


class WireWithdrawalCreate(BaseModel):
    r"""A withdrawal transfer using the wire mechanism"""

    beneficiary: WireWithdrawalBeneficiaryCreate
    r"""The person or entity taking receipt of the wired funds"""

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

    recipient_bank: WireWithdrawalRecipientBankCreate
    r"""A recipient bank / financial institution"""

    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"""Whether the entire account balance is being withdrawn. If this field is set to True, a transfer amount must not be specified"""

    intermediary: Optional[WireWithdrawalIntermediaryCreate] = None
    r"""An intermediary party"""

    ira_distribution: Optional[RetirementDistributionCreate] = None
    r"""A distribution from a retirement account."""
