"""visaacceptancemergedspec.

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

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


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

    Attributes:
        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.
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "reconciliation_id": "reconciliationId",
    }

    _optionals = [
        "reconciliation_id",
    ]

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

        # 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
        reconciliation_id =\
            dictionary.get("reconciliationId")\
            if dictionary.get("reconciliationId")\
                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(reconciliation_id,
                   additional_properties)

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

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