"""visaacceptancemergedspec.

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

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


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

    Attributes:
        solution_id (str): Identifier for the partner that is integrated to Visa
            Acceptance.  Send this value in all requests that are sent through the
            partner solution. Visa Acceptance assigns the ID to the partner.
            **Note** When you see a solutionId of 999 in reports, the solutionId that
            was submitted is incorrect.
        third_party_certification_number (str): Value that identifies the application
            vendor and application version for a third party gateway. Visa Acceptance
            provides you with this value during testing and validation. This field is
            supported only on Visa Acceptance through VisaNet.  #### Used by
            **Authorization, Authorization Reversal, Capture, Credit, Incremental
            Authorization, and Void** Optional field.  #### PIN debit Required field
            for PIN debit credit, PIN debit purchase, or PIN debit reversal request.
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "solution_id": "solutionId",
        "third_party_certification_number": "thirdPartyCertificationNumber",
    }

    _optionals = [
        "solution_id",
        "third_party_certification_number",
    ]

    def __init__(
        self,
        solution_id=APIHelper.SKIP,
        third_party_certification_number=APIHelper.SKIP,
        additional_properties=None):
        """Initialize a Partner16 instance."""
        # Initialize members of the class
        if solution_id is not APIHelper.SKIP:
            self.solution_id = solution_id
        if third_party_certification_number is not APIHelper.SKIP:
            self.third_party_certification_number = third_party_certification_number

        # 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
        solution_id =\
            dictionary.get("solutionId")\
            if dictionary.get("solutionId")\
                else APIHelper.SKIP
        third_party_certification_number =\
            dictionary.get("thirdPartyCertificationNumber")\
            if dictionary.get("thirdPartyCertificationNumber")\
                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(solution_id,
                   third_party_certification_number,
                   additional_properties)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _solution_id=(
            self.solution_id
            if hasattr(self, "solution_id")
            else None
        )
        _third_party_certification_number=(
            self.third_party_certification_number
            if hasattr(self, "third_party_certification_number")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"solution_id={_solution_id!r}, "
            f"third_party_certification_number={_third_party_certification_number!r}, "
            f"additional_properties={_additional_properties!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _solution_id=(
            self.solution_id
            if hasattr(self, "solution_id")
            else None
        )
        _third_party_certification_number=(
            self.third_party_certification_number
            if hasattr(self, "third_party_certification_number")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"solution_id={_solution_id!s}, "
            f"third_party_certification_number={_third_party_certification_number!s}, "
            f"additional_properties={_additional_properties!s}, "
            f")"
        )
