"""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.issuer import (
    Issuer,
)


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

    Attributes:
        payment_solution (str): Type of digital payment solution for the transaction.
            Possible Values:   - `visacheckout`: Visa Checkout. This value is
            required for Visa Checkout transactions. For details, see
            `payment_solution` field description in [Visa Checkout Using the REST
            API.](  - `001`: Apple Pay.  - `004`: Visa Acceptance In-App Solution.  -
            `005`: Masterpass. This value is required for Masterpass transactions on
            OmniPay Direct.   - `006`: Android Pay.  - `007`: Chase Pay.  - `008`:
            Samsung Pay.  - `012`: Google Pay.  - `013`: Visa Acceptance P2PE
            Decryption  - `014`: Mastercard credential on file (COF) payment network
            token. Returned in authorizations that use a payment network token
            associated with a TMS token.  - `015`: Visa credential on file (COF)
            payment network token. Returned in authorizations that use a payment
            network token associated with a TMS token.  - `027`: Click to Pay.
        reconciliation_id (str): Please check with Visa Acceptance customer support
            to see if your merchant account is configured correctly so you can
            include this field in your request. * For Payouts: max length for
            FDCCompass is String (22).
        link_id (str): Value that links the current authorization request to the
            original authorization request. Set this value to the ID that was
            returned in the reply message from the original authorization request.
            This value is used for:  - Partial authorizations - Split shipments
        report_group (str): Attribute that lets you define custom grouping for your
            processor reports. This field is supported only for **Worldpay VAP**.
        visa_checkout_id (str): Identifier for the **Visa Checkout** order. Visa
            Checkout provides a unique order ID for every transaction in the Visa
            Checkout **callID** field.
        issuer (Issuer): The model property of type Issuer.
        action_list (List[str]): Array of actions (one or more) to be included in the
            reversal Possible value: - `AP_AUTH_REVERSAL`: Use this when you want to
            reverse an Alternative Payment Authorization.
        transaction_type_indicator (str): This field is used identify the type of
            payment transaction taking place. This field is applicable for MasterCard
            transactions only. Possible values: - 201- Mastercard Rebate - 202-
            rePower Load Value - 203- Gaming Re-pay - 204- General Person-to-Person -
            205- General Transfer to Own Account - 206- Agent Cash Out - 207- Payment
            of Own Credit Card Bill - 208- Business Disbursement - 209-
            Government/Non-Profit Disbursement - 210- Rapid Merchant Settlement -
            211- Cash in at ATM (Usage limited to specific countries) - 212- Cash in
            at Point of Sale (Usage limited to specific countries) - 213- General
            Business to Business Transfer - 214- Mastercard Merchant Presented QR -
            215- Mastercard Merchant Presented QR Refund Payment - 216- Utility
            Payments (for Brazil domestic use only) - 217- Government Services (for
            Brazil domestic use only) - 218- Mobile phone top-ups (for Brazil
            domestic use only) - 219- Coupon booklet payments (for Brazil domestic
            use only) - 220- General Person-to-Person Transfer - 221-
            Person-to-Person Transfer to Card Account - 222- General Transfer to Own
            Account - 223- Agent Cash Out - 224- Payment of Own Credit Card Bill -
            225- Business Disbursement - 226- Transfer to Own Staged Digital Wallet
            Account - 227- Transfer to Own Debit or Prepaid Account - 228- General
            Business-to-Business Transfer - 229- Installment-based repayment - 230-
            Mastercard ATM Cash Pick-Up Transaction - 231- Cryptocurrency - 232-
            High-risk Securities
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "payment_solution": "paymentSolution",
        "reconciliation_id": "reconciliationId",
        "link_id": "linkId",
        "report_group": "reportGroup",
        "visa_checkout_id": "visaCheckoutId",
        "issuer": "issuer",
        "action_list": "actionList",
        "transaction_type_indicator": "transactionTypeIndicator",
    }

    _optionals = [
        "payment_solution",
        "reconciliation_id",
        "link_id",
        "report_group",
        "visa_checkout_id",
        "issuer",
        "action_list",
        "transaction_type_indicator",
    ]

    def __init__(
        self,
        payment_solution=APIHelper.SKIP,
        reconciliation_id=APIHelper.SKIP,
        link_id=APIHelper.SKIP,
        report_group=APIHelper.SKIP,
        visa_checkout_id=APIHelper.SKIP,
        issuer=APIHelper.SKIP,
        action_list=APIHelper.SKIP,
        transaction_type_indicator=APIHelper.SKIP,
        additional_properties=None):
        """Initialize a ProcessingInformation3 instance."""
        # Initialize members of the class
        if payment_solution is not APIHelper.SKIP:
            self.payment_solution = payment_solution
        if reconciliation_id is not APIHelper.SKIP:
            self.reconciliation_id = reconciliation_id
        if link_id is not APIHelper.SKIP:
            self.link_id = link_id
        if report_group is not APIHelper.SKIP:
            self.report_group = report_group
        if visa_checkout_id is not APIHelper.SKIP:
            self.visa_checkout_id = visa_checkout_id
        if issuer is not APIHelper.SKIP:
            self.issuer = issuer
        if action_list is not APIHelper.SKIP:
            self.action_list = action_list
        if transaction_type_indicator is not APIHelper.SKIP:
            self.transaction_type_indicator = transaction_type_indicator

        # 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
        payment_solution =\
            dictionary.get("paymentSolution")\
            if dictionary.get("paymentSolution")\
                else APIHelper.SKIP
        reconciliation_id =\
            dictionary.get("reconciliationId")\
            if dictionary.get("reconciliationId")\
                else APIHelper.SKIP
        link_id =\
            dictionary.get("linkId")\
            if dictionary.get("linkId")\
                else APIHelper.SKIP
        report_group =\
            dictionary.get("reportGroup")\
            if dictionary.get("reportGroup")\
                else APIHelper.SKIP
        visa_checkout_id =\
            dictionary.get("visaCheckoutId")\
            if dictionary.get("visaCheckoutId")\
                else APIHelper.SKIP
        issuer =\
            Issuer.from_dictionary(
                dictionary.get("issuer"))\
                if "issuer" in dictionary.keys()\
                else APIHelper.SKIP
        action_list =\
            dictionary.get("actionList")\
            if dictionary.get("actionList")\
                else APIHelper.SKIP
        transaction_type_indicator =\
            dictionary.get("transactionTypeIndicator")\
            if dictionary.get("transactionTypeIndicator")\
                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(payment_solution,
                   reconciliation_id,
                   link_id,
                   report_group,
                   visa_checkout_id,
                   issuer,
                   action_list,
                   transaction_type_indicator,
                   additional_properties)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _payment_solution=(
            self.payment_solution
            if hasattr(self, "payment_solution")
            else None
        )
        _reconciliation_id=(
            self.reconciliation_id
            if hasattr(self, "reconciliation_id")
            else None
        )
        _link_id=(
            self.link_id
            if hasattr(self, "link_id")
            else None
        )
        _report_group=(
            self.report_group
            if hasattr(self, "report_group")
            else None
        )
        _visa_checkout_id=(
            self.visa_checkout_id
            if hasattr(self, "visa_checkout_id")
            else None
        )
        _issuer=(
            self.issuer
            if hasattr(self, "issuer")
            else None
        )
        _action_list=(
            self.action_list
            if hasattr(self, "action_list")
            else None
        )
        _transaction_type_indicator=(
            self.transaction_type_indicator
            if hasattr(self, "transaction_type_indicator")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"payment_solution={_payment_solution!r}, "
            f"reconciliation_id={_reconciliation_id!r}, "
            f"link_id={_link_id!r}, "
            f"report_group={_report_group!r}, "
            f"visa_checkout_id={_visa_checkout_id!r}, "
            f"issuer={_issuer!r}, "
            f"action_list={_action_list!r}, "
            f"transaction_type_indicator={_transaction_type_indicator!r}, "
            f"additional_properties={_additional_properties!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _payment_solution=(
            self.payment_solution
            if hasattr(self, "payment_solution")
            else None
        )
        _reconciliation_id=(
            self.reconciliation_id
            if hasattr(self, "reconciliation_id")
            else None
        )
        _link_id=(
            self.link_id
            if hasattr(self, "link_id")
            else None
        )
        _report_group=(
            self.report_group
            if hasattr(self, "report_group")
            else None
        )
        _visa_checkout_id=(
            self.visa_checkout_id
            if hasattr(self, "visa_checkout_id")
            else None
        )
        _issuer=(
            self.issuer
            if hasattr(self, "issuer")
            else None
        )
        _action_list=(
            self.action_list
            if hasattr(self, "action_list")
            else None
        )
        _transaction_type_indicator=(
            self.transaction_type_indicator
            if hasattr(self, "transaction_type_indicator")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"payment_solution={_payment_solution!s}, "
            f"reconciliation_id={_reconciliation_id!s}, "
            f"link_id={_link_id!s}, "
            f"report_group={_report_group!s}, "
            f"visa_checkout_id={_visa_checkout_id!s}, "
            f"issuer={_issuer!s}, "
            f"action_list={_action_list!s}, "
            f"transaction_type_indicator={_transaction_type_indicator!s}, "
            f"additional_properties={_additional_properties!s}, "
            f")"
        )
