"""visaacceptancemergedspec.

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

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


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

    Attributes:
        mtype (str): Three-digit value that indicates the card type.  **IMPORTANT**
            It is strongly recommended that you include the card type field in
            request messages even if it is optional for your processor and card type.
            Omitting the card type can cause the transaction to be processed with the
            wrong card type.  Possible values: - `001`: Visa. Use card type value
            `001` for Visa Electron. - `002`: Mastercard, Eurocard[^1], which is a
            European regional brand of Mastercard. - `003`: American Express - `004`:
            Discover - `005`: Diners Club - `006`: Carte Blanche[^1] - `007`: JCB[^1]
            - `008`: Optima - `009`: GE Private Label - `010`: Beneficial Private
            Label - `011`: Twinpay Credit Card - `012`: Twinpay Debit Card - `013`:
            WalMart - `014`: Enroute[^1] - `015`: Lowe's Consumer - `016`: Home Depot
            Consumer - `017`: MBNA - `018`: Dick's Sportswear - `019`: Casual Corner
            - `020`: Sears - `021`: JAL[^1] - `023`: Disney Card - `024`: Maestro (UK
            Domestic)[^1] - `025`: Sam's Club Consumer - `026`: Sam's Club Business -
            `027`: Nico's - `028`: Paymentech Bill Me Later - `029`: Bebe - `030`:
            Restoration Hardware - `031`: Delta Online - `032`: Solo - `033`: Visa
            Electron[^1]. Do not use this value. Use `001` for all Visa card types. -
            `034`: Dankort[^1] - `035`: Laser - `036`: Cartes Bancaires[^1,4] -
            `037`: Carta Si[^1] - `038`: Pinless Debit - `039`: Encoded account
            number[^1] - `040`: UATP[^1] - `041`: HOUSEHOLD - `042`: Maestro
            (International)[^1] - `043`: GE MONEY - `044`: Korean Cards - `045`:
            Style Cards - `046`: JCrew - `047`: Payeasecn eWallet - `048`: Payeasecn
            Bank Transfer - `049`: Meijer - `050`: Hipercard[^2,3] - `051`: Aura -
            `052`: Redecard - `053`: Orico card - `054`: Elo[^3] - `055`: Capitol One
            Private Label - `056`: Carnet - `057`: Costco Private Label - `058`:
            Carnet - `059`: ValueLink - `060`: MADA - `061`: RuPay - `062`: China
            UnionPay - `063`: Falabella Private Label - `064`: Prompt Card - `065`:
            Korean Domestic - `066`: Banricompras - `067`: MEEZA - `068`: PayPak -
            `070`: EFTPOS - `071`: Codensa - `072`: Olimpica - `073`: Colsubsidio -
            `074`: Tuya - `075`: Sodexo - `076`: Naranja - `077`: Cabal - `078`:
            DINELCO - `079`: PANAL - `080`: EPM - `081`: Jaywan  [^1]: For this card
            type, you must include the `paymentInformation.card.type` or
            `paymentInformation.tokenizedCard.type` field in your request for an
            authorization or a stand-alone credit. [^2]: For this card type on Cielo
            3.0, you must include the `paymentInformation.card.type` or
            `paymentInformation.tokenizedCard.type` field in a request for an
            authorization or a stand-alone credit. This card type is not supported on
            Cielo 1.5. [^3]: For this card type on Getnet and Rede, you must include
            the `paymentInformation.card.type` or
            `paymentInformation.tokenizedCard.type` field in a request for an
            authorization or a stand-alone credit. [^4]: For this card type, you must
            include the `paymentInformation.card.type` in your request for any payer
            authentication services.  #### Used by **Authorization** Required for
            Carte Blanche and JCB. Optional for all other card types.  #### Card
            Present reply This field is included in the reply message when the client
            software that is installed on the POS terminal uses the token management
            service (TMS) to retrieve tokenized payment details. You must contact
            customer support to have your account enabled to receive these fields in
            the credit reply message.  Returned by the Credit service.  This reply
            field is only supported by the following processors: - American Express
            Direct - Credit Mutuel-CIC - FDC Nashville Global - OmniPay Direct - SIX
            #### Google Pay transactions For PAN-based Google Pay transactions, this
            field is returned in the API response.  #### GPX This field only supports
            transactions from the following card types: - Visa - Mastercard - AMEX -
            Discover - Diners - JCB - Union Pay International
        brand_name (str): This field contains the card brand name.   Some of the
            possible values (not an exhaustive list) are -    - VISA   - MASTERCARD
            - AMERICAN EXPRESS   - DISCOVER   - DINERS CLUB   - CARTE BLANCHE   - JCB
            - OPTIMA   - TWINPAY CREDIT CARD   - TWINPAY DEBIT CARD   - WALMART   -
            ENROUTE   - LOWES CONSUMER   - HOME DEPOT CONSUMER   - MBNA   - DICKS
            SPORTWEAR   - CASUAL CORNER   - SEARS   - JAL   - DISNEY CARD   -
            SWITCH/SOLO   - SAMS CLUB CONSUMER   - SAMS CLUB BUSINESS   - NICOS HOUSE
            CARD   - BEBE   - RESTORATION HARDWARE   - DELTA ONLINE   - SOLO   - VISA
            ELECTRON   - DANKORT   - LASER   - CARTE BANCAIRE   - CARTA SI   -
            ENCODED ACCOUNT   - UATP   - HOUSEHOLD   - MAESTRO   - GE CAPITAL   -
            KOREAN CARDS   - STYLE CARDS   - JCREW   - MEIJER   - HIPERCARD   - AURA
            - REDECARD   - ORICO HOUSE CARD   - ELO   - CAPITAL ONE PRIVATE LABEL   -
            CARNET   - RUPAY   - CHINA UNION PAY   - FALABELLA PRIVATE LABEL   -
            PROMPTCARD   - KOREAN DOMESTIC   - BANRICOMPRAS
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "mtype": "type",
        "brand_name": "brandName",
    }

    _optionals = [
        "mtype",
        "brand_name",
    ]

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

        # 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
        mtype =\
            dictionary.get("type")\
            if dictionary.get("type")\
                else APIHelper.SKIP
        brand_name =\
            dictionary.get("brandName")\
            if dictionary.get("brandName")\
                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(mtype,
                   brand_name,
                   additional_properties)

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

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