# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class BankAccountRequestModel(Model):
    """The request model sent by the client for adding new bank accounts to the
    payment platform.

    :param account_number: The bank account number.
    :type account_number: str
    :param routing_number: The routing number of the bank where the bank
     account was opened.
    :type routing_number: str
    :param account_holder_name: The name of the individual or entity that is
     autorized to make transactions for the bank account.
    :type account_holder_name: str
    :param account_holder_address: The mailing address for the account holder.
    :type account_holder_address: ~softheon.wallet.api.client.models.Address
    :param type: The bank account type. Possible values include: 'Unknown',
     'Checking', 'Savings'
    :type type: str or ~softheon.wallet.api.client.models.enum
    :param reference_id: The client application provided reference ID for the
     bank account.
    :type reference_id: str
    :param nickname: The aribtrary nickname of the account, used as a way to
     identify the account.
    :type nickname: str
    :param email: The email address for the account holder.
    :type email: str
    :param redirect_url: The url that the client will be redirected to after
     the bank account has been created.
    :type redirect_url: str
    """

    _validation = {
        'account_number': {'required': True, 'pattern': r'\d{4,17}$'},
        'routing_number': {'required': True, 'pattern': r'\d{9,9}$'},
        'account_holder_name': {'required': True},
        'account_holder_address': {'required': True},
        'type': {'required': True},
        'email': {'required': True},
    }

    _attribute_map = {
        'account_number': {'key': 'accountNumber', 'type': 'str'},
        'routing_number': {'key': 'routingNumber', 'type': 'str'},
        'account_holder_name': {'key': 'accountHolderName', 'type': 'str'},
        'account_holder_address': {'key': 'accountHolderAddress', 'type': 'Address'},
        'type': {'key': 'type', 'type': 'str'},
        'reference_id': {'key': 'referenceId', 'type': 'str'},
        'nickname': {'key': 'nickname', 'type': 'str'},
        'email': {'key': 'email', 'type': 'str'},
        'redirect_url': {'key': 'redirectUrl', 'type': 'str'},
    }

    def __init__(self, account_number, routing_number, account_holder_name, account_holder_address, type, email, reference_id=None, nickname=None, redirect_url=None):
        super(BankAccountRequestModel, self).__init__()
        self.account_number = account_number
        self.routing_number = routing_number
        self.account_holder_name = account_holder_name
        self.account_holder_address = account_holder_address
        self.type = type
        self.reference_id = reference_id
        self.nickname = nickname
        self.email = email
        self.redirect_url = redirect_url
