"""visaacceptancemergedspec.

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

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


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

    Attributes:
        title (str): Title.
        first_name (str): Customer’s first name. This name must be the same as the
            name on the card.  **Important** It is your responsibility to determine
            whether a field is required for the transaction you are requesting.  ####
            SEPA Required for Create Mandate and Import Mandate #### BACS Required
            for Import Mandate  #### Visa Acceptance Latin American Processing
            **Important** For an authorization request, Visa Acceptance Latin
            American Processing concatenates `orderInformation.billTo.firstName` and
            `orderInformation.billTo.lastName`. If the concatenated value exceeds 30
            characters, Visa Acceptance Latin American Processing declines the
            authorization request.\ **Note** Visa Acceptance Latin American
            Processing is the name of a specific processing connection that Visa
            Acceptance supports. In the Visa Acceptance API documentation, Visa
            Acceptance Latin American Processing does not refer to the general topic
            of processing in Latin America. The information in this field description
            is for the specific processing connection called _Visa Acceptance Latin
            American Processing_. It is not for any other Latin American processors
            that Visa Acceptance supports.  #### Visa Acceptance through VisaNet
            Credit card networks cannot process transactions that contain non-ASCII
            characters. Visa Acceptance through VisaNet accepts and stores non-ASCII
            characters correctly and displays them correctly in reports. However, the
            limitations of the credit card networks prevent Visa Acceptance through
            VisaNet from transmitting non-ASCII characters to the credit card
            networks. Therefore, Visa Acceptance through VisaNet replaces non-ASCII
            characters with meaningless ASCII characters for transmission to the
            credit card networks.  #### For Payouts: This field may be sent only for
            FDC Compass.  #### Chase Paymentech Solutions Optional field.  ####
            Credit Mutuel-CIC Optional field.  #### OmniPay Direct Optional field.
            #### SIX Optional field.  #### TSYS Acquiring Solutions Required when
            `processingInformation.billPaymentOptions.billPayment=true` and
            `pointOfSaleInformation.entryMode=keyed`.  #### Worldpay VAP Optional
            field.  #### All other processors Not used.
        middle_name (str): Customer’s middle name.
        last_name (str): Customer’s last name. This name must be the same as the name
            on the card.  **Important** It is your responsibility to determine
            whether a field is required for the transaction you are requesting.  ####
            SEPA Required for Create Mandate and Import Mandate #### BACS Required
            for Import Mandate #### Chase Paymentech Solutions Optional field.  ####
            Credit Mutuel-CIC Optional field.  #### Visa Acceptance Latin American
            Processing **Important** For an authorization request, Visa Acceptance
            Latin American Processing concatenates
            `orderInformation.billTo.firstName` and
            `orderInformation.billTo.lastName`. If the concatenated value exceeds 30
            characters, Visa Acceptance Latin American Processing declines the
            authorization request.\ **Note** Visa Acceptance Latin American
            Processing is the name of a specific processing connection that Visa
            Acceptance supports. In the Visa Acceptance API documentation, Visa
            Acceptance Latin American Processing does not refer to the general topic
            of processing in Latin America. The information in this field description
            is for the specific processing connection called Visa Acceptance Latin
            American Processing. It is not for any other Latin American processors
            that Visa Acceptance supports.  #### Visa Acceptance through VisaNet
            Credit card networks cannot process transactions that contain non-ASCII
            characters. Visa Acceptance through VisaNet accepts and stores non-ASCII
            characters correctly and displays them correctly in reports. However, the
            limitations of the credit card networks prevent Visa Acceptance through
            VisaNet from transmitting non-ASCII characters to the credit card
            networks. Therefore, Visa Acceptance through VisaNet replaces non-ASCII
            characters with meaningless ASCII characters for transmission to the
            credit card networks.  #### For Payouts: This field may be sent only for
            FDC Compass.  #### OmniPay Direct Optional field.  #### RBS WorldPay
            Atlanta Optional field.  #### SIX Optional field.  #### TSYS Acquiring
            Solutions Required when
            `processingInformation.billPaymentOptions.billPayment=true` and
            `pointOfSaleInformation.entryMode=keyed`.  #### Worldpay VAP Optional
            field.  #### All other processors Not used.
        name_suffix (str): Customer’s name suffix.
        address_1 (str): First line of the billing street address.
        address_2 (str): Second line of the billing street address.
        locality (str): City of the billing address.
        postal_code (str): Postal code for the billing address. The postal code must
            consist of 5 to 9 digits. When the billing country is the U.S., the
            9-digit postal code must follow this format: [5 digits][dash][4 digits]
            Example: 12345-6789 When the billing country is Canada, the 6-digit
            postal code must follow this format:
            [alpha][numeric][alpha][space][numeric][alpha][numeric] Example: A1B 2C3
        administrative_area (str): State or province of the billing address. Use the
            State, Province, and Territory Codes for the United States and Canada.
        country (str): Country of the billing address. Use the two-character ISO
            Standard Country Codes.
        email (str): Customer's email address.
        phone_number (str): Customer’s phone number.  It is recommended that you
            include the country code when the order is from outside the U.S.  ####
            Chase Paymentech Solutions Optional field.  ####  Credit Mutuel-CIC
            Optional field.  #### Visa Acceptance through VisaNet Credit card
            networks cannot process transactions that contain non-ASCII characters.
            Visa Acceptance through VisaNet accepts and stores non-ASCII characters
            correctly and displays them correctly in reports. However, the
            limitations of the credit card networks prevent Visa Acceptance through
            VisaNet from transmitting non-ASCII characters to the credit card
            networks. Therefore, Visa Acceptance through VisaNet replaces non-ASCII
            characters with meaningless ASCII characters for transmission to the
            credit card networks.  #### For Payouts: This field may be sent only for
            FDC Compass.  #### OmniPay Direct Optional field.  #### SIX Optional
            field.  #### TSYS Acquiring Solutions Optional field.  #### Worldpay VAP
            Optional field.  #### All other processors Not used.
        verification_status (str): Whether buyer has verified their identity. Used in
            case of PayPal transactions.  Possible Values: * VERIFIED * UNVERIFIED
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "title": "title",
        "first_name": "firstName",
        "middle_name": "middleName",
        "last_name": "lastName",
        "name_suffix": "nameSuffix",
        "address_1": "address1",
        "address_2": "address2",
        "locality": "locality",
        "postal_code": "postalCode",
        "administrative_area": "administrativeArea",
        "country": "country",
        "email": "email",
        "phone_number": "phoneNumber",
        "verification_status": "verificationStatus",
    }

    _optionals = [
        "title",
        "first_name",
        "middle_name",
        "last_name",
        "name_suffix",
        "address_1",
        "address_2",
        "locality",
        "postal_code",
        "administrative_area",
        "country",
        "email",
        "phone_number",
        "verification_status",
    ]

    def __init__(
        self,
        title=APIHelper.SKIP,
        first_name=APIHelper.SKIP,
        middle_name=APIHelper.SKIP,
        last_name=APIHelper.SKIP,
        name_suffix=APIHelper.SKIP,
        address_1=APIHelper.SKIP,
        address_2=APIHelper.SKIP,
        locality=APIHelper.SKIP,
        postal_code=APIHelper.SKIP,
        administrative_area=APIHelper.SKIP,
        country=APIHelper.SKIP,
        email=APIHelper.SKIP,
        phone_number=APIHelper.SKIP,
        verification_status=APIHelper.SKIP,
        additional_properties=None):
        """Initialize a BillTo11 instance."""
        # Initialize members of the class
        if title is not APIHelper.SKIP:
            self.title = title
        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 name_suffix is not APIHelper.SKIP:
            self.name_suffix = name_suffix
        if address_1 is not APIHelper.SKIP:
            self.address_1 = address_1
        if address_2 is not APIHelper.SKIP:
            self.address_2 = address_2
        if locality is not APIHelper.SKIP:
            self.locality = locality
        if postal_code is not APIHelper.SKIP:
            self.postal_code = postal_code
        if administrative_area is not APIHelper.SKIP:
            self.administrative_area = administrative_area
        if country is not APIHelper.SKIP:
            self.country = country
        if email is not APIHelper.SKIP:
            self.email = email
        if phone_number is not APIHelper.SKIP:
            self.phone_number = phone_number
        if verification_status is not APIHelper.SKIP:
            self.verification_status = verification_status

        # 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
        title =\
            dictionary.get("title")\
            if dictionary.get("title")\
                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
        name_suffix =\
            dictionary.get("nameSuffix")\
            if dictionary.get("nameSuffix")\
                else APIHelper.SKIP
        address_1 =\
            dictionary.get("address1")\
            if dictionary.get("address1")\
                else APIHelper.SKIP
        address_2 =\
            dictionary.get("address2")\
            if dictionary.get("address2")\
                else APIHelper.SKIP
        locality =\
            dictionary.get("locality")\
            if dictionary.get("locality")\
                else APIHelper.SKIP
        postal_code =\
            dictionary.get("postalCode")\
            if dictionary.get("postalCode")\
                else APIHelper.SKIP
        administrative_area =\
            dictionary.get("administrativeArea")\
            if dictionary.get("administrativeArea")\
                else APIHelper.SKIP
        country =\
            dictionary.get("country")\
            if dictionary.get("country")\
                else APIHelper.SKIP
        email =\
            dictionary.get("email")\
            if dictionary.get("email")\
                else APIHelper.SKIP
        phone_number =\
            dictionary.get("phoneNumber")\
            if dictionary.get("phoneNumber")\
                else APIHelper.SKIP
        verification_status =\
            dictionary.get("verificationStatus")\
            if dictionary.get("verificationStatus")\
                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(title,
                   first_name,
                   middle_name,
                   last_name,
                   name_suffix,
                   address_1,
                   address_2,
                   locality,
                   postal_code,
                   administrative_area,
                   country,
                   email,
                   phone_number,
                   verification_status,
                   additional_properties)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _title=(
            self.title
            if hasattr(self, "title")
            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
        )
        _name_suffix=(
            self.name_suffix
            if hasattr(self, "name_suffix")
            else None
        )
        _address_1=(
            self.address_1
            if hasattr(self, "address_1")
            else None
        )
        _address_2=(
            self.address_2
            if hasattr(self, "address_2")
            else None
        )
        _locality=(
            self.locality
            if hasattr(self, "locality")
            else None
        )
        _postal_code=(
            self.postal_code
            if hasattr(self, "postal_code")
            else None
        )
        _administrative_area=(
            self.administrative_area
            if hasattr(self, "administrative_area")
            else None
        )
        _country=(
            self.country
            if hasattr(self, "country")
            else None
        )
        _email=(
            self.email
            if hasattr(self, "email")
            else None
        )
        _phone_number=(
            self.phone_number
            if hasattr(self, "phone_number")
            else None
        )
        _verification_status=(
            self.verification_status
            if hasattr(self, "verification_status")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"title={_title!r}, "
            f"first_name={_first_name!r}, "
            f"middle_name={_middle_name!r}, "
            f"last_name={_last_name!r}, "
            f"name_suffix={_name_suffix!r}, "
            f"address_1={_address_1!r}, "
            f"address_2={_address_2!r}, "
            f"locality={_locality!r}, "
            f"postal_code={_postal_code!r}, "
            f"administrative_area={_administrative_area!r}, "
            f"country={_country!r}, "
            f"email={_email!r}, "
            f"phone_number={_phone_number!r}, "
            f"verification_status={_verification_status!r}, "
            f"additional_properties={_additional_properties!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _title=(
            self.title
            if hasattr(self, "title")
            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
        )
        _name_suffix=(
            self.name_suffix
            if hasattr(self, "name_suffix")
            else None
        )
        _address_1=(
            self.address_1
            if hasattr(self, "address_1")
            else None
        )
        _address_2=(
            self.address_2
            if hasattr(self, "address_2")
            else None
        )
        _locality=(
            self.locality
            if hasattr(self, "locality")
            else None
        )
        _postal_code=(
            self.postal_code
            if hasattr(self, "postal_code")
            else None
        )
        _administrative_area=(
            self.administrative_area
            if hasattr(self, "administrative_area")
            else None
        )
        _country=(
            self.country
            if hasattr(self, "country")
            else None
        )
        _email=(
            self.email
            if hasattr(self, "email")
            else None
        )
        _phone_number=(
            self.phone_number
            if hasattr(self, "phone_number")
            else None
        )
        _verification_status=(
            self.verification_status
            if hasattr(self, "verification_status")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"title={_title!s}, "
            f"first_name={_first_name!s}, "
            f"middle_name={_middle_name!s}, "
            f"last_name={_last_name!s}, "
            f"name_suffix={_name_suffix!s}, "
            f"address_1={_address_1!s}, "
            f"address_2={_address_2!s}, "
            f"locality={_locality!s}, "
            f"postal_code={_postal_code!s}, "
            f"administrative_area={_administrative_area!s}, "
            f"country={_country!s}, "
            f"email={_email!s}, "
            f"phone_number={_phone_number!s}, "
            f"verification_status={_verification_status!s}, "
            f"additional_properties={_additional_properties!s}, "
            f")"
        )
