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

import typing_extensions
from ..types.country import Country
from ..types.currency import Currency
from ..types.bank_account_type import BankAccountType
import typing_extensions
import typing
from ..types.bank_account_status import BankAccountStatus


class BankAccountParams(typing_extensions.TypedDict):
    """
    Represents a bank account. For more information about
    linking a bank account to a Square account, see
    [Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api).
    """

    id: str
    """
    The unique, Square-issued identifier for the bank account.
    """

    account_number_suffix: str
    """
    The last few digits of the account number.
    """

    country: Country
    """
    The ISO 3166 Alpha-2 country code where the bank account is based.
    See [Country](#type-country) for possible values
    """

    currency: Currency
    """
    The 3-character ISO 4217 currency code indicating the operating
    currency of the bank account. For example, the currency code for US dollars
    is `USD`.
    See [Currency](#type-currency) for possible values
    """

    account_type: BankAccountType
    """
    The financial purpose of the associated bank account.
    See [BankAccountType](#type-bankaccounttype) for possible values
    """

    holder_name: str
    """
    Name of the account holder. This name must match the name 
    on the targeted bank account record.
    """

    primary_bank_identification_number: str
    """
    Primary identifier for the bank. For more information, see 
    [Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api).
    """

    secondary_bank_identification_number: typing_extensions.NotRequired[typing.Optional[str]]
    """
    Secondary identifier for the bank. For more information, see 
    [Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api).
    """

    debit_mandate_reference_id: typing_extensions.NotRequired[typing.Optional[str]]
    """
    Reference identifier that will be displayed to UK bank account owners
    when collecting direct debit authorization. Only required for UK bank accounts.
    """

    reference_id: typing_extensions.NotRequired[typing.Optional[str]]
    """
    Client-provided identifier for linking the banking account to an entity
    in a third-party system (for example, a bank account number or a user identifier).
    """

    location_id: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The location to which the bank account belongs.
    """

    status: BankAccountStatus
    """
    Read-only. The current verification status of this BankAccount object.
    See [BankAccountStatus](#type-bankaccountstatus) for possible values
    """

    creditable: bool
    """
    Indicates whether it is possible for Square to send money to this bank account.
    """

    debitable: bool
    """
    Indicates whether it is possible for Square to take money from this 
    bank account.
    """

    fingerprint: typing_extensions.NotRequired[typing.Optional[str]]
    """
    A Square-assigned, unique identifier for the bank account based on the
    account information. The account fingerprint can be used to compare account
    entries and determine if the they represent the same real-world bank account.
    """

    version: typing_extensions.NotRequired[int]
    """
    The current version of the `BankAccount`.
    """

    bank_name: typing_extensions.NotRequired[typing.Optional[str]]
    """
    Read only. Name of actual financial institution. 
    For example "Bank of America".
    """
