"""visaacceptancemergedspec.

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

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


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

    Attributes:
        account_type (str): Type of account. This value is returned only if you
            requested a balance inquiry. Possible values:   - `00`: Not applicable or
            not specified  - `10`: Savings account  - `20`: Checking account  - `30`:
            Credit card account  - `40`: Universal account  #### PIN debit Type of
            account. This value is returned only if you requested a balance inquiry.
            Possible values: - `00`: Not applicable or not specified - `10`: Savings
            account - `20`: Checking account - `40`: Universal account - `96`: Cash
            benefits account - `98`: Food stamp account  Returned by PIN debit
            purchase.
        account_status (str): Possible values: - `N`: Nonregulated - `R`: Regulated
            Returned by PIN debit credit or PIN debit purchase.  **Note** This field
            is returned only for Visa Acceptance through VisaNet.
        balances (List[Balance]): This is an array of multiple balances information
            an issuer can return for a given card.
        balance_amount (str): Remaining balance on the account.  Returned by
            authorization service.  #### PIN debit Remaining balance on the prepaid
            card.  Returned by PIN debit purchase.
        balance_amount_type (str): Type of amount. This value is returned only if you
            requested a balance inquiry. The issuer determines the value that is
            returned. Possible values for deposit accounts:   - `01`: Current ledger
            (posted) balance.  - `02`: Current available balance, which is typically
            the ledger balance less outstanding authorizations.  Some depository
            institutions also include pending deposits and the credit or overdraft
            line associated with the account. Possible values for credit card
            accounts:   - `01`: Credit amount remaining for customer (open to buy).
            - `02`: Credit limit.
        currency (str): Currency of the remaining balance on the account. For the
            possible values, see the [ISO Standard Currency Codes.](  Returned by
            authorization service.  #### PIN debit Currency of the remaining balance
            on the prepaid card.  Returned by PIN debit purchase.
        balance_sign (str): Sign for the remaining balance on the account. Returned
            only when the processor returns this value. Possible values:  Possible
            values: - `Positive` - `Negative`  #### PIN debit Sign for the remaining
            balance on the prepaid card. Returned only when the processor returns
            this value.  Returned by PIN debit purchase.
        affluence_indicator (str): **Chase Paymentech Solutions**  Indicates whether
            a customer has high credit limits. This information enables you to market
            high cost items to these customers and to understand the kinds of cards
            that high income customers are using.  This field is supported for Visa,
            Mastercard, Discover, and Diners Club. Possible values:   - `Y`: Yes  -
            `N`: No  - `X`: Not applicable / Unknown  #### Litle  Flag that indicates
            that a Visa cardholder or Mastercard cardholder is in one of the affluent
            categories. Possible values:   - `AFFLUENT`: High income customer with
            high spending pattern (>100k USD annual income and >40k USD annual
            card usage).  - `MASS AFFLUENT`: High income customer (>100k USD annual
            income).   Maximum length is 13.  #### Chase Paymentech Solutions
            Maximum length is 1.
        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)
        commercial (str): Indicates whether the card is a commercial card, which
            enables you to include Level II data in your transaction requests. This
            field is supported for Visa and Mastercard on **Chase Paymentech
            Solutions**. Possible values:   - `Y`: Yes  - `N`: No  - `X`: Not
            applicable / Unknown
        group (str): Type of commercial card. This field is supported only for Visa
            Acceptance through VisaNet. Possible values:   - `B`: Business card  -
            `R`: Corporate card  - `S`: Purchasing card  - `0`: Noncommercial card
            Returned by authorization service.
        health_care (str): Indicates whether the card is a healthcare card. This
            field is supported for Visa and Mastercard on **Chase Paymentech
            Solutions**. Possible values:   - `Y`: Yes  - `N`: No  - `X`: Not
            applicable / Unknown
        payroll (str): Indicates whether the card is a payroll card. This field is
            supported for Visa, Discover, Diners Club, and JCB on **Chase Paymentech
            Solutions**. Possible values:   - `Y`: Yes  - `N`: No  - `X`: Not
            applicable / Unknown
        level_3_eligible (str): Indicates whether the card is eligible for Level III
            interchange fees, which enables you to include Level III data in your
            transaction requests. This field is supported for Visa and Mastercard on
            **Chase Paymentech Solutions**. Possible values:   - `Y`: Yes  - `N`: No
            - `X`: Not applicable / Unknown
        pinless_debit (str): Indicates whether the card is a PINless debit card. This
            field is supported for Visa and Mastercard on **Chase Paymentech
            Solutions**. Possible values:   - `Y`: Yes  - `N`: No  - `X`: Not
            applicable / Unknown
        signature_debit (str): Indicates whether the card is a signature debit card.
            This information enables you to alter the way an order is processed. For
            example, you might not want to reauthorize a transaction for a signature
            debit card, or you might want to perform reversals promptly for a
            signature debit card. This field is supported for Visa, Mastercard, and
            Maestro (International) on Chase Paymentech Solutions. Possible values:
            - `Y`: Yes  - `N`: No  - `X`: Not applicable / Unknown
        prepaid (str): Indicates whether the card is a prepaid card. This information
            enables you to determine when a gift card or prepaid card is presented
            for use when establishing a new recurring, installment, or deferred
            billing relationship.  This field is supported for Visa, Mastercard,
            Discover, Diners Club, and JCB on Chase Paymentech Solutions. Possible
            values:   - `Y`: Yes  - `N`: No  - `X`: Not applicable / Unknown
        regulated (str): Indicates whether the card is regulated according to the
            Durbin Amendment. If the card is regulated, the card issuer is subject to
            price caps and interchange rules. This field is supported for Visa,
            Mastercard, Discover, Diners Club, and JCB on Chase Paymentech Solutions.
            Possible values:   - `Y`: Yes  - `N`: No  - `X`: Not applicable / Unknown
        account_holder_type (str): This is the account owner information, valid
            values are: - `01` : primary account holder - `02` : secondary account
            holder This is returned in the response of an account verification
            transaction by the Issuer.
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "account_type": "accountType",
        "account_status": "accountStatus",
        "balances": "balances",
        "balance_amount": "balanceAmount",
        "balance_amount_type": "balanceAmountType",
        "currency": "currency",
        "balance_sign": "balanceSign",
        "affluence_indicator": "affluenceIndicator",
        "category": "category",
        "commercial": "commercial",
        "group": "group",
        "health_care": "healthCare",
        "payroll": "payroll",
        "level_3_eligible": "level3Eligible",
        "pinless_debit": "pinlessDebit",
        "signature_debit": "signatureDebit",
        "prepaid": "prepaid",
        "regulated": "regulated",
        "account_holder_type": "accountHolderType",
    }

    _optionals = [
        "account_type",
        "account_status",
        "balances",
        "balance_amount",
        "balance_amount_type",
        "currency",
        "balance_sign",
        "affluence_indicator",
        "category",
        "commercial",
        "group",
        "health_care",
        "payroll",
        "level_3_eligible",
        "pinless_debit",
        "signature_debit",
        "prepaid",
        "regulated",
        "account_holder_type",
    ]

    def __init__(
        self,
        account_type=APIHelper.SKIP,
        account_status=APIHelper.SKIP,
        balances=APIHelper.SKIP,
        balance_amount=APIHelper.SKIP,
        balance_amount_type=APIHelper.SKIP,
        currency=APIHelper.SKIP,
        balance_sign=APIHelper.SKIP,
        affluence_indicator=APIHelper.SKIP,
        category=APIHelper.SKIP,
        commercial=APIHelper.SKIP,
        group=APIHelper.SKIP,
        health_care=APIHelper.SKIP,
        payroll=APIHelper.SKIP,
        level_3_eligible=APIHelper.SKIP,
        pinless_debit=APIHelper.SKIP,
        signature_debit=APIHelper.SKIP,
        prepaid=APIHelper.SKIP,
        regulated=APIHelper.SKIP,
        account_holder_type=APIHelper.SKIP,
        additional_properties=None):
        """Initialize a AccountFeatures instance."""
        # Initialize members of the class
        if account_type is not APIHelper.SKIP:
            self.account_type = account_type
        if account_status is not APIHelper.SKIP:
            self.account_status = account_status
        if balances is not APIHelper.SKIP:
            self.balances = balances
        if balance_amount is not APIHelper.SKIP:
            self.balance_amount = balance_amount
        if balance_amount_type is not APIHelper.SKIP:
            self.balance_amount_type = balance_amount_type
        if currency is not APIHelper.SKIP:
            self.currency = currency
        if balance_sign is not APIHelper.SKIP:
            self.balance_sign = balance_sign
        if affluence_indicator is not APIHelper.SKIP:
            self.affluence_indicator = affluence_indicator
        if category is not APIHelper.SKIP:
            self.category = category
        if commercial is not APIHelper.SKIP:
            self.commercial = commercial
        if group is not APIHelper.SKIP:
            self.group = group
        if health_care is not APIHelper.SKIP:
            self.health_care = health_care
        if payroll is not APIHelper.SKIP:
            self.payroll = payroll
        if level_3_eligible is not APIHelper.SKIP:
            self.level_3_eligible = level_3_eligible
        if pinless_debit is not APIHelper.SKIP:
            self.pinless_debit = pinless_debit
        if signature_debit is not APIHelper.SKIP:
            self.signature_debit = signature_debit
        if prepaid is not APIHelper.SKIP:
            self.prepaid = prepaid
        if regulated is not APIHelper.SKIP:
            self.regulated = regulated
        if account_holder_type is not APIHelper.SKIP:
            self.account_holder_type = account_holder_type

        # 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_type =\
            dictionary.get("accountType")\
            if dictionary.get("accountType")\
                else APIHelper.SKIP
        account_status =\
            dictionary.get("accountStatus")\
            if dictionary.get("accountStatus")\
                else APIHelper.SKIP
        balances = None
        if dictionary.get("balances") is not None:
            balances = [
                Balance.from_dictionary(x)
                    for x in dictionary.get("balances")
            ]
        else:
            balances = APIHelper.SKIP
        balance_amount =\
            dictionary.get("balanceAmount")\
            if dictionary.get("balanceAmount")\
                else APIHelper.SKIP
        balance_amount_type =\
            dictionary.get("balanceAmountType")\
            if dictionary.get("balanceAmountType")\
                else APIHelper.SKIP
        currency =\
            dictionary.get("currency")\
            if dictionary.get("currency")\
                else APIHelper.SKIP
        balance_sign =\
            dictionary.get("balanceSign")\
            if dictionary.get("balanceSign")\
                else APIHelper.SKIP
        affluence_indicator =\
            dictionary.get("affluenceIndicator")\
            if dictionary.get("affluenceIndicator")\
                else APIHelper.SKIP
        category =\
            dictionary.get("category")\
            if dictionary.get("category")\
                else APIHelper.SKIP
        commercial =\
            dictionary.get("commercial")\
            if dictionary.get("commercial")\
                else APIHelper.SKIP
        group =\
            dictionary.get("group")\
            if dictionary.get("group")\
                else APIHelper.SKIP
        health_care =\
            dictionary.get("healthCare")\
            if dictionary.get("healthCare")\
                else APIHelper.SKIP
        payroll =\
            dictionary.get("payroll")\
            if dictionary.get("payroll")\
                else APIHelper.SKIP
        level_3_eligible =\
            dictionary.get("level3Eligible")\
            if dictionary.get("level3Eligible")\
                else APIHelper.SKIP
        pinless_debit =\
            dictionary.get("pinlessDebit")\
            if dictionary.get("pinlessDebit")\
                else APIHelper.SKIP
        signature_debit =\
            dictionary.get("signatureDebit")\
            if dictionary.get("signatureDebit")\
                else APIHelper.SKIP
        prepaid =\
            dictionary.get("prepaid")\
            if dictionary.get("prepaid")\
                else APIHelper.SKIP
        regulated =\
            dictionary.get("regulated")\
            if dictionary.get("regulated")\
                else APIHelper.SKIP
        account_holder_type =\
            dictionary.get("accountHolderType")\
            if dictionary.get("accountHolderType")\
                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_type,
                   account_status,
                   balances,
                   balance_amount,
                   balance_amount_type,
                   currency,
                   balance_sign,
                   affluence_indicator,
                   category,
                   commercial,
                   group,
                   health_care,
                   payroll,
                   level_3_eligible,
                   pinless_debit,
                   signature_debit,
                   prepaid,
                   regulated,
                   account_holder_type,
                   additional_properties)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _account_type=(
            self.account_type
            if hasattr(self, "account_type")
            else None
        )
        _account_status=(
            self.account_status
            if hasattr(self, "account_status")
            else None
        )
        _balances=(
            self.balances
            if hasattr(self, "balances")
            else None
        )
        _balance_amount=(
            self.balance_amount
            if hasattr(self, "balance_amount")
            else None
        )
        _balance_amount_type=(
            self.balance_amount_type
            if hasattr(self, "balance_amount_type")
            else None
        )
        _currency=(
            self.currency
            if hasattr(self, "currency")
            else None
        )
        _balance_sign=(
            self.balance_sign
            if hasattr(self, "balance_sign")
            else None
        )
        _affluence_indicator=(
            self.affluence_indicator
            if hasattr(self, "affluence_indicator")
            else None
        )
        _category=(
            self.category
            if hasattr(self, "category")
            else None
        )
        _commercial=(
            self.commercial
            if hasattr(self, "commercial")
            else None
        )
        _group=(
            self.group
            if hasattr(self, "group")
            else None
        )
        _health_care=(
            self.health_care
            if hasattr(self, "health_care")
            else None
        )
        _payroll=(
            self.payroll
            if hasattr(self, "payroll")
            else None
        )
        _level_3_eligible=(
            self.level_3_eligible
            if hasattr(self, "level_3_eligible")
            else None
        )
        _pinless_debit=(
            self.pinless_debit
            if hasattr(self, "pinless_debit")
            else None
        )
        _signature_debit=(
            self.signature_debit
            if hasattr(self, "signature_debit")
            else None
        )
        _prepaid=(
            self.prepaid
            if hasattr(self, "prepaid")
            else None
        )
        _regulated=(
            self.regulated
            if hasattr(self, "regulated")
            else None
        )
        _account_holder_type=(
            self.account_holder_type
            if hasattr(self, "account_holder_type")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"account_type={_account_type!r}, "
            f"account_status={_account_status!r}, "
            f"balances={_balances!r}, "
            f"balance_amount={_balance_amount!r}, "
            f"balance_amount_type={_balance_amount_type!r}, "
            f"currency={_currency!r}, "
            f"balance_sign={_balance_sign!r}, "
            f"affluence_indicator={_affluence_indicator!r}, "
            f"category={_category!r}, "
            f"commercial={_commercial!r}, "
            f"group={_group!r}, "
            f"health_care={_health_care!r}, "
            f"payroll={_payroll!r}, "
            f"level_3_eligible={_level_3_eligible!r}, "
            f"pinless_debit={_pinless_debit!r}, "
            f"signature_debit={_signature_debit!r}, "
            f"prepaid={_prepaid!r}, "
            f"regulated={_regulated!r}, "
            f"account_holder_type={_account_holder_type!r}, "
            f"additional_properties={_additional_properties!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _account_type=(
            self.account_type
            if hasattr(self, "account_type")
            else None
        )
        _account_status=(
            self.account_status
            if hasattr(self, "account_status")
            else None
        )
        _balances=(
            self.balances
            if hasattr(self, "balances")
            else None
        )
        _balance_amount=(
            self.balance_amount
            if hasattr(self, "balance_amount")
            else None
        )
        _balance_amount_type=(
            self.balance_amount_type
            if hasattr(self, "balance_amount_type")
            else None
        )
        _currency=(
            self.currency
            if hasattr(self, "currency")
            else None
        )
        _balance_sign=(
            self.balance_sign
            if hasattr(self, "balance_sign")
            else None
        )
        _affluence_indicator=(
            self.affluence_indicator
            if hasattr(self, "affluence_indicator")
            else None
        )
        _category=(
            self.category
            if hasattr(self, "category")
            else None
        )
        _commercial=(
            self.commercial
            if hasattr(self, "commercial")
            else None
        )
        _group=(
            self.group
            if hasattr(self, "group")
            else None
        )
        _health_care=(
            self.health_care
            if hasattr(self, "health_care")
            else None
        )
        _payroll=(
            self.payroll
            if hasattr(self, "payroll")
            else None
        )
        _level_3_eligible=(
            self.level_3_eligible
            if hasattr(self, "level_3_eligible")
            else None
        )
        _pinless_debit=(
            self.pinless_debit
            if hasattr(self, "pinless_debit")
            else None
        )
        _signature_debit=(
            self.signature_debit
            if hasattr(self, "signature_debit")
            else None
        )
        _prepaid=(
            self.prepaid
            if hasattr(self, "prepaid")
            else None
        )
        _regulated=(
            self.regulated
            if hasattr(self, "regulated")
            else None
        )
        _account_holder_type=(
            self.account_holder_type
            if hasattr(self, "account_holder_type")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"account_type={_account_type!s}, "
            f"account_status={_account_status!s}, "
            f"balances={_balances!s}, "
            f"balance_amount={_balance_amount!s}, "
            f"balance_amount_type={_balance_amount_type!s}, "
            f"currency={_currency!s}, "
            f"balance_sign={_balance_sign!s}, "
            f"affluence_indicator={_affluence_indicator!s}, "
            f"category={_category!s}, "
            f"commercial={_commercial!s}, "
            f"group={_group!s}, "
            f"health_care={_health_care!s}, "
            f"payroll={_payroll!s}, "
            f"level_3_eligible={_level_3_eligible!s}, "
            f"pinless_debit={_pinless_debit!s}, "
            f"signature_debit={_signature_debit!s}, "
            f"prepaid={_prepaid!s}, "
            f"regulated={_regulated!s}, "
            f"account_holder_type={_account_holder_type!s}, "
            f"additional_properties={_additional_properties!s}, "
            f")"
        )
