# coding: utf-8

"""
Copyright 2017 Square, Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""


from pprint import pformat
from six import iteritems
import re


class V1BankAccount(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, id=None, merchant_id=None, bank_name=None, name=None, routing_number=None, account_number_suffix=None, currency_code=None, type=None):
        """
        V1BankAccount - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'id': 'str',
            'merchant_id': 'str',
            'bank_name': 'str',
            'name': 'str',
            'routing_number': 'str',
            'account_number_suffix': 'str',
            'currency_code': 'str',
            'type': 'str'
        }

        self.attribute_map = {
            'id': 'id',
            'merchant_id': 'merchant_id',
            'bank_name': 'bank_name',
            'name': 'name',
            'routing_number': 'routing_number',
            'account_number_suffix': 'account_number_suffix',
            'currency_code': 'currency_code',
            'type': 'type'
        }

        self._id = id
        self._merchant_id = merchant_id
        self._bank_name = bank_name
        self._name = name
        self._routing_number = routing_number
        self._account_number_suffix = account_number_suffix
        self._currency_code = currency_code
        self._type = type

    @property
    def id(self):
        """
        Gets the id of this V1BankAccount.
        The bank account's Square-issued ID.

        :return: The id of this V1BankAccount.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this V1BankAccount.
        The bank account's Square-issued ID.

        :param id: The id of this V1BankAccount.
        :type: str
        """

        self._id = id

    @property
    def merchant_id(self):
        """
        Gets the merchant_id of this V1BankAccount.
        The Square-issued ID of the merchant associated with the bank account.

        :return: The merchant_id of this V1BankAccount.
        :rtype: str
        """
        return self._merchant_id

    @merchant_id.setter
    def merchant_id(self, merchant_id):
        """
        Sets the merchant_id of this V1BankAccount.
        The Square-issued ID of the merchant associated with the bank account.

        :param merchant_id: The merchant_id of this V1BankAccount.
        :type: str
        """

        self._merchant_id = merchant_id

    @property
    def bank_name(self):
        """
        Gets the bank_name of this V1BankAccount.
        The name of the bank that manages the account.

        :return: The bank_name of this V1BankAccount.
        :rtype: str
        """
        return self._bank_name

    @bank_name.setter
    def bank_name(self, bank_name):
        """
        Sets the bank_name of this V1BankAccount.
        The name of the bank that manages the account.

        :param bank_name: The bank_name of this V1BankAccount.
        :type: str
        """

        self._bank_name = bank_name

    @property
    def name(self):
        """
        Gets the name of this V1BankAccount.
        The name associated with the bank account.

        :return: The name of this V1BankAccount.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this V1BankAccount.
        The name associated with the bank account.

        :param name: The name of this V1BankAccount.
        :type: str
        """

        self._name = name

    @property
    def routing_number(self):
        """
        Gets the routing_number of this V1BankAccount.
        The bank account's routing number.

        :return: The routing_number of this V1BankAccount.
        :rtype: str
        """
        return self._routing_number

    @routing_number.setter
    def routing_number(self, routing_number):
        """
        Sets the routing_number of this V1BankAccount.
        The bank account's routing number.

        :param routing_number: The routing_number of this V1BankAccount.
        :type: str
        """

        self._routing_number = routing_number

    @property
    def account_number_suffix(self):
        """
        Gets the account_number_suffix of this V1BankAccount.
        The last few digits of the bank account number.

        :return: The account_number_suffix of this V1BankAccount.
        :rtype: str
        """
        return self._account_number_suffix

    @account_number_suffix.setter
    def account_number_suffix(self, account_number_suffix):
        """
        Sets the account_number_suffix of this V1BankAccount.
        The last few digits of the bank account number.

        :param account_number_suffix: The account_number_suffix of this V1BankAccount.
        :type: str
        """

        self._account_number_suffix = account_number_suffix

    @property
    def currency_code(self):
        """
        Gets the currency_code of this V1BankAccount.
        The currency code of the currency associated with the bank account, in ISO 4217 format. For example, the currency code for US dollars is USD.

        :return: The currency_code of this V1BankAccount.
        :rtype: str
        """
        return self._currency_code

    @currency_code.setter
    def currency_code(self, currency_code):
        """
        Sets the currency_code of this V1BankAccount.
        The currency code of the currency associated with the bank account, in ISO 4217 format. For example, the currency code for US dollars is USD.

        :param currency_code: The currency_code of this V1BankAccount.
        :type: str
        """

        self._currency_code = currency_code

    @property
    def type(self):
        """
        Gets the type of this V1BankAccount.
        The bank account's type (for example, savings or checking). See [V1BankAccountType](#type-v1bankaccounttype) for possible values

        :return: The type of this V1BankAccount.
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """
        Sets the type of this V1BankAccount.
        The bank account's type (for example, savings or checking). See [V1BankAccountType](#type-v1bankaccounttype) for possible values

        :param type: The type of this V1BankAccount.
        :type: str
        """

        self._type = type

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

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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
        """
        return self.__dict__ == other.__dict__

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