"""visaacceptancemergedspec.

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

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


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

    Attributes:
        terminal_id (str): Identifier for the terminal at your retail location. You
            can define this value yourself, but consult the processor for
            requirements.  #### Visa Acceptance through VisaNet A list of all
            possible values is stored in your Visa Acceptance account. If terminal ID
            validation is enabled for your Visa Acceptance account, the value you
            send for this field is validated against the list each time you include
            the field in a request. To enable or disable terminal ID validation,
            contact Visa Acceptance Customer Support.  When you do not include this
            field in a request, Visa Acceptance uses the default value that is
            defined in your Visa Acceptance account.  #### FDC Nashville Global To
            have your account configured to support this field, contact Visa
            Acceptance Customer Support. This value must be a value that FDC
            Nashville Global issued to you.  #### For Payouts This field is
            applicable for Visa Acceptance through VisaNet.  #### GPX Identifier for
            the terminal at your retail location. A list of all possible values is
            stored in your account. If terminal ID validation is enabled for your
            account, the value you send for this field is validated against the list
            each time you include the field in a request. To enable or disable
            terminal ID validation, contact customer support.  When you do not
            include this field in a request, the default value that is defined in
            your account is used.  Optional for authorizations.  #### Used by
            **Authorization** Optional for the following processors. When you do not
            include this field in a request, the default value that is defined in
            your account is used.   - American Express Direct   - Credit Mutuel-CIC
            - FDC Nashville Global   - SIX - Chase Paymentech Solutions: Optional
            field. If you include this field in your request, you must also include
            `pointOfSaleInformation.catLevel`. - FDMS Nashville: The default value
            that is defined in your account is used. - GPX - OmniPay Direct: Optional
            field.  For the following processors, this field is not used. - GPN - JCN
            Gateway - RBS WorldPay Atlanta - TSYS Acquiring Solutions - Worldpay VAP
            #### Card Present reply Terminal identifier assigned by the acquirer.
            This value must be printed on the receipt.
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

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

    _optionals = [
        "terminal_id",
    ]

    def __init__(
        self,
        terminal_id=APIHelper.SKIP,
        additional_properties=None):
        """Initialize a PointOfSaleInformation7 instance."""
        # Initialize members of the class
        if terminal_id is not APIHelper.SKIP:
            self.terminal_id = terminal_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
        terminal_id =\
            dictionary.get("terminalId")\
            if dictionary.get("terminalId")\
                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(terminal_id,
                   additional_properties)

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

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