"""visaacceptancemergedspec.

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

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


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

    Attributes:
        category (str): #### GPX Mastercard product ID associated with the primary
            account number (PAN). Returned by authorization service.  #### Visa
            Acceptance through VisaNet Visa or Mastercard product ID that is
            associated with the primary account number (PAN). For descriptions of the
            Visa product IDs, see the Product ID table on the [Visa Request &
            Response Codes web page.](  Data Length: String (3)  #### GPN Visa or
            Mastercard product ID that is associated with the primary account number
            (PAN). For descriptions of the Visa product IDs, see the Product ID table
            on the [Visa Request & Response Codes web page.](  Data Length: String
            (3)  #### Worldpay VAP **Important** Before using this field on Worldpay
            VAP, you must contact Visa Acceptance Customer Support to have your
            account configured for this feature.  Type of card used in the
            transaction. The only possible value is: - `PREPAID`: Prepaid Card  Data
            Length: String (7)  #### RBS WorldPay Atlanta Type of card used in the
            transaction. Possible values: - `B`: Business Card - `O`: Noncommercial
            Card - `R`: Corporate Card - `S`: Purchase Card - `Blank`: Purchase card
            not supported  Data Length: String (1)
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

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

    _optionals = [
        "category",
    ]

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

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

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

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