"""visaacceptancemergedspec.

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

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


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

    Attributes:
        level_3_transmission_status (bool): Indicates whether Visa Acceptance sent
            the Level III information to the processor. The possible values are:  If
            your account is not enabled for Level III data or if you did not include
            the purchasing level field in your request, Visa Acceptance does not
            include the Level III data in the request sent to the processor.
            Possible values: - **true** - **false**
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

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

    _optionals = [
        "level_3_transmission_status",
    ]

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

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

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

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