# -*- coding: utf-8 -*-

"""
pqapiv2

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""


class BankAccountRequirementValidator(object):

    """Implementation of the '_bankAccountRequirementValidator' model.

    Specifies the validator type for the required bank account information

    Attributes:
        validator_type (ValidatorTypesEnum): TODO: type description here.
        expression (string): Validation regular expression

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "expression": 'expression',
        "validator_type": 'validatorType'
    }

    def __init__(self,
                 expression=None,
                 validator_type=None):
        """Constructor for the BankAccountRequirementValidator class"""

        # Initialize members of the class
        self.validator_type = validator_type
        self.expression = expression

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Creates an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """
        if dictionary is None:
            return None

        # Extract variables from the dictionary
        expression = dictionary.get('expression')
        validator_type = dictionary.get('validatorType')

        # Return an object of this model
        return cls(expression,
                   validator_type)
