# coding: utf-8

"""
    CyberSource Merged Spec

    All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html

    OpenAPI spec version: 0.0.1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class Ptsv2paymentsPaymentInformationBankAccount(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 = {
        'type': 'str',
        'number': 'str',
        'encoder_id': 'str',
        'check_number': 'str',
        'check_image_reference_number': 'str'
    }

    attribute_map = {
        'type': 'type',
        'number': 'number',
        'encoder_id': 'encoderId',
        'check_number': 'checkNumber',
        'check_image_reference_number': 'checkImageReferenceNumber'
    }

    def __init__(self, type=None, number=None, encoder_id=None, check_number=None, check_image_reference_number=None):
        """
        Ptsv2paymentsPaymentInformationBankAccount - a model defined in Swagger
        """

        self._type = None
        self._number = None
        self._encoder_id = None
        self._check_number = None
        self._check_image_reference_number = None

        if type is not None:
          self.type = type
        if number is not None:
          self.number = number
        if encoder_id is not None:
          self.encoder_id = encoder_id
        if check_number is not None:
          self.check_number = check_number
        if check_image_reference_number is not None:
          self.check_image_reference_number = check_image_reference_number

    @property
    def type(self):
        """
        Gets the type of this Ptsv2paymentsPaymentInformationBankAccount.
        Account type.  Possible values:  - **C**: Checking.  - **G**: General ledger. This value is supported only on Wells Fargo ACH.  - **S**: Savings (U.S. dollars only).  - **X**: Corporate checking (U.S. dollars only). 

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

    @type.setter
    def type(self, type):
        """
        Sets the type of this Ptsv2paymentsPaymentInformationBankAccount.
        Account type.  Possible values:  - **C**: Checking.  - **G**: General ledger. This value is supported only on Wells Fargo ACH.  - **S**: Savings (U.S. dollars only).  - **X**: Corporate checking (U.S. dollars only). 

        :param type: The type of this Ptsv2paymentsPaymentInformationBankAccount.
        :type: str
        """
        if type is not None and len(type) > 1:
            raise ValueError("Invalid value for `type`, length must be less than or equal to `1`")

        self._type = type

    @property
    def number(self):
        """
        Gets the number of this Ptsv2paymentsPaymentInformationBankAccount.
        Account number.  When processing encoded account numbers, use this field for the encoded account number. 

        :return: The number of this Ptsv2paymentsPaymentInformationBankAccount.
        :rtype: str
        """
        return self._number

    @number.setter
    def number(self, number):
        """
        Sets the number of this Ptsv2paymentsPaymentInformationBankAccount.
        Account number.  When processing encoded account numbers, use this field for the encoded account number. 

        :param number: The number of this Ptsv2paymentsPaymentInformationBankAccount.
        :type: str
        """
        if number is not None and len(number) > 17:
            raise ValueError("Invalid value for `number`, length must be less than or equal to `17`")

        self._number = number

    @property
    def encoder_id(self):
        """
        Gets the encoder_id of this Ptsv2paymentsPaymentInformationBankAccount.
        Identifier for the bank that provided the customer’s encoded account number.  To obtain the bank identifier, contact your processor.  For details, see `account_encoder_id` request-level field description in [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/) 

        :return: The encoder_id of this Ptsv2paymentsPaymentInformationBankAccount.
        :rtype: str
        """
        return self._encoder_id

    @encoder_id.setter
    def encoder_id(self, encoder_id):
        """
        Sets the encoder_id of this Ptsv2paymentsPaymentInformationBankAccount.
        Identifier for the bank that provided the customer’s encoded account number.  To obtain the bank identifier, contact your processor.  For details, see `account_encoder_id` request-level field description in [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/) 

        :param encoder_id: The encoder_id of this Ptsv2paymentsPaymentInformationBankAccount.
        :type: str
        """
        if encoder_id is not None and len(encoder_id) > 3:
            raise ValueError("Invalid value for `encoder_id`, length must be less than or equal to `3`")

        self._encoder_id = encoder_id

    @property
    def check_number(self):
        """
        Gets the check_number of this Ptsv2paymentsPaymentInformationBankAccount.
        Check number.  Chase Paymentech Solutions - Optional. CyberSource ACH Service - Not used. RBS WorldPay Atlanta - Optional on debits. Required on credits. TeleCheck - Strongly recommended on debit requests. Optional on credits. 

        :return: The check_number of this Ptsv2paymentsPaymentInformationBankAccount.
        :rtype: str
        """
        return self._check_number

    @check_number.setter
    def check_number(self, check_number):
        """
        Sets the check_number of this Ptsv2paymentsPaymentInformationBankAccount.
        Check number.  Chase Paymentech Solutions - Optional. CyberSource ACH Service - Not used. RBS WorldPay Atlanta - Optional on debits. Required on credits. TeleCheck - Strongly recommended on debit requests. Optional on credits. 

        :param check_number: The check_number of this Ptsv2paymentsPaymentInformationBankAccount.
        :type: str
        """
        if check_number is not None and len(check_number) > 8:
            raise ValueError("Invalid value for `check_number`, length must be less than or equal to `8`")

        self._check_number = check_number

    @property
    def check_image_reference_number(self):
        """
        Gets the check_image_reference_number of this Ptsv2paymentsPaymentInformationBankAccount.
        Image reference number associated with the check. You cannot include any special characters. 

        :return: The check_image_reference_number of this Ptsv2paymentsPaymentInformationBankAccount.
        :rtype: str
        """
        return self._check_image_reference_number

    @check_image_reference_number.setter
    def check_image_reference_number(self, check_image_reference_number):
        """
        Sets the check_image_reference_number of this Ptsv2paymentsPaymentInformationBankAccount.
        Image reference number associated with the check. You cannot include any special characters. 

        :param check_image_reference_number: The check_image_reference_number of this Ptsv2paymentsPaymentInformationBankAccount.
        :type: str
        """
        if check_image_reference_number is not None and len(check_image_reference_number) > 32:
            raise ValueError("Invalid value for `check_image_reference_number`, length must be less than or equal to `32`")

        self._check_image_reference_number = check_image_reference_number

    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
        """
        if not isinstance(other, Ptsv2paymentsPaymentInformationBankAccount):
            return False

        return self.__dict__ == other.__dict__

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