"""visaacceptancemergedspec.

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

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


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

    Attributes:
        mtype (str): This field contains a 3-digit numeric value that indicates the
            card type within Visa Acceptance eco-system. Possible values from BIN
            Lookup Service (based on availability and enablement): - `000`:
            Unsupported Card Type - `001`: Visa - `002`: Mastercard - `003`: American
            Express - `004`: Discover - `005`: Diners Club - `007`: JCB - `036`:
            Cartes Bancaire - `042`: Maestro - `054`: Elo - `058`: Carnet - `060`:
            MADA - `061`: RuPay - `062`: China UnionPay - `064`: Prompt Card - `067`:
            Meeza - `068`: PayPak - `070`: EFTPOS - `081`: Jaywan - `082`: TPN
            Glossary of possible values in the payments ecosystem: - `001`: Visa -
            `002`: Mastercard - `003`: American Express - `004`: Discover - `005`:
            Diners Club - `006`: Carte Blanche - `007`: JCB - `008`: Optima - `009`:
            GE Private Label - `010`: Beneficial Private Label - `011`: Twinpay
            Credit Card - `012`: Twinpay Debit Card - `013`: Walmart - `014`: EnRoute
            - `015`: Lowe's Consumer - `016`: Home Depot Consumer - `017`: MBNA -
            `018`: Dick's Sportwear - `019`: Casual Corner - `020`: Sears - `021`:
            JAL - `023`: Disney Card - `024`: Switch/Solo - `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 - `034`: Dankort - `035`:
            Laser - `036`: Cartes Bancaire - `037`: Carta Si - `040`: UATP - `041`:
            HOUSEHOLD - `042`: Maestro - `043`: GE MONEY - `044`: Korean Cards -
            `045`: Style Cards - `046`: J.Crew - `047`: Payeasecn eWallet - `048`:
            Payeasecn Bank Transfer - `049`: Meijer - `050`: Hipercard - `051`: Aura
            - `052`: Redecard - `053`: Orico Card - `054`: Elo - `055`: Capital One
            Private Label - `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 - `082`: TPN
        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   - MADA   - ELO   - CAPITAL ONE PRIVATE
            LABEL   - CARNET   - RUPAY   - CHINA UNION PAY   - FALABELLA PRIVATE
            LABEL   - PROMPTCARD   - KOREAN DOMESTIC   - BANRICOMPRAS   - MEEZA   -
            PAYPAK   - JAYWAN   - TPN
        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 Brand 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")"
        )
