"""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.buyer_information_1 import (
    BuyerInformation1,
)
from visaacceptancemergedspec.models.client_reference_information_1 import (
    ClientReferenceInformation1,
)
from visaacceptancemergedspec.models.consumer_authentication_information_1 import (
    ConsumerAuthenticationInformation1,
)
from visaacceptancemergedspec.models.embedded_actions_2 import (
    EmbeddedActions2,
)
from visaacceptancemergedspec.models.error_information import (
    ErrorInformation,
)
from visaacceptancemergedspec.models.installment_information_1 import (
    InstallmentInformation1,
)
from visaacceptancemergedspec.models.issuer_information_2 import (
    IssuerInformation2,
)
from visaacceptancemergedspec.models.links import (
    Links,
)
from visaacceptancemergedspec.models.merchant_information_1 import (
    MerchantInformation1,
)
from visaacceptancemergedspec.models.order_information_1 import (
    OrderInformation1,
)
from visaacceptancemergedspec.models.payment_account_information import (
    PaymentAccountInformation,
)
from visaacceptancemergedspec.models.payment_information_1 import (
    PaymentInformation1,
)
from visaacceptancemergedspec.models.payment_insights_information import (
    PaymentInsightsInformation,
)
from visaacceptancemergedspec.models.point_of_sale_information_1 import (
    PointOfSaleInformation1,
)
from visaacceptancemergedspec.models.processing_information_1 import (
    ProcessingInformation1,
)
from visaacceptancemergedspec.models.processor_information_1 import (
    ProcessorInformation1,
)
from visaacceptancemergedspec.models.risk_information_22 import (
    RiskInformation22,
)
from visaacceptancemergedspec.models.token_information_1 import (
    TokenInformation1,
)
from visaacceptancemergedspec.models.watchlist_screening_information_1 import (
    WatchlistScreeningInformation1,
)


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

    Attributes:
        links (Links): The model property of type Links.
        id (str): An unique identification number generated by Visa Acceptance to
            identify the submitted request. Returned by all services. It is also
            appended to the endpoint of the resource. On incremental authorizations,
            this value with be the same as the identification number returned in the
            original authorization response.
        message (str): More information about the transaction response.
        submit_time_utc (str): Time of request in UTC. Format: `YYYY-MM-DDThh:mm:ssZ`
            **Example** `2016-08-11T22:47:57Z` equals August 11, 2016, at 22:47:57
            (10:47:57 p.m.). The `T` separates the date and the time. The `Z`
            indicates UTC.  Returned by Visa Acceptance for all services.
        status (str): The status of the submitted transaction.  Possible values:  -
            AUTHORIZED  - PARTIAL_AUTHORIZED  - AUTHORIZED_PENDING_REVIEW  -
            AUTHORIZED_RISK_DECLINED  - PENDING_AUTHENTICATION  - PENDING_REVIEW  -
            DECLINED  - INVALID_REQUEST
        reconciliation_id (str): Reference number for the transaction. Depending on
            how your Visa Acceptance account is configured, this value could either
            be provided in the API request or generated by Visa Acceptance. The
            actual value used in the request to the processor is provided back to you
            by Visa Acceptance in the response.
        error_information (ErrorInformation): The model property of type
            ErrorInformation.
        client_reference_information (ClientReferenceInformation1): The model
            property of type ClientReferenceInformation1.
        processing_information (ProcessingInformation1): The model property of type
            ProcessingInformation1.
        processor_information (ProcessorInformation1): The model property of type
            ProcessorInformation1.
        issuer_information (IssuerInformation2): The model property of type
            IssuerInformation2.
        payment_account_information (PaymentAccountInformation): The model property
            of type PaymentAccountInformation.
        payment_information (PaymentInformation1): The model property of type
            PaymentInformation1.
        payment_insights_information (PaymentInsightsInformation): The model property
            of type PaymentInsightsInformation.
        order_information (OrderInformation1): The model property of type
            OrderInformation1.
        point_of_sale_information (PointOfSaleInformation1): The model property of
            type PointOfSaleInformation1.
        installment_information (InstallmentInformation1): The model property of type
            InstallmentInformation1.
        token_information (TokenInformation1): The model property of type
            TokenInformation1.
        buyer_information (BuyerInformation1): The model property of type
            BuyerInformation1.
        risk_information (RiskInformation22): The model property of type
            RiskInformation22.
        consumer_authentication_information (ConsumerAuthenticationInformation1): The
            model property of type ConsumerAuthenticationInformation1.
        merchant_information (MerchantInformation1): The model property of type
            MerchantInformation1.
        embedded_actions (EmbeddedActions2): The model property of type
            EmbeddedActions2.
        watchlist_screening_information (WatchlistScreeningInformation1): The model
            property of type WatchlistScreeningInformation1.
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "links": "_links",
        "id": "id",
        "message": "message",
        "submit_time_utc": "submitTimeUtc",
        "status": "status",
        "reconciliation_id": "reconciliationId",
        "error_information": "errorInformation",
        "client_reference_information": "clientReferenceInformation",
        "processing_information": "processingInformation",
        "processor_information": "processorInformation",
        "issuer_information": "issuerInformation",
        "payment_account_information": "paymentAccountInformation",
        "payment_information": "paymentInformation",
        "payment_insights_information": "paymentInsightsInformation",
        "order_information": "orderInformation",
        "point_of_sale_information": "pointOfSaleInformation",
        "installment_information": "installmentInformation",
        "token_information": "tokenInformation",
        "buyer_information": "buyerInformation",
        "risk_information": "riskInformation",
        "consumer_authentication_information": "consumerAuthenticationInformation",
        "merchant_information": "merchantInformation",
        "embedded_actions": "embeddedActions",
        "watchlist_screening_information": "watchlistScreeningInformation",
    }

    _optionals = [
        "links",
        "id",
        "message",
        "submit_time_utc",
        "status",
        "reconciliation_id",
        "error_information",
        "client_reference_information",
        "processing_information",
        "processor_information",
        "issuer_information",
        "payment_account_information",
        "payment_information",
        "payment_insights_information",
        "order_information",
        "point_of_sale_information",
        "installment_information",
        "token_information",
        "buyer_information",
        "risk_information",
        "consumer_authentication_information",
        "merchant_information",
        "embedded_actions",
        "watchlist_screening_information",
    ]

    def __init__(
        self,
        links=APIHelper.SKIP,
        id=APIHelper.SKIP,
        message=APIHelper.SKIP,
        submit_time_utc=APIHelper.SKIP,
        status=APIHelper.SKIP,
        reconciliation_id=APIHelper.SKIP,
        error_information=APIHelper.SKIP,
        client_reference_information=APIHelper.SKIP,
        processing_information=APIHelper.SKIP,
        processor_information=APIHelper.SKIP,
        issuer_information=APIHelper.SKIP,
        payment_account_information=APIHelper.SKIP,
        payment_information=APIHelper.SKIP,
        payment_insights_information=APIHelper.SKIP,
        order_information=APIHelper.SKIP,
        point_of_sale_information=APIHelper.SKIP,
        installment_information=APIHelper.SKIP,
        token_information=APIHelper.SKIP,
        buyer_information=APIHelper.SKIP,
        risk_information=APIHelper.SKIP,
        consumer_authentication_information=APIHelper.SKIP,
        merchant_information=APIHelper.SKIP,
        embedded_actions=APIHelper.SKIP,
        watchlist_screening_information=APIHelper.SKIP,
        additional_properties=None):
        """Initialize a PtsV2PaymentsPost201Response instance."""
        # Initialize members of the class
        if links is not APIHelper.SKIP:
            self.links = links
        if id is not APIHelper.SKIP:
            self.id = id
        if message is not APIHelper.SKIP:
            self.message = message
        if submit_time_utc is not APIHelper.SKIP:
            self.submit_time_utc = submit_time_utc
        if status is not APIHelper.SKIP:
            self.status = status
        if reconciliation_id is not APIHelper.SKIP:
            self.reconciliation_id = reconciliation_id
        if error_information is not APIHelper.SKIP:
            self.error_information = error_information
        if client_reference_information is not APIHelper.SKIP:
            self.client_reference_information = client_reference_information
        if processing_information is not APIHelper.SKIP:
            self.processing_information = processing_information
        if processor_information is not APIHelper.SKIP:
            self.processor_information = processor_information
        if issuer_information is not APIHelper.SKIP:
            self.issuer_information = issuer_information
        if payment_account_information is not APIHelper.SKIP:
            self.payment_account_information = payment_account_information
        if payment_information is not APIHelper.SKIP:
            self.payment_information = payment_information
        if payment_insights_information is not APIHelper.SKIP:
            self.payment_insights_information = payment_insights_information
        if order_information is not APIHelper.SKIP:
            self.order_information = order_information
        if point_of_sale_information is not APIHelper.SKIP:
            self.point_of_sale_information = point_of_sale_information
        if installment_information is not APIHelper.SKIP:
            self.installment_information = installment_information
        if token_information is not APIHelper.SKIP:
            self.token_information = token_information
        if buyer_information is not APIHelper.SKIP:
            self.buyer_information = buyer_information
        if risk_information is not APIHelper.SKIP:
            self.risk_information = risk_information
        if consumer_authentication_information is not APIHelper.SKIP:
            self.consumer_authentication_information =\
                 consumer_authentication_information
        if merchant_information is not APIHelper.SKIP:
            self.merchant_information = merchant_information
        if embedded_actions is not APIHelper.SKIP:
            self.embedded_actions = embedded_actions
        if watchlist_screening_information is not APIHelper.SKIP:
            self.watchlist_screening_information = watchlist_screening_information

        # 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
        links =\
            Links.from_dictionary(
                dictionary.get("_links"))\
                if "_links" in dictionary.keys()\
                else APIHelper.SKIP
        id =\
            dictionary.get("id")\
            if dictionary.get("id")\
                else APIHelper.SKIP
        message =\
            dictionary.get("message")\
            if dictionary.get("message")\
                else APIHelper.SKIP
        submit_time_utc =\
            dictionary.get("submitTimeUtc")\
            if dictionary.get("submitTimeUtc")\
                else APIHelper.SKIP
        status =\
            dictionary.get("status")\
            if dictionary.get("status")\
                else APIHelper.SKIP
        reconciliation_id =\
            dictionary.get("reconciliationId")\
            if dictionary.get("reconciliationId")\
                else APIHelper.SKIP
        error_information =\
            ErrorInformation.from_dictionary(
                dictionary.get("errorInformation"))\
                if "errorInformation" in dictionary.keys()\
                else APIHelper.SKIP
        client_reference_information =\
            ClientReferenceInformation1.from_dictionary(
                dictionary.get("clientReferenceInformation"))\
                if "clientReferenceInformation" in dictionary.keys()\
                else APIHelper.SKIP
        processing_information =\
            ProcessingInformation1.from_dictionary(
                dictionary.get("processingInformation"))\
                if "processingInformation" in dictionary.keys()\
                else APIHelper.SKIP
        processor_information =\
            ProcessorInformation1.from_dictionary(
                dictionary.get("processorInformation"))\
                if "processorInformation" in dictionary.keys()\
                else APIHelper.SKIP
        issuer_information =\
            IssuerInformation2.from_dictionary(
                dictionary.get("issuerInformation"))\
                if "issuerInformation" in dictionary.keys()\
                else APIHelper.SKIP
        payment_account_information =\
            PaymentAccountInformation.from_dictionary(
                dictionary.get("paymentAccountInformation"))\
                if "paymentAccountInformation" in dictionary.keys()\
                else APIHelper.SKIP
        payment_information =\
            PaymentInformation1.from_dictionary(
                dictionary.get("paymentInformation"))\
                if "paymentInformation" in dictionary.keys()\
                else APIHelper.SKIP
        payment_insights_information =\
            PaymentInsightsInformation.from_dictionary(
                dictionary.get("paymentInsightsInformation"))\
                if "paymentInsightsInformation" in dictionary.keys()\
                else APIHelper.SKIP
        order_information =\
            OrderInformation1.from_dictionary(
                dictionary.get("orderInformation"))\
                if "orderInformation" in dictionary.keys()\
                else APIHelper.SKIP
        point_of_sale_information =\
            PointOfSaleInformation1.from_dictionary(
                dictionary.get("pointOfSaleInformation"))\
                if "pointOfSaleInformation" in dictionary.keys()\
                else APIHelper.SKIP
        installment_information =\
            InstallmentInformation1.from_dictionary(
                dictionary.get("installmentInformation"))\
                if "installmentInformation" in dictionary.keys()\
                else APIHelper.SKIP
        token_information =\
            TokenInformation1.from_dictionary(
                dictionary.get("tokenInformation"))\
                if "tokenInformation" in dictionary.keys()\
                else APIHelper.SKIP
        buyer_information =\
            BuyerInformation1.from_dictionary(
                dictionary.get("buyerInformation"))\
                if "buyerInformation" in dictionary.keys()\
                else APIHelper.SKIP
        risk_information =\
            RiskInformation22.from_dictionary(
                dictionary.get("riskInformation"))\
                if "riskInformation" in dictionary.keys()\
                else APIHelper.SKIP
        consumer_authentication_information =\
            ConsumerAuthenticationInformation1.from_dictionary(
                dictionary.get("consumerAuthenticationInformation"))\
                if "consumerAuthenticationInformation" in dictionary.keys()\
                else APIHelper.SKIP
        merchant_information =\
            MerchantInformation1.from_dictionary(
                dictionary.get("merchantInformation"))\
                if "merchantInformation" in dictionary.keys()\
                else APIHelper.SKIP
        embedded_actions =\
            EmbeddedActions2.from_dictionary(
                dictionary.get("embeddedActions"))\
                if "embeddedActions" in dictionary.keys()\
                else APIHelper.SKIP
        watchlist_screening_information =\
            WatchlistScreeningInformation1.from_dictionary(
                dictionary.get("watchlistScreeningInformation"))\
                if "watchlistScreeningInformation" in dictionary.keys()\
                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(links,
                   id,
                   message,
                   submit_time_utc,
                   status,
                   reconciliation_id,
                   error_information,
                   client_reference_information,
                   processing_information,
                   processor_information,
                   issuer_information,
                   payment_account_information,
                   payment_information,
                   payment_insights_information,
                   order_information,
                   point_of_sale_information,
                   installment_information,
                   token_information,
                   buyer_information,
                   risk_information,
                   consumer_authentication_information,
                   merchant_information,
                   embedded_actions,
                   watchlist_screening_information,
                   additional_properties)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _links=(
            self.links
            if hasattr(self, "links")
            else None
        )
        _id=(
            self.id
            if hasattr(self, "id")
            else None
        )
        _message=(
            self.message
            if hasattr(self, "message")
            else None
        )
        _submit_time_utc=(
            self.submit_time_utc
            if hasattr(self, "submit_time_utc")
            else None
        )
        _status=(
            self.status
            if hasattr(self, "status")
            else None
        )
        _reconciliation_id=(
            self.reconciliation_id
            if hasattr(self, "reconciliation_id")
            else None
        )
        _error_information=(
            self.error_information
            if hasattr(self, "error_information")
            else None
        )
        _client_reference_information=(
            self.client_reference_information
            if hasattr(self, "client_reference_information")
            else None
        )
        _processing_information=(
            self.processing_information
            if hasattr(self, "processing_information")
            else None
        )
        _processor_information=(
            self.processor_information
            if hasattr(self, "processor_information")
            else None
        )
        _issuer_information=(
            self.issuer_information
            if hasattr(self, "issuer_information")
            else None
        )
        _payment_account_information=(
            self.payment_account_information
            if hasattr(self, "payment_account_information")
            else None
        )
        _payment_information=(
            self.payment_information
            if hasattr(self, "payment_information")
            else None
        )
        _payment_insights_information=(
            self.payment_insights_information
            if hasattr(self, "payment_insights_information")
            else None
        )
        _order_information=(
            self.order_information
            if hasattr(self, "order_information")
            else None
        )
        _point_of_sale_information=(
            self.point_of_sale_information
            if hasattr(self, "point_of_sale_information")
            else None
        )
        _installment_information=(
            self.installment_information
            if hasattr(self, "installment_information")
            else None
        )
        _token_information=(
            self.token_information
            if hasattr(self, "token_information")
            else None
        )
        _buyer_information=(
            self.buyer_information
            if hasattr(self, "buyer_information")
            else None
        )
        _risk_information=(
            self.risk_information
            if hasattr(self, "risk_information")
            else None
        )
        _consumer_authentication_information=(
            self.consumer_authentication_information
            if hasattr(self, "consumer_authentication_information")
            else None
        )
        _merchant_information=(
            self.merchant_information
            if hasattr(self, "merchant_information")
            else None
        )
        _embedded_actions=(
            self.embedded_actions
            if hasattr(self, "embedded_actions")
            else None
        )
        _watchlist_screening_information=(
            self.watchlist_screening_information
            if hasattr(self, "watchlist_screening_information")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"links={_links!r}, "
            f"id={_id!r}, "
            f"message={_message!r}, "
            f"submit_time_utc={_submit_time_utc!r}, "
            f"status={_status!r}, "
            f"reconciliation_id={_reconciliation_id!r}, "
            f"error_information={_error_information!r}, "
            f"client_reference_information={_client_reference_information!r}, "
            f"processing_information={_processing_information!r}, "
            f"processor_information={_processor_information!r}, "
            f"issuer_information={_issuer_information!r}, "
            f"payment_account_information={_payment_account_information!r}, "
            f"payment_information={_payment_information!r}, "
            f"payment_insights_information={_payment_insights_information!r}, "
            f"order_information={_order_information!r}, "
            f"point_of_sale_information={_point_of_sale_information!r}, "
            f"installment_information={_installment_information!r}, "
            f"token_information={_token_information!r}, "
            f"buyer_information={_buyer_information!r}, "
            f"risk_information={_risk_information!r}, "
            f"consumer_authentication_information={_consumer_authentication_information!r}, "
            f"merchant_information={_merchant_information!r}, "
            f"embedded_actions={_embedded_actions!r}, "
            f"watchlist_screening_information={_watchlist_screening_information!r}, "
            f"additional_properties={_additional_properties!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _links=(
            self.links
            if hasattr(self, "links")
            else None
        )
        _id=(
            self.id
            if hasattr(self, "id")
            else None
        )
        _message=(
            self.message
            if hasattr(self, "message")
            else None
        )
        _submit_time_utc=(
            self.submit_time_utc
            if hasattr(self, "submit_time_utc")
            else None
        )
        _status=(
            self.status
            if hasattr(self, "status")
            else None
        )
        _reconciliation_id=(
            self.reconciliation_id
            if hasattr(self, "reconciliation_id")
            else None
        )
        _error_information=(
            self.error_information
            if hasattr(self, "error_information")
            else None
        )
        _client_reference_information=(
            self.client_reference_information
            if hasattr(self, "client_reference_information")
            else None
        )
        _processing_information=(
            self.processing_information
            if hasattr(self, "processing_information")
            else None
        )
        _processor_information=(
            self.processor_information
            if hasattr(self, "processor_information")
            else None
        )
        _issuer_information=(
            self.issuer_information
            if hasattr(self, "issuer_information")
            else None
        )
        _payment_account_information=(
            self.payment_account_information
            if hasattr(self, "payment_account_information")
            else None
        )
        _payment_information=(
            self.payment_information
            if hasattr(self, "payment_information")
            else None
        )
        _payment_insights_information=(
            self.payment_insights_information
            if hasattr(self, "payment_insights_information")
            else None
        )
        _order_information=(
            self.order_information
            if hasattr(self, "order_information")
            else None
        )
        _point_of_sale_information=(
            self.point_of_sale_information
            if hasattr(self, "point_of_sale_information")
            else None
        )
        _installment_information=(
            self.installment_information
            if hasattr(self, "installment_information")
            else None
        )
        _token_information=(
            self.token_information
            if hasattr(self, "token_information")
            else None
        )
        _buyer_information=(
            self.buyer_information
            if hasattr(self, "buyer_information")
            else None
        )
        _risk_information=(
            self.risk_information
            if hasattr(self, "risk_information")
            else None
        )
        _consumer_authentication_information=(
            self.consumer_authentication_information
            if hasattr(self, "consumer_authentication_information")
            else None
        )
        _merchant_information=(
            self.merchant_information
            if hasattr(self, "merchant_information")
            else None
        )
        _embedded_actions=(
            self.embedded_actions
            if hasattr(self, "embedded_actions")
            else None
        )
        _watchlist_screening_information=(
            self.watchlist_screening_information
            if hasattr(self, "watchlist_screening_information")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"links={_links!s}, "
            f"id={_id!s}, "
            f"message={_message!s}, "
            f"submit_time_utc={_submit_time_utc!s}, "
            f"status={_status!s}, "
            f"reconciliation_id={_reconciliation_id!s}, "
            f"error_information={_error_information!s}, "
            f"client_reference_information={_client_reference_information!s}, "
            f"processing_information={_processing_information!s}, "
            f"processor_information={_processor_information!s}, "
            f"issuer_information={_issuer_information!s}, "
            f"payment_account_information={_payment_account_information!s}, "
            f"payment_information={_payment_information!s}, "
            f"payment_insights_information={_payment_insights_information!s}, "
            f"order_information={_order_information!s}, "
            f"point_of_sale_information={_point_of_sale_information!s}, "
            f"installment_information={_installment_information!s}, "
            f"token_information={_token_information!s}, "
            f"buyer_information={_buyer_information!s}, "
            f"risk_information={_risk_information!s}, "
            f"consumer_authentication_information={_consumer_authentication_information!s}, "
            f"merchant_information={_merchant_information!s}, "
            f"embedded_actions={_embedded_actions!s}, "
            f"watchlist_screening_information={_watchlist_screening_information!s}, "
            f"additional_properties={_additional_properties!s}, "
            f")"
        )
