"""visaacceptancemergedspec.

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

# ruff: noqa: E501
from visaacceptancemergedspec.api_helper import (
    APIHelper,
)


class ElectronicVerificationResults(object):
    """Implementation of the 'ElectronicVerificationResults' model.

    Attributes:
        code (str): Mapped Electronic Verification response code for the customer’s
            name.
        code_raw (str): Raw Electronic Verification response code from the processor
            for the customer’s last name
        email (str): Mapped Electronic Verification response code for the customer’s
            email address.
        email_raw (str): Raw Electronic Verification response code from the processor
            for the customer’s email address.
        phone_number (str): Mapped Electronic Verification response code for the
            customer’s phone number.
        phone_number_raw (str): Raw Electronic Verification response code from the
            processor for the customer’s phone number.
        postal_code (str): Mapped Electronic Verification response code for the
            customer’s postal code.
        postal_code_raw (str): Raw Electronic Verification response code from the
            processor for the customer’s postal code.
        street (str): Mapped Electronic Verification response code for the customer’s
            street address.
        street_raw (str): Raw Electronic Verification response code from the
            processor for the customer’s street address.
        name (str): #### Visa Platform Connect Mapped Electronic Verification
            response code for the customer’s name.  Valid values :  'Y'   Yes, the
            data Matches 'N'   No Match 'O'   Partial Match
        name_raw (str): #### Visa Platform Connect Raw Electronic Verification
            response code from the processor for the customer’s name.  Valid values :
            '01'     Match '50'     Partial Match '99'     No Match
        first_name_raw (str): #### Visa Platform Connect Raw electronic verification
            response code from the processor for the customer’s first name.  Valid
            values :  '01'     Match '50'     Partial Match '99'     No Match
        first_name (str): #### Visa Platform Connect Mapped electronic verification
            response code from the processor for the customer’s first name.  Valid
            values :  'Y'   Yes, the data Matches 'N'   No Match 'O'   Partial Match
        middle_name_raw (str): #### Visa Platform Connect Raw electronic verification
            response code from the processor for the customer’s middle name.  Valid
            values :  '01'     Match '50'     Partial Match '99'     No Match
        middle_name (str): #### Visa Platform Connect Mapped electronic verification
            response code from the processor for the customer’s middle name.  Valid
            values :  'Y'   Yes, the data Matches 'N'   No Match 'O'   Partial Match
        last_name_raw (str): #### Visa Platform Connect Raw electronic verification
            response code from the processor for the customer’s last name.  Valid
            values :  '01'     Match '50'     Partial Match '99'     No Match
        last_name (str): #### Visa Platform Connect Mapped electronic verification
            response code from the processor for the customer’s last name.  Valid
            values :  'Y'   Yes, the data Matches 'N'   No Match 'O'   Partial Match
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "code": "code",
        "code_raw": "codeRaw",
        "email": "email",
        "email_raw": "emailRaw",
        "phone_number": "phoneNumber",
        "phone_number_raw": "phoneNumberRaw",
        "postal_code": "postalCode",
        "postal_code_raw": "postalCodeRaw",
        "street": "street",
        "street_raw": "streetRaw",
        "name": "name",
        "name_raw": "nameRaw",
        "first_name_raw": "firstNameRaw",
        "first_name": "firstName",
        "middle_name_raw": "middleNameRaw",
        "middle_name": "middleName",
        "last_name_raw": "lastNameRaw",
        "last_name": "lastName",
    }

    _optionals = [
        "code",
        "code_raw",
        "email",
        "email_raw",
        "phone_number",
        "phone_number_raw",
        "postal_code",
        "postal_code_raw",
        "street",
        "street_raw",
        "name",
        "name_raw",
        "first_name_raw",
        "first_name",
        "middle_name_raw",
        "middle_name",
        "last_name_raw",
        "last_name",
    ]

    def __init__(
        self,
        code=APIHelper.SKIP,
        code_raw=APIHelper.SKIP,
        email=APIHelper.SKIP,
        email_raw=APIHelper.SKIP,
        phone_number=APIHelper.SKIP,
        phone_number_raw=APIHelper.SKIP,
        postal_code=APIHelper.SKIP,
        postal_code_raw=APIHelper.SKIP,
        street=APIHelper.SKIP,
        street_raw=APIHelper.SKIP,
        name=APIHelper.SKIP,
        name_raw=APIHelper.SKIP,
        first_name_raw=APIHelper.SKIP,
        first_name=APIHelper.SKIP,
        middle_name_raw=APIHelper.SKIP,
        middle_name=APIHelper.SKIP,
        last_name_raw=APIHelper.SKIP,
        last_name=APIHelper.SKIP,
        additional_properties=None):
        """Initialize a ElectronicVerificationResults instance."""
        # Initialize members of the class
        if code is not APIHelper.SKIP:
            self.code = code
        if code_raw is not APIHelper.SKIP:
            self.code_raw = code_raw
        if email is not APIHelper.SKIP:
            self.email = email
        if email_raw is not APIHelper.SKIP:
            self.email_raw = email_raw
        if phone_number is not APIHelper.SKIP:
            self.phone_number = phone_number
        if phone_number_raw is not APIHelper.SKIP:
            self.phone_number_raw = phone_number_raw
        if postal_code is not APIHelper.SKIP:
            self.postal_code = postal_code
        if postal_code_raw is not APIHelper.SKIP:
            self.postal_code_raw = postal_code_raw
        if street is not APIHelper.SKIP:
            self.street = street
        if street_raw is not APIHelper.SKIP:
            self.street_raw = street_raw
        if name is not APIHelper.SKIP:
            self.name = name
        if name_raw is not APIHelper.SKIP:
            self.name_raw = name_raw
        if first_name_raw is not APIHelper.SKIP:
            self.first_name_raw = first_name_raw
        if first_name is not APIHelper.SKIP:
            self.first_name = first_name
        if middle_name_raw is not APIHelper.SKIP:
            self.middle_name_raw = middle_name_raw
        if middle_name is not APIHelper.SKIP:
            self.middle_name = middle_name
        if last_name_raw is not APIHelper.SKIP:
            self.last_name_raw = last_name_raw
        if last_name is not APIHelper.SKIP:
            self.last_name = last_name

        # Add additional model properties to the instance
        if additional_properties is None:
            additional_properties = {}
        self.additional_properties = additional_properties

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Create 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 not isinstance(dictionary, dict) or dictionary is None:
            return None

        # Extract variables from the dictionary
        code =\
            dictionary.get("code")\
            if dictionary.get("code")\
                else APIHelper.SKIP
        code_raw =\
            dictionary.get("codeRaw")\
            if dictionary.get("codeRaw")\
                else APIHelper.SKIP
        email =\
            dictionary.get("email")\
            if dictionary.get("email")\
                else APIHelper.SKIP
        email_raw =\
            dictionary.get("emailRaw")\
            if dictionary.get("emailRaw")\
                else APIHelper.SKIP
        phone_number =\
            dictionary.get("phoneNumber")\
            if dictionary.get("phoneNumber")\
                else APIHelper.SKIP
        phone_number_raw =\
            dictionary.get("phoneNumberRaw")\
            if dictionary.get("phoneNumberRaw")\
                else APIHelper.SKIP
        postal_code =\
            dictionary.get("postalCode")\
            if dictionary.get("postalCode")\
                else APIHelper.SKIP
        postal_code_raw =\
            dictionary.get("postalCodeRaw")\
            if dictionary.get("postalCodeRaw")\
                else APIHelper.SKIP
        street =\
            dictionary.get("street")\
            if dictionary.get("street")\
                else APIHelper.SKIP
        street_raw =\
            dictionary.get("streetRaw")\
            if dictionary.get("streetRaw")\
                else APIHelper.SKIP
        name =\
            dictionary.get("name")\
            if dictionary.get("name")\
                else APIHelper.SKIP
        name_raw =\
            dictionary.get("nameRaw")\
            if dictionary.get("nameRaw")\
                else APIHelper.SKIP
        first_name_raw =\
            dictionary.get("firstNameRaw")\
            if dictionary.get("firstNameRaw")\
                else APIHelper.SKIP
        first_name =\
            dictionary.get("firstName")\
            if dictionary.get("firstName")\
                else APIHelper.SKIP
        middle_name_raw =\
            dictionary.get("middleNameRaw")\
            if dictionary.get("middleNameRaw")\
                else APIHelper.SKIP
        middle_name =\
            dictionary.get("middleName")\
            if dictionary.get("middleName")\
                else APIHelper.SKIP
        last_name_raw =\
            dictionary.get("lastNameRaw")\
            if dictionary.get("lastNameRaw")\
                else APIHelper.SKIP
        last_name =\
            dictionary.get("lastName")\
            if dictionary.get("lastName")\
                else APIHelper.SKIP

        additional_properties = APIHelper.get_additional_properties(
            dictionary={k: v for k, v in dictionary.items()
                        if k not in cls._names.values()},
            unboxing_function=lambda value: value)

        # Return an object of this model
        return cls(code,
                   code_raw,
                   email,
                   email_raw,
                   phone_number,
                   phone_number_raw,
                   postal_code,
                   postal_code_raw,
                   street,
                   street_raw,
                   name,
                   name_raw,
                   first_name_raw,
                   first_name,
                   middle_name_raw,
                   middle_name,
                   last_name_raw,
                   last_name,
                   additional_properties)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _code=(
            self.code
            if hasattr(self, "code")
            else None
        )
        _code_raw=(
            self.code_raw
            if hasattr(self, "code_raw")
            else None
        )
        _email=(
            self.email
            if hasattr(self, "email")
            else None
        )
        _email_raw=(
            self.email_raw
            if hasattr(self, "email_raw")
            else None
        )
        _phone_number=(
            self.phone_number
            if hasattr(self, "phone_number")
            else None
        )
        _phone_number_raw=(
            self.phone_number_raw
            if hasattr(self, "phone_number_raw")
            else None
        )
        _postal_code=(
            self.postal_code
            if hasattr(self, "postal_code")
            else None
        )
        _postal_code_raw=(
            self.postal_code_raw
            if hasattr(self, "postal_code_raw")
            else None
        )
        _street=(
            self.street
            if hasattr(self, "street")
            else None
        )
        _street_raw=(
            self.street_raw
            if hasattr(self, "street_raw")
            else None
        )
        _name=(
            self.name
            if hasattr(self, "name")
            else None
        )
        _name_raw=(
            self.name_raw
            if hasattr(self, "name_raw")
            else None
        )
        _first_name_raw=(
            self.first_name_raw
            if hasattr(self, "first_name_raw")
            else None
        )
        _first_name=(
            self.first_name
            if hasattr(self, "first_name")
            else None
        )
        _middle_name_raw=(
            self.middle_name_raw
            if hasattr(self, "middle_name_raw")
            else None
        )
        _middle_name=(
            self.middle_name
            if hasattr(self, "middle_name")
            else None
        )
        _last_name_raw=(
            self.last_name_raw
            if hasattr(self, "last_name_raw")
            else None
        )
        _last_name=(
            self.last_name
            if hasattr(self, "last_name")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"code={_code!r}, "
            f"code_raw={_code_raw!r}, "
            f"email={_email!r}, "
            f"email_raw={_email_raw!r}, "
            f"phone_number={_phone_number!r}, "
            f"phone_number_raw={_phone_number_raw!r}, "
            f"postal_code={_postal_code!r}, "
            f"postal_code_raw={_postal_code_raw!r}, "
            f"street={_street!r}, "
            f"street_raw={_street_raw!r}, "
            f"name={_name!r}, "
            f"name_raw={_name_raw!r}, "
            f"first_name_raw={_first_name_raw!r}, "
            f"first_name={_first_name!r}, "
            f"middle_name_raw={_middle_name_raw!r}, "
            f"middle_name={_middle_name!r}, "
            f"last_name_raw={_last_name_raw!r}, "
            f"last_name={_last_name!r}, "
            f"additional_properties={_additional_properties!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _code=(
            self.code
            if hasattr(self, "code")
            else None
        )
        _code_raw=(
            self.code_raw
            if hasattr(self, "code_raw")
            else None
        )
        _email=(
            self.email
            if hasattr(self, "email")
            else None
        )
        _email_raw=(
            self.email_raw
            if hasattr(self, "email_raw")
            else None
        )
        _phone_number=(
            self.phone_number
            if hasattr(self, "phone_number")
            else None
        )
        _phone_number_raw=(
            self.phone_number_raw
            if hasattr(self, "phone_number_raw")
            else None
        )
        _postal_code=(
            self.postal_code
            if hasattr(self, "postal_code")
            else None
        )
        _postal_code_raw=(
            self.postal_code_raw
            if hasattr(self, "postal_code_raw")
            else None
        )
        _street=(
            self.street
            if hasattr(self, "street")
            else None
        )
        _street_raw=(
            self.street_raw
            if hasattr(self, "street_raw")
            else None
        )
        _name=(
            self.name
            if hasattr(self, "name")
            else None
        )
        _name_raw=(
            self.name_raw
            if hasattr(self, "name_raw")
            else None
        )
        _first_name_raw=(
            self.first_name_raw
            if hasattr(self, "first_name_raw")
            else None
        )
        _first_name=(
            self.first_name
            if hasattr(self, "first_name")
            else None
        )
        _middle_name_raw=(
            self.middle_name_raw
            if hasattr(self, "middle_name_raw")
            else None
        )
        _middle_name=(
            self.middle_name
            if hasattr(self, "middle_name")
            else None
        )
        _last_name_raw=(
            self.last_name_raw
            if hasattr(self, "last_name_raw")
            else None
        )
        _last_name=(
            self.last_name
            if hasattr(self, "last_name")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"code={_code!s}, "
            f"code_raw={_code_raw!s}, "
            f"email={_email!s}, "
            f"email_raw={_email_raw!s}, "
            f"phone_number={_phone_number!s}, "
            f"phone_number_raw={_phone_number_raw!s}, "
            f"postal_code={_postal_code!s}, "
            f"postal_code_raw={_postal_code_raw!s}, "
            f"street={_street!s}, "
            f"street_raw={_street_raw!s}, "
            f"name={_name!s}, "
            f"name_raw={_name_raw!s}, "
            f"first_name_raw={_first_name_raw!s}, "
            f"first_name={_first_name!s}, "
            f"middle_name_raw={_middle_name_raw!s}, "
            f"middle_name={_middle_name!s}, "
            f"last_name_raw={_last_name_raw!s}, "
            f"last_name={_last_name!s}, "
            f"additional_properties={_additional_properties!s}, "
            f")"
        )
