"""visaacceptancemergedspec.

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

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


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

    Attributes:
        processing_instruction (str): The instruction to process an order. - default
            value: 'NO_INSTRUCTION' - 'ORDER_SAVED_EXPLICITLY'
        authorization_options (AuthorizationOptions5): The model property of type
            AuthorizationOptions5.
        action_list (List[str]): Array of actions (one or more) to be included in the
            order to invoke bundled services along with order. Possible values: -
            `AP_ORDER`: Use this when Alternative Payment Order service is requested.
        high_risk_transaction_flag (str): Indicates if the transaction is flagged as
            high risk.
        transaction_retry (str): Indicates if the transaction is a retry.
        last_one_hr_transaction_count (str): The number of transactions in the last
            one hour.
        last_one_day_transaction_count (str): The number of transactions in the last
            one day.
        last_three_months_txn_count (str): The number of transactions in the last
            three months.
        total_transaction_count (str): The total number of transactions.
        pin_verification (str): Indicates if PIN verification is required.
        face_id_verification (str): Indicates if face ID verification is required.
        user_passed_verification (str): Indicates if the user passed verification.
        ip_address (str): The IP address of the user.
        transaction_date (str): The date of the transaction.
        tangible (str): Indicates if the transaction involves tangible goods.
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "processing_instruction": "processingInstruction",
        "authorization_options": "authorizationOptions",
        "action_list": "actionList",
        "high_risk_transaction_flag": "highRiskTransactionFlag",
        "transaction_retry": "transactionRetry",
        "last_one_hr_transaction_count": "lastOneHrTransactionCount",
        "last_one_day_transaction_count": "lastOneDayTransactionCount",
        "last_three_months_txn_count": "lastThreeMonthsTxnCount",
        "total_transaction_count": "totalTransactionCount",
        "pin_verification": "pinVerification",
        "face_id_verification": "faceIdVerification",
        "user_passed_verification": "userPassedVerification",
        "ip_address": "ipAddress",
        "transaction_date": "transactionDate",
        "tangible": "tangible",
    }

    _optionals = [
        "processing_instruction",
        "authorization_options",
        "action_list",
        "high_risk_transaction_flag",
        "transaction_retry",
        "last_one_hr_transaction_count",
        "last_one_day_transaction_count",
        "last_three_months_txn_count",
        "total_transaction_count",
        "pin_verification",
        "face_id_verification",
        "user_passed_verification",
        "ip_address",
        "transaction_date",
        "tangible",
    ]

    def __init__(
        self,
        processing_instruction=APIHelper.SKIP,
        authorization_options=APIHelper.SKIP,
        action_list=APIHelper.SKIP,
        high_risk_transaction_flag=APIHelper.SKIP,
        transaction_retry=APIHelper.SKIP,
        last_one_hr_transaction_count=APIHelper.SKIP,
        last_one_day_transaction_count=APIHelper.SKIP,
        last_three_months_txn_count=APIHelper.SKIP,
        total_transaction_count=APIHelper.SKIP,
        pin_verification=APIHelper.SKIP,
        face_id_verification=APIHelper.SKIP,
        user_passed_verification=APIHelper.SKIP,
        ip_address=APIHelper.SKIP,
        transaction_date=APIHelper.SKIP,
        tangible=APIHelper.SKIP,
        additional_properties=None):
        """Initialize a ProcessingInformation25 instance."""
        # Initialize members of the class
        if processing_instruction is not APIHelper.SKIP:
            self.processing_instruction = processing_instruction
        if authorization_options is not APIHelper.SKIP:
            self.authorization_options = authorization_options
        if action_list is not APIHelper.SKIP:
            self.action_list = action_list
        if high_risk_transaction_flag is not APIHelper.SKIP:
            self.high_risk_transaction_flag = high_risk_transaction_flag
        if transaction_retry is not APIHelper.SKIP:
            self.transaction_retry = transaction_retry
        if last_one_hr_transaction_count is not APIHelper.SKIP:
            self.last_one_hr_transaction_count = last_one_hr_transaction_count
        if last_one_day_transaction_count is not APIHelper.SKIP:
            self.last_one_day_transaction_count = last_one_day_transaction_count
        if last_three_months_txn_count is not APIHelper.SKIP:
            self.last_three_months_txn_count = last_three_months_txn_count
        if total_transaction_count is not APIHelper.SKIP:
            self.total_transaction_count = total_transaction_count
        if pin_verification is not APIHelper.SKIP:
            self.pin_verification = pin_verification
        if face_id_verification is not APIHelper.SKIP:
            self.face_id_verification = face_id_verification
        if user_passed_verification is not APIHelper.SKIP:
            self.user_passed_verification = user_passed_verification
        if ip_address is not APIHelper.SKIP:
            self.ip_address = ip_address
        if transaction_date is not APIHelper.SKIP:
            self.transaction_date = transaction_date
        if tangible is not APIHelper.SKIP:
            self.tangible = tangible

        # 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
        processing_instruction =\
            dictionary.get("processingInstruction")\
            if dictionary.get("processingInstruction")\
                else APIHelper.SKIP
        authorization_options =\
            AuthorizationOptions5.from_dictionary(
                dictionary.get("authorizationOptions"))\
                if "authorizationOptions" in dictionary.keys()\
                else APIHelper.SKIP
        action_list =\
            dictionary.get("actionList")\
            if dictionary.get("actionList")\
                else APIHelper.SKIP
        high_risk_transaction_flag =\
            dictionary.get("highRiskTransactionFlag")\
            if dictionary.get("highRiskTransactionFlag")\
                else APIHelper.SKIP
        transaction_retry =\
            dictionary.get("transactionRetry")\
            if dictionary.get("transactionRetry")\
                else APIHelper.SKIP
        last_one_hr_transaction_count =\
            dictionary.get("lastOneHrTransactionCount")\
            if dictionary.get("lastOneHrTransactionCount")\
                else APIHelper.SKIP
        last_one_day_transaction_count =\
            dictionary.get("lastOneDayTransactionCount")\
            if dictionary.get("lastOneDayTransactionCount")\
                else APIHelper.SKIP
        last_three_months_txn_count =\
            dictionary.get("lastThreeMonthsTxnCount")\
            if dictionary.get("lastThreeMonthsTxnCount")\
                else APIHelper.SKIP
        total_transaction_count =\
            dictionary.get("totalTransactionCount")\
            if dictionary.get("totalTransactionCount")\
                else APIHelper.SKIP
        pin_verification =\
            dictionary.get("pinVerification")\
            if dictionary.get("pinVerification")\
                else APIHelper.SKIP
        face_id_verification =\
            dictionary.get("faceIdVerification")\
            if dictionary.get("faceIdVerification")\
                else APIHelper.SKIP
        user_passed_verification =\
            dictionary.get("userPassedVerification")\
            if dictionary.get("userPassedVerification")\
                else APIHelper.SKIP
        ip_address =\
            dictionary.get("ipAddress")\
            if dictionary.get("ipAddress")\
                else APIHelper.SKIP
        transaction_date =\
            dictionary.get("transactionDate")\
            if dictionary.get("transactionDate")\
                else APIHelper.SKIP
        tangible =\
            dictionary.get("tangible")\
            if dictionary.get("tangible")\
                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(processing_instruction,
                   authorization_options,
                   action_list,
                   high_risk_transaction_flag,
                   transaction_retry,
                   last_one_hr_transaction_count,
                   last_one_day_transaction_count,
                   last_three_months_txn_count,
                   total_transaction_count,
                   pin_verification,
                   face_id_verification,
                   user_passed_verification,
                   ip_address,
                   transaction_date,
                   tangible,
                   additional_properties)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _processing_instruction=(
            self.processing_instruction
            if hasattr(self, "processing_instruction")
            else None
        )
        _authorization_options=(
            self.authorization_options
            if hasattr(self, "authorization_options")
            else None
        )
        _action_list=(
            self.action_list
            if hasattr(self, "action_list")
            else None
        )
        _high_risk_transaction_flag=(
            self.high_risk_transaction_flag
            if hasattr(self, "high_risk_transaction_flag")
            else None
        )
        _transaction_retry=(
            self.transaction_retry
            if hasattr(self, "transaction_retry")
            else None
        )
        _last_one_hr_transaction_count=(
            self.last_one_hr_transaction_count
            if hasattr(self, "last_one_hr_transaction_count")
            else None
        )
        _last_one_day_transaction_count=(
            self.last_one_day_transaction_count
            if hasattr(self, "last_one_day_transaction_count")
            else None
        )
        _last_three_months_txn_count=(
            self.last_three_months_txn_count
            if hasattr(self, "last_three_months_txn_count")
            else None
        )
        _total_transaction_count=(
            self.total_transaction_count
            if hasattr(self, "total_transaction_count")
            else None
        )
        _pin_verification=(
            self.pin_verification
            if hasattr(self, "pin_verification")
            else None
        )
        _face_id_verification=(
            self.face_id_verification
            if hasattr(self, "face_id_verification")
            else None
        )
        _user_passed_verification=(
            self.user_passed_verification
            if hasattr(self, "user_passed_verification")
            else None
        )
        _ip_address=(
            self.ip_address
            if hasattr(self, "ip_address")
            else None
        )
        _transaction_date=(
            self.transaction_date
            if hasattr(self, "transaction_date")
            else None
        )
        _tangible=(
            self.tangible
            if hasattr(self, "tangible")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"processing_instruction={_processing_instruction!r}, "
            f"authorization_options={_authorization_options!r}, "
            f"action_list={_action_list!r}, "
            f"high_risk_transaction_flag={_high_risk_transaction_flag!r}, "
            f"transaction_retry={_transaction_retry!r}, "
            f"last_one_hr_transaction_count={_last_one_hr_transaction_count!r}, "
            f"last_one_day_transaction_count={_last_one_day_transaction_count!r}, "
            f"last_three_months_txn_count={_last_three_months_txn_count!r}, "
            f"total_transaction_count={_total_transaction_count!r}, "
            f"pin_verification={_pin_verification!r}, "
            f"face_id_verification={_face_id_verification!r}, "
            f"user_passed_verification={_user_passed_verification!r}, "
            f"ip_address={_ip_address!r}, "
            f"transaction_date={_transaction_date!r}, "
            f"tangible={_tangible!r}, "
            f"additional_properties={_additional_properties!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _processing_instruction=(
            self.processing_instruction
            if hasattr(self, "processing_instruction")
            else None
        )
        _authorization_options=(
            self.authorization_options
            if hasattr(self, "authorization_options")
            else None
        )
        _action_list=(
            self.action_list
            if hasattr(self, "action_list")
            else None
        )
        _high_risk_transaction_flag=(
            self.high_risk_transaction_flag
            if hasattr(self, "high_risk_transaction_flag")
            else None
        )
        _transaction_retry=(
            self.transaction_retry
            if hasattr(self, "transaction_retry")
            else None
        )
        _last_one_hr_transaction_count=(
            self.last_one_hr_transaction_count
            if hasattr(self, "last_one_hr_transaction_count")
            else None
        )
        _last_one_day_transaction_count=(
            self.last_one_day_transaction_count
            if hasattr(self, "last_one_day_transaction_count")
            else None
        )
        _last_three_months_txn_count=(
            self.last_three_months_txn_count
            if hasattr(self, "last_three_months_txn_count")
            else None
        )
        _total_transaction_count=(
            self.total_transaction_count
            if hasattr(self, "total_transaction_count")
            else None
        )
        _pin_verification=(
            self.pin_verification
            if hasattr(self, "pin_verification")
            else None
        )
        _face_id_verification=(
            self.face_id_verification
            if hasattr(self, "face_id_verification")
            else None
        )
        _user_passed_verification=(
            self.user_passed_verification
            if hasattr(self, "user_passed_verification")
            else None
        )
        _ip_address=(
            self.ip_address
            if hasattr(self, "ip_address")
            else None
        )
        _transaction_date=(
            self.transaction_date
            if hasattr(self, "transaction_date")
            else None
        )
        _tangible=(
            self.tangible
            if hasattr(self, "tangible")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"processing_instruction={_processing_instruction!s}, "
            f"authorization_options={_authorization_options!s}, "
            f"action_list={_action_list!s}, "
            f"high_risk_transaction_flag={_high_risk_transaction_flag!s}, "
            f"transaction_retry={_transaction_retry!s}, "
            f"last_one_hr_transaction_count={_last_one_hr_transaction_count!s}, "
            f"last_one_day_transaction_count={_last_one_day_transaction_count!s}, "
            f"last_three_months_txn_count={_last_three_months_txn_count!s}, "
            f"total_transaction_count={_total_transaction_count!s}, "
            f"pin_verification={_pin_verification!s}, "
            f"face_id_verification={_face_id_verification!s}, "
            f"user_passed_verification={_user_passed_verification!s}, "
            f"ip_address={_ip_address!s}, "
            f"transaction_date={_transaction_date!s}, "
            f"tangible={_tangible!s}, "
            f"additional_properties={_additional_properties!s}, "
            f")"
        )
