"""visaacceptancemergedspec.

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

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


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

    Attributes:
        account_funding_source (str): This field contains the account funding source.
            Possible values:   - `CREDIT`   - `DEBIT`   - `PREPAID`   - `DEFERRED
            DEBIT`   - `CHARGE`
        account_funding_source_sub_type (str): This field contains the type of
            prepaid card. Possible values:   - `Reloadable`   - `Non-reloadable`
        card_product (str): This field contains the type of issuer product. Example
            values:   - Visa Classic   - Visa Signature   - Visa Infinite
        message_type (str): This field contains the type of BIN based authentication.
            Possible values:   - `S`: Single Message   - `D`: Dual Message
        acceptance_level (str): This field contains the acceptance level of the PAN.
            Possible values:   - `0` : Normal   - `1` : Monitor   - `2` : Refuse   -
            `3` : Not Allowed   - `4` : Private   - `5` : Test
        card_platform (str): This field contains the type of card platform. Possible
            values:   - `BUSINESS`   - `CONSUMER`   - `COMMERCIAL`   - `GOVERNMENT`
        combo_card (str): This field indicates the type of combo card. Possible
            values:   - 0 (Not a combo card)   - 1 (Credit and Prepaid Combo card)
            - 2 (Credit and Debit Combo card)
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "account_funding_source": "accountFundingSource",
        "account_funding_source_sub_type": "accountFundingSourceSubType",
        "card_product": "cardProduct",
        "message_type": "messageType",
        "acceptance_level": "acceptanceLevel",
        "card_platform": "cardPlatform",
        "combo_card": "comboCard",
    }

    _optionals = [
        "account_funding_source",
        "account_funding_source_sub_type",
        "card_product",
        "message_type",
        "acceptance_level",
        "card_platform",
        "combo_card",
    ]

    def __init__(
        self,
        account_funding_source=APIHelper.SKIP,
        account_funding_source_sub_type=APIHelper.SKIP,
        card_product=APIHelper.SKIP,
        message_type=APIHelper.SKIP,
        acceptance_level=APIHelper.SKIP,
        card_platform=APIHelper.SKIP,
        combo_card=APIHelper.SKIP,
        additional_properties=None):
        """Initialize a Features24 instance."""
        # Initialize members of the class
        if account_funding_source is not APIHelper.SKIP:
            self.account_funding_source = account_funding_source
        if account_funding_source_sub_type is not APIHelper.SKIP:
            self.account_funding_source_sub_type = account_funding_source_sub_type
        if card_product is not APIHelper.SKIP:
            self.card_product = card_product
        if message_type is not APIHelper.SKIP:
            self.message_type = message_type
        if acceptance_level is not APIHelper.SKIP:
            self.acceptance_level = acceptance_level
        if card_platform is not APIHelper.SKIP:
            self.card_platform = card_platform
        if combo_card is not APIHelper.SKIP:
            self.combo_card = combo_card

        # 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
        account_funding_source =\
            dictionary.get("accountFundingSource")\
            if dictionary.get("accountFundingSource")\
                else APIHelper.SKIP
        account_funding_source_sub_type =\
            dictionary.get("accountFundingSourceSubType")\
            if dictionary.get("accountFundingSourceSubType")\
                else APIHelper.SKIP
        card_product =\
            dictionary.get("cardProduct")\
            if dictionary.get("cardProduct")\
                else APIHelper.SKIP
        message_type =\
            dictionary.get("messageType")\
            if dictionary.get("messageType")\
                else APIHelper.SKIP
        acceptance_level =\
            dictionary.get("acceptanceLevel")\
            if dictionary.get("acceptanceLevel")\
                else APIHelper.SKIP
        card_platform =\
            dictionary.get("cardPlatform")\
            if dictionary.get("cardPlatform")\
                else APIHelper.SKIP
        combo_card =\
            dictionary.get("comboCard")\
            if dictionary.get("comboCard")\
                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(account_funding_source,
                   account_funding_source_sub_type,
                   card_product,
                   message_type,
                   acceptance_level,
                   card_platform,
                   combo_card,
                   additional_properties)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _account_funding_source=(
            self.account_funding_source
            if hasattr(self, "account_funding_source")
            else None
        )
        _account_funding_source_sub_type=(
            self.account_funding_source_sub_type
            if hasattr(self, "account_funding_source_sub_type")
            else None
        )
        _card_product=(
            self.card_product
            if hasattr(self, "card_product")
            else None
        )
        _message_type=(
            self.message_type
            if hasattr(self, "message_type")
            else None
        )
        _acceptance_level=(
            self.acceptance_level
            if hasattr(self, "acceptance_level")
            else None
        )
        _card_platform=(
            self.card_platform
            if hasattr(self, "card_platform")
            else None
        )
        _combo_card=(
            self.combo_card
            if hasattr(self, "combo_card")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"account_funding_source={_account_funding_source!r}, "
            f"account_funding_source_sub_type={_account_funding_source_sub_type!r}, "
            f"card_product={_card_product!r}, "
            f"message_type={_message_type!r}, "
            f"acceptance_level={_acceptance_level!r}, "
            f"card_platform={_card_platform!r}, "
            f"combo_card={_combo_card!r}, "
            f"additional_properties={_additional_properties!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _account_funding_source=(
            self.account_funding_source
            if hasattr(self, "account_funding_source")
            else None
        )
        _account_funding_source_sub_type=(
            self.account_funding_source_sub_type
            if hasattr(self, "account_funding_source_sub_type")
            else None
        )
        _card_product=(
            self.card_product
            if hasattr(self, "card_product")
            else None
        )
        _message_type=(
            self.message_type
            if hasattr(self, "message_type")
            else None
        )
        _acceptance_level=(
            self.acceptance_level
            if hasattr(self, "acceptance_level")
            else None
        )
        _card_platform=(
            self.card_platform
            if hasattr(self, "card_platform")
            else None
        )
        _combo_card=(
            self.combo_card
            if hasattr(self, "combo_card")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"account_funding_source={_account_funding_source!s}, "
            f"account_funding_source_sub_type={_account_funding_source_sub_type!s}, "
            f"card_product={_card_product!s}, "
            f"message_type={_message_type!s}, "
            f"acceptance_level={_acceptance_level!s}, "
            f"card_platform={_card_platform!s}, "
            f"combo_card={_combo_card!s}, "
            f"additional_properties={_additional_properties!s}, "
            f")"
        )
