"""visaacceptancemergedspec.

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

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


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

    Attributes:
        transaction_local_date_time (str): Local Time of the transaction Set the
            timestamp for the exchange rate by ISO 8601 UTC format. Format:
            “YYYYMMdd’T’HHmmss’Z’”  (20151103T123456Z)
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

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

    _optionals = [
        "transaction_local_date_time",
    ]

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

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

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

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