"""visaacceptancemergedspec.

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

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


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

    Attributes:
        account_id (str): Identifier for the recipient’s account. This field is
            applicable for AFT transactions.
        account_type (str): Identifies the recipient’s account type. This field is
            applicable for AFT transactions.  Valid values are:   - `00` for Other
            - `01` for Routing Transit Number (RTN) + Bank Account Number (BAN)   -
            `02` for International Bank Account Number (IBAN)   - `03` for Card
            Account   - `06` for Bank Account Number (BAN) + Bank Identification Code
            (BIC), also known as a SWIFT code
        first_name (str): First name of the recipient. This field is applicable for
            AFT transactions.    Only alpha numeric values are supported. Special
            characters not in the standard ASCII character set, are not supported and
            will be stripped before being sent to sent to the processor.
        middle_name (str): Middle name of the recipient. This field is applicable for
            AFT transactions.  Only alpha numeric values are supported. Special
            characters not in the standard ASCII character set, are not supported and
            will be stripped before being sent to sent to the processor.
        last_name (str): Last name of the recipient. This field is applicable for AFT
            transactions.  Only alpha numeric values are supported. Special
            characters not in the standard ASCII character set, are not supported and
            will be stripped before being sent to sent to the processor.
        address_1 (str): The street address of the recipient This field is applicable
            for AFT and OCT transactions.  Only alpha numeric values are supported.
            Special characters not in the standard ASCII character set are not
            supported and will be stripped before being sent to sent to the processor.
        administrative_area (str): The state or province of the recipient. This field
            is applicable for AFT transactions when the recipient country is US or
            CA. Else it is optional.  Must be a two character value
        postal_code (str): Partial postal code for the recipient’s address. For
            example, if the postal code is **NN5 7SG**, the value for this field
            should be the first part of the postal code: **NN5**. This field is a
            _pass-through_, which means that Visa Acceptance does not verify the
            value or modify it in any way before sending it to the processor. If the
            field is not required for the transaction, Visa Acceptance does not
            forward it to the processor.
        country (str): The country associated with the address of the recipient. This
            field is applicable for AFT and OCT transactions.  Must be a two
            character ISO country code.  For example, see [ISO Country Code](
        date_of_birth (str): Recipient’s date of birth. **Format**: `YYYYMMDD`.  This
            field is a `pass-through`, which means that Visa Acceptance ensures that
            the value is eight numeric characters but otherwise does not verify the
            value or modify it in any way before sending it to the processor. If the
            field is not required for the transaction, Visa Acceptance does not
            forward it to the processor.
        beneficiary_id (str): Only for e-wallets: ID, username, hash or anything
            uniquely identifying the ultimate beneficiary.
        beneficiary_name (str): Only for e-wallets: The ultimate beneficiary’s full
            name.
        beneficiary_address (str): Only for e-wallets: The ultimate beneficiary’s
            street address (street, zip code, city), excluding the country. Example:
            “Main street 1, 12345, Barcelona
        alias_name (str): Account owner alias name.
        nationality (str): Account Owner Nationality
        country_of_birth (str): Account Owner Country of Birth
        occupation (str): Account Owner Occupation
        email (str): Account Owner email address
        locality (str): The city of the recipient. This field is applicable for AFT
            transactions.  Only alpha numeric values are supported. Special
            characters not in the standard ASCII character set are not supported and
            will be stripped before being sent to sent to the processor.
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "account_id": "accountId",
        "account_type": "accountType",
        "first_name": "firstName",
        "middle_name": "middleName",
        "last_name": "lastName",
        "address_1": "address1",
        "administrative_area": "administrativeArea",
        "postal_code": "postalCode",
        "country": "country",
        "date_of_birth": "dateOfBirth",
        "beneficiary_id": "beneficiaryId",
        "beneficiary_name": "beneficiaryName",
        "beneficiary_address": "beneficiaryAddress",
        "alias_name": "aliasName",
        "nationality": "nationality",
        "country_of_birth": "countryOfBirth",
        "occupation": "occupation",
        "email": "email",
        "locality": "locality",
    }

    _optionals = [
        "account_id",
        "account_type",
        "first_name",
        "middle_name",
        "last_name",
        "address_1",
        "administrative_area",
        "postal_code",
        "country",
        "date_of_birth",
        "beneficiary_id",
        "beneficiary_name",
        "beneficiary_address",
        "alias_name",
        "nationality",
        "country_of_birth",
        "occupation",
        "email",
        "locality",
    ]

    def __init__(
        self,
        account_id=APIHelper.SKIP,
        account_type=APIHelper.SKIP,
        first_name=APIHelper.SKIP,
        middle_name=APIHelper.SKIP,
        last_name=APIHelper.SKIP,
        address_1=APIHelper.SKIP,
        administrative_area=APIHelper.SKIP,
        postal_code=APIHelper.SKIP,
        country=APIHelper.SKIP,
        date_of_birth=APIHelper.SKIP,
        beneficiary_id=APIHelper.SKIP,
        beneficiary_name=APIHelper.SKIP,
        beneficiary_address=APIHelper.SKIP,
        alias_name=APIHelper.SKIP,
        nationality=APIHelper.SKIP,
        country_of_birth=APIHelper.SKIP,
        occupation=APIHelper.SKIP,
        email=APIHelper.SKIP,
        locality=APIHelper.SKIP,
        additional_properties=None):
        """Initialize a RecipientInformation instance."""
        # Initialize members of the class
        if account_id is not APIHelper.SKIP:
            self.account_id = account_id
        if account_type is not APIHelper.SKIP:
            self.account_type = account_type
        if first_name is not APIHelper.SKIP:
            self.first_name = first_name
        if middle_name is not APIHelper.SKIP:
            self.middle_name = middle_name
        if last_name is not APIHelper.SKIP:
            self.last_name = last_name
        if address_1 is not APIHelper.SKIP:
            self.address_1 = address_1
        if administrative_area is not APIHelper.SKIP:
            self.administrative_area = administrative_area
        if postal_code is not APIHelper.SKIP:
            self.postal_code = postal_code
        if country is not APIHelper.SKIP:
            self.country = country
        if date_of_birth is not APIHelper.SKIP:
            self.date_of_birth = date_of_birth
        if beneficiary_id is not APIHelper.SKIP:
            self.beneficiary_id = beneficiary_id
        if beneficiary_name is not APIHelper.SKIP:
            self.beneficiary_name = beneficiary_name
        if beneficiary_address is not APIHelper.SKIP:
            self.beneficiary_address = beneficiary_address
        if alias_name is not APIHelper.SKIP:
            self.alias_name = alias_name
        if nationality is not APIHelper.SKIP:
            self.nationality = nationality
        if country_of_birth is not APIHelper.SKIP:
            self.country_of_birth = country_of_birth
        if occupation is not APIHelper.SKIP:
            self.occupation = occupation
        if email is not APIHelper.SKIP:
            self.email = email
        if locality is not APIHelper.SKIP:
            self.locality = locality

        # 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
        account_id =\
            dictionary.get("accountId")\
            if dictionary.get("accountId")\
                else APIHelper.SKIP
        account_type =\
            dictionary.get("accountType")\
            if dictionary.get("accountType")\
                else APIHelper.SKIP
        first_name =\
            dictionary.get("firstName")\
            if dictionary.get("firstName")\
                else APIHelper.SKIP
        middle_name =\
            dictionary.get("middleName")\
            if dictionary.get("middleName")\
                else APIHelper.SKIP
        last_name =\
            dictionary.get("lastName")\
            if dictionary.get("lastName")\
                else APIHelper.SKIP
        address_1 =\
            dictionary.get("address1")\
            if dictionary.get("address1")\
                else APIHelper.SKIP
        administrative_area =\
            dictionary.get("administrativeArea")\
            if dictionary.get("administrativeArea")\
                else APIHelper.SKIP
        postal_code =\
            dictionary.get("postalCode")\
            if dictionary.get("postalCode")\
                else APIHelper.SKIP
        country =\
            dictionary.get("country")\
            if dictionary.get("country")\
                else APIHelper.SKIP
        date_of_birth =\
            dictionary.get("dateOfBirth")\
            if dictionary.get("dateOfBirth")\
                else APIHelper.SKIP
        beneficiary_id =\
            dictionary.get("beneficiaryId")\
            if dictionary.get("beneficiaryId")\
                else APIHelper.SKIP
        beneficiary_name =\
            dictionary.get("beneficiaryName")\
            if dictionary.get("beneficiaryName")\
                else APIHelper.SKIP
        beneficiary_address =\
            dictionary.get("beneficiaryAddress")\
            if dictionary.get("beneficiaryAddress")\
                else APIHelper.SKIP
        alias_name =\
            dictionary.get("aliasName")\
            if dictionary.get("aliasName")\
                else APIHelper.SKIP
        nationality =\
            dictionary.get("nationality")\
            if dictionary.get("nationality")\
                else APIHelper.SKIP
        country_of_birth =\
            dictionary.get("countryOfBirth")\
            if dictionary.get("countryOfBirth")\
                else APIHelper.SKIP
        occupation =\
            dictionary.get("occupation")\
            if dictionary.get("occupation")\
                else APIHelper.SKIP
        email =\
            dictionary.get("email")\
            if dictionary.get("email")\
                else APIHelper.SKIP
        locality =\
            dictionary.get("locality")\
            if dictionary.get("locality")\
                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(account_id,
                   account_type,
                   first_name,
                   middle_name,
                   last_name,
                   address_1,
                   administrative_area,
                   postal_code,
                   country,
                   date_of_birth,
                   beneficiary_id,
                   beneficiary_name,
                   beneficiary_address,
                   alias_name,
                   nationality,
                   country_of_birth,
                   occupation,
                   email,
                   locality,
                   additional_properties)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _account_id=(
            self.account_id
            if hasattr(self, "account_id")
            else None
        )
        _account_type=(
            self.account_type
            if hasattr(self, "account_type")
            else None
        )
        _first_name=(
            self.first_name
            if hasattr(self, "first_name")
            else None
        )
        _middle_name=(
            self.middle_name
            if hasattr(self, "middle_name")
            else None
        )
        _last_name=(
            self.last_name
            if hasattr(self, "last_name")
            else None
        )
        _address_1=(
            self.address_1
            if hasattr(self, "address_1")
            else None
        )
        _administrative_area=(
            self.administrative_area
            if hasattr(self, "administrative_area")
            else None
        )
        _postal_code=(
            self.postal_code
            if hasattr(self, "postal_code")
            else None
        )
        _country=(
            self.country
            if hasattr(self, "country")
            else None
        )
        _date_of_birth=(
            self.date_of_birth
            if hasattr(self, "date_of_birth")
            else None
        )
        _beneficiary_id=(
            self.beneficiary_id
            if hasattr(self, "beneficiary_id")
            else None
        )
        _beneficiary_name=(
            self.beneficiary_name
            if hasattr(self, "beneficiary_name")
            else None
        )
        _beneficiary_address=(
            self.beneficiary_address
            if hasattr(self, "beneficiary_address")
            else None
        )
        _alias_name=(
            self.alias_name
            if hasattr(self, "alias_name")
            else None
        )
        _nationality=(
            self.nationality
            if hasattr(self, "nationality")
            else None
        )
        _country_of_birth=(
            self.country_of_birth
            if hasattr(self, "country_of_birth")
            else None
        )
        _occupation=(
            self.occupation
            if hasattr(self, "occupation")
            else None
        )
        _email=(
            self.email
            if hasattr(self, "email")
            else None
        )
        _locality=(
            self.locality
            if hasattr(self, "locality")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"account_id={_account_id!r}, "
            f"account_type={_account_type!r}, "
            f"first_name={_first_name!r}, "
            f"middle_name={_middle_name!r}, "
            f"last_name={_last_name!r}, "
            f"address_1={_address_1!r}, "
            f"administrative_area={_administrative_area!r}, "
            f"postal_code={_postal_code!r}, "
            f"country={_country!r}, "
            f"date_of_birth={_date_of_birth!r}, "
            f"beneficiary_id={_beneficiary_id!r}, "
            f"beneficiary_name={_beneficiary_name!r}, "
            f"beneficiary_address={_beneficiary_address!r}, "
            f"alias_name={_alias_name!r}, "
            f"nationality={_nationality!r}, "
            f"country_of_birth={_country_of_birth!r}, "
            f"occupation={_occupation!r}, "
            f"email={_email!r}, "
            f"locality={_locality!r}, "
            f"additional_properties={_additional_properties!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _account_id=(
            self.account_id
            if hasattr(self, "account_id")
            else None
        )
        _account_type=(
            self.account_type
            if hasattr(self, "account_type")
            else None
        )
        _first_name=(
            self.first_name
            if hasattr(self, "first_name")
            else None
        )
        _middle_name=(
            self.middle_name
            if hasattr(self, "middle_name")
            else None
        )
        _last_name=(
            self.last_name
            if hasattr(self, "last_name")
            else None
        )
        _address_1=(
            self.address_1
            if hasattr(self, "address_1")
            else None
        )
        _administrative_area=(
            self.administrative_area
            if hasattr(self, "administrative_area")
            else None
        )
        _postal_code=(
            self.postal_code
            if hasattr(self, "postal_code")
            else None
        )
        _country=(
            self.country
            if hasattr(self, "country")
            else None
        )
        _date_of_birth=(
            self.date_of_birth
            if hasattr(self, "date_of_birth")
            else None
        )
        _beneficiary_id=(
            self.beneficiary_id
            if hasattr(self, "beneficiary_id")
            else None
        )
        _beneficiary_name=(
            self.beneficiary_name
            if hasattr(self, "beneficiary_name")
            else None
        )
        _beneficiary_address=(
            self.beneficiary_address
            if hasattr(self, "beneficiary_address")
            else None
        )
        _alias_name=(
            self.alias_name
            if hasattr(self, "alias_name")
            else None
        )
        _nationality=(
            self.nationality
            if hasattr(self, "nationality")
            else None
        )
        _country_of_birth=(
            self.country_of_birth
            if hasattr(self, "country_of_birth")
            else None
        )
        _occupation=(
            self.occupation
            if hasattr(self, "occupation")
            else None
        )
        _email=(
            self.email
            if hasattr(self, "email")
            else None
        )
        _locality=(
            self.locality
            if hasattr(self, "locality")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"account_id={_account_id!s}, "
            f"account_type={_account_type!s}, "
            f"first_name={_first_name!s}, "
            f"middle_name={_middle_name!s}, "
            f"last_name={_last_name!s}, "
            f"address_1={_address_1!s}, "
            f"administrative_area={_administrative_area!s}, "
            f"postal_code={_postal_code!s}, "
            f"country={_country!s}, "
            f"date_of_birth={_date_of_birth!s}, "
            f"beneficiary_id={_beneficiary_id!s}, "
            f"beneficiary_name={_beneficiary_name!s}, "
            f"beneficiary_address={_beneficiary_address!s}, "
            f"alias_name={_alias_name!s}, "
            f"nationality={_nationality!s}, "
            f"country_of_birth={_country_of_birth!s}, "
            f"occupation={_occupation!s}, "
            f"email={_email!s}, "
            f"locality={_locality!s}, "
            f"additional_properties={_additional_properties!s}, "
            f")"
        )
