"""visaacceptancemergedspec.

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

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


class Features(object):
    """Implementation of the 'Features' 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`   - `CORPORATE`   - `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)   - 3 (Prepaid Credit and Prepaid Debit
            combo card)
        corporate_purchase (bool): This field indicates if the instrument can be used
            for corporate purchasing. This field is only applicable for American
            Express cards. Possible values:   - `true`   - `false`
        health_card (bool): This field indicates if the BIN is for healthcare
            (HSA/FSA). Currently, this field is only supported for Visa BINs.
            Possible values:     - `true`     - `false`
        shared_bin (bool): This field indicates if the BIN is shared by multiple
            issuers Possible values:     - `true`     - `false`
        pos_domestic_only (bool): This field indicates if the BIN is valid only for
            POS domestic usage. Possible values:     - `true`     - `false`
        gambling_allowed (bool): This field indicates if gambling transactions are
            allowed on the BIN. Possible values:     - `true`     - `false`
        commercial_card_level_2 (bool): This field indicates if a transaction on the
            instrument qualifies for level 2 interchange rates. Possible values:
            - `true`     - `false`
        commercial_card_level_3 (bool): This field indicates if a transaction on the
            instrument qualifies for level 3 interchange rates. Possible values:
            - `true`     - `false`
        exempt_bin (bool): This field indicates if a transaction on the instrument
            qualifies for government exempt interchange fee. Possible values:     -
            `true`     - `false`
        account_level_management (bool): This field indicates if the BIN participates
            in Account Level Management (ALM). Possible values:     - `true`     -
            `false`
        online_gambling_block (bool): This field indicates if online gambling is
            blocked on the BIN. Possible values:     - `true`     - `false`
        auto_substantiation (bool): This field indicates if auto-substantiation is
            enabled on the BIN. Possible values:     - `true`     - `false`
        flex_credential (bool): This field indicates if the instrument is a flex
            credential. 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 = {
        "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",
        "corporate_purchase": "corporatePurchase",
        "health_card": "healthCard",
        "shared_bin": "sharedBIN",
        "pos_domestic_only": "posDomesticOnly",
        "gambling_allowed": "gamblingAllowed",
        "commercial_card_level_2": "commercialCardLevel2",
        "commercial_card_level_3": "commercialCardLevel3",
        "exempt_bin": "exemptBIN",
        "account_level_management": "accountLevelManagement",
        "online_gambling_block": "onlineGamblingBlock",
        "auto_substantiation": "autoSubstantiation",
        "flex_credential": "flexCredential",
    }

    _optionals = [
        "account_funding_source",
        "account_funding_source_sub_type",
        "card_product",
        "message_type",
        "acceptance_level",
        "card_platform",
        "combo_card",
        "corporate_purchase",
        "health_card",
        "shared_bin",
        "pos_domestic_only",
        "gambling_allowed",
        "commercial_card_level_2",
        "commercial_card_level_3",
        "exempt_bin",
        "account_level_management",
        "online_gambling_block",
        "auto_substantiation",
        "flex_credential",
    ]

    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,
        corporate_purchase=APIHelper.SKIP,
        health_card=APIHelper.SKIP,
        shared_bin=APIHelper.SKIP,
        pos_domestic_only=APIHelper.SKIP,
        gambling_allowed=APIHelper.SKIP,
        commercial_card_level_2=APIHelper.SKIP,
        commercial_card_level_3=APIHelper.SKIP,
        exempt_bin=APIHelper.SKIP,
        account_level_management=APIHelper.SKIP,
        online_gambling_block=APIHelper.SKIP,
        auto_substantiation=APIHelper.SKIP,
        flex_credential=APIHelper.SKIP,
        additional_properties=None):
        """Initialize a Features 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
        if corporate_purchase is not APIHelper.SKIP:
            self.corporate_purchase = corporate_purchase
        if health_card is not APIHelper.SKIP:
            self.health_card = health_card
        if shared_bin is not APIHelper.SKIP:
            self.shared_bin = shared_bin
        if pos_domestic_only is not APIHelper.SKIP:
            self.pos_domestic_only = pos_domestic_only
        if gambling_allowed is not APIHelper.SKIP:
            self.gambling_allowed = gambling_allowed
        if commercial_card_level_2 is not APIHelper.SKIP:
            self.commercial_card_level_2 = commercial_card_level_2
        if commercial_card_level_3 is not APIHelper.SKIP:
            self.commercial_card_level_3 = commercial_card_level_3
        if exempt_bin is not APIHelper.SKIP:
            self.exempt_bin = exempt_bin
        if account_level_management is not APIHelper.SKIP:
            self.account_level_management = account_level_management
        if online_gambling_block is not APIHelper.SKIP:
            self.online_gambling_block = online_gambling_block
        if auto_substantiation is not APIHelper.SKIP:
            self.auto_substantiation = auto_substantiation
        if flex_credential is not APIHelper.SKIP:
            self.flex_credential = flex_credential

        # 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
        corporate_purchase =\
            dictionary.get("corporatePurchase")\
            if "corporatePurchase" in dictionary.keys()\
                else APIHelper.SKIP
        health_card =\
            dictionary.get("healthCard")\
            if "healthCard" in dictionary.keys()\
                else APIHelper.SKIP
        shared_bin =\
            dictionary.get("sharedBIN")\
            if "sharedBIN" in dictionary.keys()\
                else APIHelper.SKIP
        pos_domestic_only =\
            dictionary.get("posDomesticOnly")\
            if "posDomesticOnly" in dictionary.keys()\
                else APIHelper.SKIP
        gambling_allowed =\
            dictionary.get("gamblingAllowed")\
            if "gamblingAllowed" in dictionary.keys()\
                else APIHelper.SKIP
        commercial_card_level_2 =\
            dictionary.get("commercialCardLevel2")\
            if "commercialCardLevel2" in dictionary.keys()\
                else APIHelper.SKIP
        commercial_card_level_3 =\
            dictionary.get("commercialCardLevel3")\
            if "commercialCardLevel3" in dictionary.keys()\
                else APIHelper.SKIP
        exempt_bin =\
            dictionary.get("exemptBIN")\
            if "exemptBIN" in dictionary.keys()\
                else APIHelper.SKIP
        account_level_management =\
            dictionary.get("accountLevelManagement")\
            if "accountLevelManagement" in dictionary.keys()\
                else APIHelper.SKIP
        online_gambling_block =\
            dictionary.get("onlineGamblingBlock")\
            if "onlineGamblingBlock" in dictionary.keys()\
                else APIHelper.SKIP
        auto_substantiation =\
            dictionary.get("autoSubstantiation")\
            if "autoSubstantiation" in dictionary.keys()\
                else APIHelper.SKIP
        flex_credential =\
            dictionary.get("flexCredential")\
            if "flexCredential" 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(account_funding_source,
                   account_funding_source_sub_type,
                   card_product,
                   message_type,
                   acceptance_level,
                   card_platform,
                   combo_card,
                   corporate_purchase,
                   health_card,
                   shared_bin,
                   pos_domestic_only,
                   gambling_allowed,
                   commercial_card_level_2,
                   commercial_card_level_3,
                   exempt_bin,
                   account_level_management,
                   online_gambling_block,
                   auto_substantiation,
                   flex_credential,
                   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
        )
        _corporate_purchase=(
            self.corporate_purchase
            if hasattr(self, "corporate_purchase")
            else None
        )
        _health_card=(
            self.health_card
            if hasattr(self, "health_card")
            else None
        )
        _shared_bin=(
            self.shared_bin
            if hasattr(self, "shared_bin")
            else None
        )
        _pos_domestic_only=(
            self.pos_domestic_only
            if hasattr(self, "pos_domestic_only")
            else None
        )
        _gambling_allowed=(
            self.gambling_allowed
            if hasattr(self, "gambling_allowed")
            else None
        )
        _commercial_card_level_2=(
            self.commercial_card_level_2
            if hasattr(self, "commercial_card_level_2")
            else None
        )
        _commercial_card_level_3=(
            self.commercial_card_level_3
            if hasattr(self, "commercial_card_level_3")
            else None
        )
        _exempt_bin=(
            self.exempt_bin
            if hasattr(self, "exempt_bin")
            else None
        )
        _account_level_management=(
            self.account_level_management
            if hasattr(self, "account_level_management")
            else None
        )
        _online_gambling_block=(
            self.online_gambling_block
            if hasattr(self, "online_gambling_block")
            else None
        )
        _auto_substantiation=(
            self.auto_substantiation
            if hasattr(self, "auto_substantiation")
            else None
        )
        _flex_credential=(
            self.flex_credential
            if hasattr(self, "flex_credential")
            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"corporate_purchase={_corporate_purchase!r}, "
            f"health_card={_health_card!r}, "
            f"shared_bin={_shared_bin!r}, "
            f"pos_domestic_only={_pos_domestic_only!r}, "
            f"gambling_allowed={_gambling_allowed!r}, "
            f"commercial_card_level_2={_commercial_card_level_2!r}, "
            f"commercial_card_level_3={_commercial_card_level_3!r}, "
            f"exempt_bin={_exempt_bin!r}, "
            f"account_level_management={_account_level_management!r}, "
            f"online_gambling_block={_online_gambling_block!r}, "
            f"auto_substantiation={_auto_substantiation!r}, "
            f"flex_credential={_flex_credential!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
        )
        _corporate_purchase=(
            self.corporate_purchase
            if hasattr(self, "corporate_purchase")
            else None
        )
        _health_card=(
            self.health_card
            if hasattr(self, "health_card")
            else None
        )
        _shared_bin=(
            self.shared_bin
            if hasattr(self, "shared_bin")
            else None
        )
        _pos_domestic_only=(
            self.pos_domestic_only
            if hasattr(self, "pos_domestic_only")
            else None
        )
        _gambling_allowed=(
            self.gambling_allowed
            if hasattr(self, "gambling_allowed")
            else None
        )
        _commercial_card_level_2=(
            self.commercial_card_level_2
            if hasattr(self, "commercial_card_level_2")
            else None
        )
        _commercial_card_level_3=(
            self.commercial_card_level_3
            if hasattr(self, "commercial_card_level_3")
            else None
        )
        _exempt_bin=(
            self.exempt_bin
            if hasattr(self, "exempt_bin")
            else None
        )
        _account_level_management=(
            self.account_level_management
            if hasattr(self, "account_level_management")
            else None
        )
        _online_gambling_block=(
            self.online_gambling_block
            if hasattr(self, "online_gambling_block")
            else None
        )
        _auto_substantiation=(
            self.auto_substantiation
            if hasattr(self, "auto_substantiation")
            else None
        )
        _flex_credential=(
            self.flex_credential
            if hasattr(self, "flex_credential")
            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"corporate_purchase={_corporate_purchase!s}, "
            f"health_card={_health_card!s}, "
            f"shared_bin={_shared_bin!s}, "
            f"pos_domestic_only={_pos_domestic_only!s}, "
            f"gambling_allowed={_gambling_allowed!s}, "
            f"commercial_card_level_2={_commercial_card_level_2!s}, "
            f"commercial_card_level_3={_commercial_card_level_3!s}, "
            f"exempt_bin={_exempt_bin!s}, "
            f"account_level_management={_account_level_management!s}, "
            f"online_gambling_block={_online_gambling_block!s}, "
            f"auto_substantiation={_auto_substantiation!s}, "
            f"flex_credential={_flex_credential!s}, "
            f"additional_properties={_additional_properties!s}, "
            f")"
        )
