"""visaacceptancemergedspec.

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

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


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

    Attributes:
        risk_analysis_exemption_result (str): Possible values: Visa Platform Connect
            - `8401` Merchant not participating in Visa Trusted Listing Program. -
            `8402` Issuer not participating in Visa Trusted Listing Program. - `8403`
            Cardholder has not trusted the merchant (supplied by Visa Net). - `8404`
            Indeterminate or invalid issuer response. - `8473` Cardholder has not
            trusted the merchant (issuer-supplied). - `8474` Did not meet the
            exemption criteria (issuer-supplied).  Upto 20 Values may be received in
            a transaction.
        trusted_merchant_exemption_result (str): Possible values: Visa Platform
            Connect - `2` Trusted merchant exemption validated/honored. - `3` Trusted
            merchant exemption failed validation/not honored.
        low_value_exemption_result (str): This will be the value returned by Visanet
            when low value exemption has been requested.  Valid values: Visa Platform
            Connect - `2` Low value exemption validated/honored - `3` Low value
            exemption failed validation/not honored
        secure_corporate_payment_result (str): This will be the value returned by
            Visanet when secure corporate payment (scp) exemption has been requested.
            Valid values: Visa Platform Connect - `2` Secure corporate payment
            exemption validated/honored - `3` Secure corporate payment exemption
            failed validation/not honored
        transaction_risk_analysis_exemption_result (str): This will be the value
            returned by Visanet when transaction risk analysis (TRA) exemption has
            been requested.    Valid values: Visa Platform Connect   - `2`
            transaction risk analysis (TRA) exemption validated/honored   - `3`
            transaction risk analysis (TRA) exemption failed validation/not honored
        delegated_authentication_result (str): This will be the value returned by
            Visanet when delegated authentication has been requested.
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "risk_analysis_exemption_result": "riskAnalysisExemptionResult",
        "trusted_merchant_exemption_result": "trustedMerchantExemptionResult",
        "low_value_exemption_result": "lowValueExemptionResult",
        "secure_corporate_payment_result": "secureCorporatePaymentResult",
        "transaction_risk_analysis_exemption_result":
            "transactionRiskAnalysisExemptionResult",
        "delegated_authentication_result": "delegatedAuthenticationResult",
    }

    _optionals = [
        "risk_analysis_exemption_result",
        "trusted_merchant_exemption_result",
        "low_value_exemption_result",
        "secure_corporate_payment_result",
        "transaction_risk_analysis_exemption_result",
        "delegated_authentication_result",
    ]

    def __init__(
        self,
        risk_analysis_exemption_result=APIHelper.SKIP,
        trusted_merchant_exemption_result=APIHelper.SKIP,
        low_value_exemption_result=APIHelper.SKIP,
        secure_corporate_payment_result=APIHelper.SKIP,
        transaction_risk_analysis_exemption_result=APIHelper.SKIP,
        delegated_authentication_result=APIHelper.SKIP,
        additional_properties=None):
        """Initialize a PaymentsStrongAuthIssuerInformation instance."""
        # Initialize members of the class
        if risk_analysis_exemption_result is not APIHelper.SKIP:
            self.risk_analysis_exemption_result = risk_analysis_exemption_result
        if trusted_merchant_exemption_result is not APIHelper.SKIP:
            self.trusted_merchant_exemption_result =\
                 trusted_merchant_exemption_result
        if low_value_exemption_result is not APIHelper.SKIP:
            self.low_value_exemption_result = low_value_exemption_result
        if secure_corporate_payment_result is not APIHelper.SKIP:
            self.secure_corporate_payment_result = secure_corporate_payment_result
        if transaction_risk_analysis_exemption_result is not APIHelper.SKIP:
            self.transaction_risk_analysis_exemption_result =\
                 transaction_risk_analysis_exemption_result
        if delegated_authentication_result is not APIHelper.SKIP:
            self.delegated_authentication_result = delegated_authentication_result

        # 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
        risk_analysis_exemption_result =\
            dictionary.get("riskAnalysisExemptionResult")\
            if dictionary.get("riskAnalysisExemptionResult")\
                else APIHelper.SKIP
        trusted_merchant_exemption_result =\
            dictionary.get("trustedMerchantExemptionResult")\
            if dictionary.get("trustedMerchantExemptionResult")\
                else APIHelper.SKIP
        low_value_exemption_result =\
            dictionary.get("lowValueExemptionResult")\
            if dictionary.get("lowValueExemptionResult")\
                else APIHelper.SKIP
        secure_corporate_payment_result =\
            dictionary.get("secureCorporatePaymentResult")\
            if dictionary.get("secureCorporatePaymentResult")\
                else APIHelper.SKIP
        transaction_risk_analysis_exemption_result =\
            dictionary.get("transactionRiskAnalysisExemptionResult")\
            if dictionary.get("transactionRiskAnalysisExemptionResult")\
                else APIHelper.SKIP
        delegated_authentication_result =\
            dictionary.get("delegatedAuthenticationResult")\
            if dictionary.get("delegatedAuthenticationResult")\
                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(risk_analysis_exemption_result,
                   trusted_merchant_exemption_result,
                   low_value_exemption_result,
                   secure_corporate_payment_result,
                   transaction_risk_analysis_exemption_result,
                   delegated_authentication_result,
                   additional_properties)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _risk_analysis_exemption_result=(
            self.risk_analysis_exemption_result
            if hasattr(self, "risk_analysis_exemption_result")
            else None
        )
        _trusted_merchant_exemption_result=(
            self.trusted_merchant_exemption_result
            if hasattr(self, "trusted_merchant_exemption_result")
            else None
        )
        _low_value_exemption_result=(
            self.low_value_exemption_result
            if hasattr(self, "low_value_exemption_result")
            else None
        )
        _secure_corporate_payment_result=(
            self.secure_corporate_payment_result
            if hasattr(self, "secure_corporate_payment_result")
            else None
        )
        _transaction_risk_analysis_exemption_result=(
            self.transaction_risk_analysis_exemption_result
            if hasattr(self, "transaction_risk_analysis_exemption_result")
            else None
        )
        _delegated_authentication_result=(
            self.delegated_authentication_result
            if hasattr(self, "delegated_authentication_result")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"risk_analysis_exemption_result={_risk_analysis_exemption_result!r}, "
            f"trusted_merchant_exemption_result={_trusted_merchant_exemption_result!r}, "
            f"low_value_exemption_result={_low_value_exemption_result!r}, "
            f"secure_corporate_payment_result={_secure_corporate_payment_result!r}, "
            f"transaction_risk_analysis_exemption_result={_transaction_risk_analysis_exemption_result!r}, "
            f"delegated_authentication_result={_delegated_authentication_result!r}, "
            f"additional_properties={_additional_properties!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _risk_analysis_exemption_result=(
            self.risk_analysis_exemption_result
            if hasattr(self, "risk_analysis_exemption_result")
            else None
        )
        _trusted_merchant_exemption_result=(
            self.trusted_merchant_exemption_result
            if hasattr(self, "trusted_merchant_exemption_result")
            else None
        )
        _low_value_exemption_result=(
            self.low_value_exemption_result
            if hasattr(self, "low_value_exemption_result")
            else None
        )
        _secure_corporate_payment_result=(
            self.secure_corporate_payment_result
            if hasattr(self, "secure_corporate_payment_result")
            else None
        )
        _transaction_risk_analysis_exemption_result=(
            self.transaction_risk_analysis_exemption_result
            if hasattr(self, "transaction_risk_analysis_exemption_result")
            else None
        )
        _delegated_authentication_result=(
            self.delegated_authentication_result
            if hasattr(self, "delegated_authentication_result")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"risk_analysis_exemption_result={_risk_analysis_exemption_result!s}, "
            f"trusted_merchant_exemption_result={_trusted_merchant_exemption_result!s}, "
            f"low_value_exemption_result={_low_value_exemption_result!s}, "
            f"secure_corporate_payment_result={_secure_corporate_payment_result!s}, "
            f"transaction_risk_analysis_exemption_result={_transaction_risk_analysis_exemption_result!s}, "
            f"delegated_authentication_result={_delegated_authentication_result!s}, "
            f"additional_properties={_additional_properties!s}, "
            f")"
        )
