# coding: utf-8

"""
    The Selling Partner API for Amazon Seller Wallet Open Banking API

    The Selling Partner API for Seller Wallet (Seller Wallet API) provides financial information that is relevant to a seller's Seller Wallet account. You can obtain financial events, balances, and transfer schedules for Seller Wallet accounts. You can also schedule and initiate transactions.

    The version of the OpenAPI document: 2024-03-01
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class BankAccount(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'account_id': 'str',
        'account_holder_name': 'str',
        'bank_account_number_format': 'BankAccountNumberFormat',
        'bank_name': 'str',
        'bank_account_ownership_type': 'BankAccountOwnershipType',
        'routing_number': 'str',
        'bank_number_format': 'BankNumberFormat',
        'account_country_code': 'str',
        'account_currency': 'str',
        'bank_account_number_tail': 'str',
        'bank_account_holder_status': 'BankAccountHolderStatus',
    }

    attribute_map = {
        'account_id': 'accountId',
        'account_holder_name': 'accountHolderName',
        'bank_account_number_format': 'bankAccountNumberFormat',
        'bank_name': 'bankName',
        'bank_account_ownership_type': 'bankAccountOwnershipType',
        'routing_number': 'routingNumber',
        'bank_number_format': 'bankNumberFormat',
        'account_country_code': 'accountCountryCode',
        'account_currency': 'accountCurrency',
        'bank_account_number_tail': 'bankAccountNumberTail',
        'bank_account_holder_status': 'bankAccountHolderStatus',
    }

    def __init__(self, account_id=None, account_holder_name=None, bank_account_number_format=None, bank_name=None, bank_account_ownership_type=None, routing_number=None, bank_number_format=None, account_country_code=None, account_currency=None, bank_account_number_tail=None, bank_account_holder_status=None, _configuration=None):  # noqa: E501
        """BankAccount - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._account_id = None
        self._account_holder_name = None
        self._bank_account_number_format = None
        self._bank_name = None
        self._bank_account_ownership_type = None
        self._routing_number = None
        self._bank_number_format = None
        self._account_country_code = None
        self._account_currency = None
        self._bank_account_number_tail = None
        self._bank_account_holder_status = None
        self.discriminator = None

        if account_id is not None:
            self.account_id = account_id
        self.account_holder_name = account_holder_name
        self.bank_account_number_format = bank_account_number_format
        if bank_name is not None:
            self.bank_name = bank_name
        self.bank_account_ownership_type = bank_account_ownership_type
        self.routing_number = routing_number
        self.bank_number_format = bank_number_format
        self.account_country_code = account_country_code
        self.account_currency = account_currency
        self.bank_account_number_tail = bank_account_number_tail
        if bank_account_holder_status is not None:
            self.bank_account_holder_status = bank_account_holder_status

    @property
    def account_id(self):
        """Gets the account_id of this BankAccount.  # noqa: E501

        The unique identifier provided by Amazon to identify the account.  # noqa: E501

        :return: The account_id of this BankAccount.  # noqa: E501
        :rtype: str
        """
        return self._account_id

    @account_id.setter
    def account_id(self, account_id):
        """Sets the account_id of this BankAccount.

        The unique identifier provided by Amazon to identify the account.  # noqa: E501

        :param account_id: The account_id of this BankAccount.  # noqa: E501
        :type: str
        """

        self._account_id = account_id

    @property
    def account_holder_name(self):
        """Gets the account_holder_name of this BankAccount.  # noqa: E501

        The bank account holder's name (expected to be an Amazon customer).  # noqa: E501

        :return: The account_holder_name of this BankAccount.  # noqa: E501
        :rtype: str
        """
        return self._account_holder_name

    @account_holder_name.setter
    def account_holder_name(self, account_holder_name):
        """Sets the account_holder_name of this BankAccount.

        The bank account holder's name (expected to be an Amazon customer).  # noqa: E501

        :param account_holder_name: The account_holder_name of this BankAccount.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and account_holder_name is None:
            raise ValueError("Invalid value for `account_holder_name`, must not be `None`")  # noqa: E501

        self._account_holder_name = account_holder_name

    @property
    def bank_account_number_format(self):
        """Gets the bank_account_number_format of this BankAccount.  # noqa: E501


        :return: The bank_account_number_format of this BankAccount.  # noqa: E501
        :rtype: BankAccountNumberFormat
        """
        return self._bank_account_number_format

    @bank_account_number_format.setter
    def bank_account_number_format(self, bank_account_number_format):
        """Sets the bank_account_number_format of this BankAccount.


        :param bank_account_number_format: The bank_account_number_format of this BankAccount.  # noqa: E501
        :type: BankAccountNumberFormat
        """
        if self._configuration.client_side_validation and bank_account_number_format is None:
            raise ValueError("Invalid value for `bank_account_number_format`, must not be `None`")  # noqa: E501

        self._bank_account_number_format = bank_account_number_format

    @property
    def bank_name(self):
        """Gets the bank_name of this BankAccount.  # noqa: E501

        The name of the bank. This value is Amazon Seller Wallet for Amazon Seller Wallet accounts.  # noqa: E501

        :return: The bank_name of this BankAccount.  # noqa: E501
        :rtype: str
        """
        return self._bank_name

    @bank_name.setter
    def bank_name(self, bank_name):
        """Sets the bank_name of this BankAccount.

        The name of the bank. This value is Amazon Seller Wallet for Amazon Seller Wallet accounts.  # noqa: E501

        :param bank_name: The bank_name of this BankAccount.  # noqa: E501
        :type: str
        """

        self._bank_name = bank_name

    @property
    def bank_account_ownership_type(self):
        """Gets the bank_account_ownership_type of this BankAccount.  # noqa: E501


        :return: The bank_account_ownership_type of this BankAccount.  # noqa: E501
        :rtype: BankAccountOwnershipType
        """
        return self._bank_account_ownership_type

    @bank_account_ownership_type.setter
    def bank_account_ownership_type(self, bank_account_ownership_type):
        """Sets the bank_account_ownership_type of this BankAccount.


        :param bank_account_ownership_type: The bank_account_ownership_type of this BankAccount.  # noqa: E501
        :type: BankAccountOwnershipType
        """
        if self._configuration.client_side_validation and bank_account_ownership_type is None:
            raise ValueError("Invalid value for `bank_account_ownership_type`, must not be `None`")  # noqa: E501

        self._bank_account_ownership_type = bank_account_ownership_type

    @property
    def routing_number(self):
        """Gets the routing_number of this BankAccount.  # noqa: E501

        Routing number for automated clearing house transfers. This value is nine consecutive zeros for Amazon Seller Wallet accounts.  # noqa: E501

        :return: The routing_number of this BankAccount.  # noqa: E501
        :rtype: str
        """
        return self._routing_number

    @routing_number.setter
    def routing_number(self, routing_number):
        """Sets the routing_number of this BankAccount.

        Routing number for automated clearing house transfers. This value is nine consecutive zeros for Amazon Seller Wallet accounts.  # noqa: E501

        :param routing_number: The routing_number of this BankAccount.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and routing_number is None:
            raise ValueError("Invalid value for `routing_number`, must not be `None`")  # noqa: E501

        self._routing_number = routing_number

    @property
    def bank_number_format(self):
        """Gets the bank_number_format of this BankAccount.  # noqa: E501


        :return: The bank_number_format of this BankAccount.  # noqa: E501
        :rtype: BankNumberFormat
        """
        return self._bank_number_format

    @bank_number_format.setter
    def bank_number_format(self, bank_number_format):
        """Sets the bank_number_format of this BankAccount.


        :param bank_number_format: The bank_number_format of this BankAccount.  # noqa: E501
        :type: BankNumberFormat
        """
        if self._configuration.client_side_validation and bank_number_format is None:
            raise ValueError("Invalid value for `bank_number_format`, must not be `None`")  # noqa: E501

        self._bank_number_format = bank_number_format

    @property
    def account_country_code(self):
        """Gets the account_country_code of this BankAccount.  # noqa: E501

        The two-digit country code in ISO 3166 format.  # noqa: E501

        :return: The account_country_code of this BankAccount.  # noqa: E501
        :rtype: str
        """
        return self._account_country_code

    @account_country_code.setter
    def account_country_code(self, account_country_code):
        """Sets the account_country_code of this BankAccount.

        The two-digit country code in ISO 3166 format.  # noqa: E501

        :param account_country_code: The account_country_code of this BankAccount.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and account_country_code is None:
            raise ValueError("Invalid value for `account_country_code`, must not be `None`")  # noqa: E501

        self._account_country_code = account_country_code

    @property
    def account_currency(self):
        """Gets the account_currency of this BankAccount.  # noqa: E501

        Bank account currency code in ISO 4217 format.  # noqa: E501

        :return: The account_currency of this BankAccount.  # noqa: E501
        :rtype: str
        """
        return self._account_currency

    @account_currency.setter
    def account_currency(self, account_currency):
        """Sets the account_currency of this BankAccount.

        Bank account currency code in ISO 4217 format.  # noqa: E501

        :param account_currency: The account_currency of this BankAccount.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and account_currency is None:
            raise ValueError("Invalid value for `account_currency`, must not be `None`")  # noqa: E501

        self._account_currency = account_currency

    @property
    def bank_account_number_tail(self):
        """Gets the bank_account_number_tail of this BankAccount.  # noqa: E501

        The last 3 digit of the bank account number. This value is three consecutive zeros for Amazon Seller Wallet accounts.  # noqa: E501

        :return: The bank_account_number_tail of this BankAccount.  # noqa: E501
        :rtype: str
        """
        return self._bank_account_number_tail

    @bank_account_number_tail.setter
    def bank_account_number_tail(self, bank_account_number_tail):
        """Sets the bank_account_number_tail of this BankAccount.

        The last 3 digit of the bank account number. This value is three consecutive zeros for Amazon Seller Wallet accounts.  # noqa: E501

        :param bank_account_number_tail: The bank_account_number_tail of this BankAccount.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and bank_account_number_tail is None:
            raise ValueError("Invalid value for `bank_account_number_tail`, must not be `None`")  # noqa: E501

        self._bank_account_number_tail = bank_account_number_tail

    @property
    def bank_account_holder_status(self):
        """Gets the bank_account_holder_status of this BankAccount.  # noqa: E501


        :return: The bank_account_holder_status of this BankAccount.  # noqa: E501
        :rtype: BankAccountHolderStatus
        """
        return self._bank_account_holder_status

    @bank_account_holder_status.setter
    def bank_account_holder_status(self, bank_account_holder_status):
        """Sets the bank_account_holder_status of this BankAccount.


        :param bank_account_holder_status: The bank_account_holder_status of this BankAccount.  # noqa: E501
        :type: BankAccountHolderStatus
        """

        self._bank_account_holder_status = bank_account_holder_status

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(BankAccount, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, BankAccount):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, BankAccount):
            return True

        return self.to_dict() != other.to_dict()
