"""mindbodypublicapi.

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

# ruff: noqa: E501
from mindbodypublicapi.api_helper import APIHelper
from mindbodypublicapi.models.lead_channel import (
    LeadChannel,
)


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

    Attributes:
        accepts_american_express (bool): When `true`, indicates that this site
            accepts American Express cards.<br />  When `false`, indicates that this
            site does not accept American Express credit cards.
        accepts_discover (bool): When `true`, indicates that this site accepts
            Discover cards.<br />  When `false`, indicates that this site does not
            accept Discover credit cards.
        accepts_master_card (bool): When `true`, indicates that this site accepts
            MasterCard cards.<br />  When `false`, indicates that this site does not
            accept MasterCard credit cards.
        accepts_visa (bool): When `true`, indicates that this site accepts Visa
            cards.<br />  When `false`, indicates that this site does not accept Visa
            credit cards.
        allows_dashboard_access (bool): When `true`, indicates that this site allows
            access to its dashboard.<br />  When `false`, indicates that this site
            does not allow access to its dashboard.
        contact_email (str): The site’s email address.
        description (str): A description of the site.
        id (int): The site ID.
        logo_url (str): The URL to the site’s logo.
        name (str): The name of the site.
        page_color_1 (str): A hex code for a color the business owner uses in
            marketing. This color can be used to set a theme for an integration so
            that it matches the configured color-scheme for the business.
        page_color_2 (str): The hex code for a second color, to be used in the same
            manner as `pageColor1`.
        page_color_3 (str): The hex code for a third color, to be used in the same
            manner as `pageColor1`.
        page_color_4 (str): The hex code for a fourth color, to be used in the same
            manner as `pageColor1`.
        pricing_level (str): The MINDBODY pricing level for the business. Possible
            values are:  Accelerate - The business is on MINDBODY’s Accelerate
            pricing tier.  Grow - The business is on MINDBODY’s Essential pricing
            tier.  Legacy - The business is on an older MINDBODY pricing tier that is
            no longer offered.  Listing - The business is on an older MINDBODY
            pricing tier that is no longer offered.  Pro - The business is on an
            older MINDBODY pricing tier that is no longer offered.  Solo - The
            business is on an older MINDBODY pricing tier that is no longer offered.
            Ultimate - The business is on MINDBODY’s Ultimate pricing tier.
        sms_package_enabled (bool): When `true`, indicates that the business uses SMS
            text messages to communicate with its clients.<br />  When `false`,
            indicates that the business does not use SMS text messages to communicate
            with its clients.
        tax_inclusive_prices (bool): When `true`, indicates that the total includes
            tax.<br />  When `false`, indicates that the total does not include tax.
        currency_iso_code (str): The currency ISO code for the site.
        country_code (str): The country code for the site.
        time_zone (str): The time zone the site is located in.
        accepts_direct_debit (bool): When `true`, indicates that direct debit can be
            used by clients at this site.<br />  When `false`, indicates that direct
            debit can not by used by clients at this site.
        lead_channels (List[LeadChannel]): The list of lead channels available for a
            subscriber/studio.
        per_staff_pricing (bool): When `true`, indicates that per-staff pricing is
            enabled at this site.<br />  When `false`, indicates that per-staff
            pricing is not enabled at this site.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "accepts_american_express": "AcceptsAmericanExpress",
        "accepts_discover": "AcceptsDiscover",
        "accepts_master_card": "AcceptsMasterCard",
        "accepts_visa": "AcceptsVisa",
        "allows_dashboard_access": "AllowsDashboardAccess",
        "contact_email": "ContactEmail",
        "description": "Description",
        "id": "Id",
        "logo_url": "LogoUrl",
        "name": "Name",
        "page_color_1": "PageColor1",
        "page_color_2": "PageColor2",
        "page_color_3": "PageColor3",
        "page_color_4": "PageColor4",
        "pricing_level": "PricingLevel",
        "sms_package_enabled": "SmsPackageEnabled",
        "tax_inclusive_prices": "TaxInclusivePrices",
        "currency_iso_code": "CurrencyIsoCode",
        "country_code": "CountryCode",
        "time_zone": "TimeZone",
        "accepts_direct_debit": "AcceptsDirectDebit",
        "lead_channels": "LeadChannels",
        "per_staff_pricing": "PerStaffPricing",
    }

    _optionals = [
        "accepts_american_express",
        "accepts_discover",
        "accepts_master_card",
        "accepts_visa",
        "allows_dashboard_access",
        "contact_email",
        "description",
        "id",
        "logo_url",
        "name",
        "page_color_1",
        "page_color_2",
        "page_color_3",
        "page_color_4",
        "pricing_level",
        "sms_package_enabled",
        "tax_inclusive_prices",
        "currency_iso_code",
        "country_code",
        "time_zone",
        "accepts_direct_debit",
        "lead_channels",
        "per_staff_pricing",
    ]

    def __init__(
        self,
        accepts_american_express=APIHelper.SKIP,
        accepts_discover=APIHelper.SKIP,
        accepts_master_card=APIHelper.SKIP,
        accepts_visa=APIHelper.SKIP,
        allows_dashboard_access=APIHelper.SKIP,
        contact_email=APIHelper.SKIP,
        description=APIHelper.SKIP,
        id=APIHelper.SKIP,
        logo_url=APIHelper.SKIP,
        name=APIHelper.SKIP,
        page_color_1=APIHelper.SKIP,
        page_color_2=APIHelper.SKIP,
        page_color_3=APIHelper.SKIP,
        page_color_4=APIHelper.SKIP,
        pricing_level=APIHelper.SKIP,
        sms_package_enabled=APIHelper.SKIP,
        tax_inclusive_prices=APIHelper.SKIP,
        currency_iso_code=APIHelper.SKIP,
        country_code=APIHelper.SKIP,
        time_zone=APIHelper.SKIP,
        accepts_direct_debit=APIHelper.SKIP,
        lead_channels=APIHelper.SKIP,
        per_staff_pricing=APIHelper.SKIP):
        """Initialize a Site instance."""
        # Initialize members of the class
        if accepts_american_express is not APIHelper.SKIP:
            self.accepts_american_express = accepts_american_express
        if accepts_discover is not APIHelper.SKIP:
            self.accepts_discover = accepts_discover
        if accepts_master_card is not APIHelper.SKIP:
            self.accepts_master_card = accepts_master_card
        if accepts_visa is not APIHelper.SKIP:
            self.accepts_visa = accepts_visa
        if allows_dashboard_access is not APIHelper.SKIP:
            self.allows_dashboard_access = allows_dashboard_access
        if contact_email is not APIHelper.SKIP:
            self.contact_email = contact_email
        if description is not APIHelper.SKIP:
            self.description = description
        if id is not APIHelper.SKIP:
            self.id = id
        if logo_url is not APIHelper.SKIP:
            self.logo_url = logo_url
        if name is not APIHelper.SKIP:
            self.name = name
        if page_color_1 is not APIHelper.SKIP:
            self.page_color_1 = page_color_1
        if page_color_2 is not APIHelper.SKIP:
            self.page_color_2 = page_color_2
        if page_color_3 is not APIHelper.SKIP:
            self.page_color_3 = page_color_3
        if page_color_4 is not APIHelper.SKIP:
            self.page_color_4 = page_color_4
        if pricing_level is not APIHelper.SKIP:
            self.pricing_level = pricing_level
        if sms_package_enabled is not APIHelper.SKIP:
            self.sms_package_enabled = sms_package_enabled
        if tax_inclusive_prices is not APIHelper.SKIP:
            self.tax_inclusive_prices = tax_inclusive_prices
        if currency_iso_code is not APIHelper.SKIP:
            self.currency_iso_code = currency_iso_code
        if country_code is not APIHelper.SKIP:
            self.country_code = country_code
        if time_zone is not APIHelper.SKIP:
            self.time_zone = time_zone
        if accepts_direct_debit is not APIHelper.SKIP:
            self.accepts_direct_debit = accepts_direct_debit
        if lead_channels is not APIHelper.SKIP:
            self.lead_channels = lead_channels
        if per_staff_pricing is not APIHelper.SKIP:
            self.per_staff_pricing = per_staff_pricing

    @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
        accepts_american_express =\
            dictionary.get("AcceptsAmericanExpress")\
            if "AcceptsAmericanExpress" in dictionary.keys()\
                else APIHelper.SKIP
        accepts_discover =\
            dictionary.get("AcceptsDiscover")\
            if "AcceptsDiscover" in dictionary.keys()\
                else APIHelper.SKIP
        accepts_master_card =\
            dictionary.get("AcceptsMasterCard")\
            if "AcceptsMasterCard" in dictionary.keys()\
                else APIHelper.SKIP
        accepts_visa =\
            dictionary.get("AcceptsVisa")\
            if "AcceptsVisa" in dictionary.keys()\
                else APIHelper.SKIP
        allows_dashboard_access =\
            dictionary.get("AllowsDashboardAccess")\
            if "AllowsDashboardAccess" in dictionary.keys()\
                else APIHelper.SKIP
        contact_email =\
            dictionary.get("ContactEmail")\
            if dictionary.get("ContactEmail")\
                else APIHelper.SKIP
        description =\
            dictionary.get("Description")\
            if dictionary.get("Description")\
                else APIHelper.SKIP
        id =\
            dictionary.get("Id")\
            if dictionary.get("Id")\
                else APIHelper.SKIP
        logo_url =\
            dictionary.get("LogoUrl")\
            if dictionary.get("LogoUrl")\
                else APIHelper.SKIP
        name =\
            dictionary.get("Name")\
            if dictionary.get("Name")\
                else APIHelper.SKIP
        page_color_1 =\
            dictionary.get("PageColor1")\
            if dictionary.get("PageColor1")\
                else APIHelper.SKIP
        page_color_2 =\
            dictionary.get("PageColor2")\
            if dictionary.get("PageColor2")\
                else APIHelper.SKIP
        page_color_3 =\
            dictionary.get("PageColor3")\
            if dictionary.get("PageColor3")\
                else APIHelper.SKIP
        page_color_4 =\
            dictionary.get("PageColor4")\
            if dictionary.get("PageColor4")\
                else APIHelper.SKIP
        pricing_level =\
            dictionary.get("PricingLevel")\
            if dictionary.get("PricingLevel")\
                else APIHelper.SKIP
        sms_package_enabled =\
            dictionary.get("SmsPackageEnabled")\
            if "SmsPackageEnabled" in dictionary.keys()\
                else APIHelper.SKIP
        tax_inclusive_prices =\
            dictionary.get("TaxInclusivePrices")\
            if "TaxInclusivePrices" in dictionary.keys()\
                else APIHelper.SKIP
        currency_iso_code =\
            dictionary.get("CurrencyIsoCode")\
            if dictionary.get("CurrencyIsoCode")\
                else APIHelper.SKIP
        country_code =\
            dictionary.get("CountryCode")\
            if dictionary.get("CountryCode")\
                else APIHelper.SKIP
        time_zone =\
            dictionary.get("TimeZone")\
            if dictionary.get("TimeZone")\
                else APIHelper.SKIP
        accepts_direct_debit =\
            dictionary.get("AcceptsDirectDebit")\
            if "AcceptsDirectDebit" in dictionary.keys()\
                else APIHelper.SKIP
        lead_channels = None
        if dictionary.get("LeadChannels") is not None:
            lead_channels = [
                LeadChannel.from_dictionary(x)
                    for x in dictionary.get("LeadChannels")
            ]
        else:
            lead_channels = APIHelper.SKIP
        per_staff_pricing =\
            dictionary.get("PerStaffPricing")\
            if "PerStaffPricing" in dictionary.keys()\
                else APIHelper.SKIP

        # Return an object of this model
        return cls(accepts_american_express,
                   accepts_discover,
                   accepts_master_card,
                   accepts_visa,
                   allows_dashboard_access,
                   contact_email,
                   description,
                   id,
                   logo_url,
                   name,
                   page_color_1,
                   page_color_2,
                   page_color_3,
                   page_color_4,
                   pricing_level,
                   sms_package_enabled,
                   tax_inclusive_prices,
                   currency_iso_code,
                   country_code,
                   time_zone,
                   accepts_direct_debit,
                   lead_channels,
                   per_staff_pricing)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _accepts_american_express=(
            self.accepts_american_express
            if hasattr(self, "accepts_american_express")
            else None
        )
        _accepts_discover=(
            self.accepts_discover
            if hasattr(self, "accepts_discover")
            else None
        )
        _accepts_master_card=(
            self.accepts_master_card
            if hasattr(self, "accepts_master_card")
            else None
        )
        _accepts_visa=(
            self.accepts_visa
            if hasattr(self, "accepts_visa")
            else None
        )
        _allows_dashboard_access=(
            self.allows_dashboard_access
            if hasattr(self, "allows_dashboard_access")
            else None
        )
        _contact_email=(
            self.contact_email
            if hasattr(self, "contact_email")
            else None
        )
        _description=(
            self.description
            if hasattr(self, "description")
            else None
        )
        _id=(
            self.id
            if hasattr(self, "id")
            else None
        )
        _logo_url=(
            self.logo_url
            if hasattr(self, "logo_url")
            else None
        )
        _name=(
            self.name
            if hasattr(self, "name")
            else None
        )
        _page_color_1=(
            self.page_color_1
            if hasattr(self, "page_color_1")
            else None
        )
        _page_color_2=(
            self.page_color_2
            if hasattr(self, "page_color_2")
            else None
        )
        _page_color_3=(
            self.page_color_3
            if hasattr(self, "page_color_3")
            else None
        )
        _page_color_4=(
            self.page_color_4
            if hasattr(self, "page_color_4")
            else None
        )
        _pricing_level=(
            self.pricing_level
            if hasattr(self, "pricing_level")
            else None
        )
        _sms_package_enabled=(
            self.sms_package_enabled
            if hasattr(self, "sms_package_enabled")
            else None
        )
        _tax_inclusive_prices=(
            self.tax_inclusive_prices
            if hasattr(self, "tax_inclusive_prices")
            else None
        )
        _currency_iso_code=(
            self.currency_iso_code
            if hasattr(self, "currency_iso_code")
            else None
        )
        _country_code=(
            self.country_code
            if hasattr(self, "country_code")
            else None
        )
        _time_zone=(
            self.time_zone
            if hasattr(self, "time_zone")
            else None
        )
        _accepts_direct_debit=(
            self.accepts_direct_debit
            if hasattr(self, "accepts_direct_debit")
            else None
        )
        _lead_channels=(
            self.lead_channels
            if hasattr(self, "lead_channels")
            else None
        )
        _per_staff_pricing=(
            self.per_staff_pricing
            if hasattr(self, "per_staff_pricing")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"accepts_american_express={_accepts_american_express!r}, "
            f"accepts_discover={_accepts_discover!r}, "
            f"accepts_master_card={_accepts_master_card!r}, "
            f"accepts_visa={_accepts_visa!r}, "
            f"allows_dashboard_access={_allows_dashboard_access!r}, "
            f"contact_email={_contact_email!r}, "
            f"description={_description!r}, "
            f"id={_id!r}, "
            f"logo_url={_logo_url!r}, "
            f"name={_name!r}, "
            f"page_color_1={_page_color_1!r}, "
            f"page_color_2={_page_color_2!r}, "
            f"page_color_3={_page_color_3!r}, "
            f"page_color_4={_page_color_4!r}, "
            f"pricing_level={_pricing_level!r}, "
            f"sms_package_enabled={_sms_package_enabled!r}, "
            f"tax_inclusive_prices={_tax_inclusive_prices!r}, "
            f"currency_iso_code={_currency_iso_code!r}, "
            f"country_code={_country_code!r}, "
            f"time_zone={_time_zone!r}, "
            f"accepts_direct_debit={_accepts_direct_debit!r}, "
            f"lead_channels={_lead_channels!r}, "
            f"per_staff_pricing={_per_staff_pricing!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _accepts_american_express=(
            self.accepts_american_express
            if hasattr(self, "accepts_american_express")
            else None
        )
        _accepts_discover=(
            self.accepts_discover
            if hasattr(self, "accepts_discover")
            else None
        )
        _accepts_master_card=(
            self.accepts_master_card
            if hasattr(self, "accepts_master_card")
            else None
        )
        _accepts_visa=(
            self.accepts_visa
            if hasattr(self, "accepts_visa")
            else None
        )
        _allows_dashboard_access=(
            self.allows_dashboard_access
            if hasattr(self, "allows_dashboard_access")
            else None
        )
        _contact_email=(
            self.contact_email
            if hasattr(self, "contact_email")
            else None
        )
        _description=(
            self.description
            if hasattr(self, "description")
            else None
        )
        _id=(
            self.id
            if hasattr(self, "id")
            else None
        )
        _logo_url=(
            self.logo_url
            if hasattr(self, "logo_url")
            else None
        )
        _name=(
            self.name
            if hasattr(self, "name")
            else None
        )
        _page_color_1=(
            self.page_color_1
            if hasattr(self, "page_color_1")
            else None
        )
        _page_color_2=(
            self.page_color_2
            if hasattr(self, "page_color_2")
            else None
        )
        _page_color_3=(
            self.page_color_3
            if hasattr(self, "page_color_3")
            else None
        )
        _page_color_4=(
            self.page_color_4
            if hasattr(self, "page_color_4")
            else None
        )
        _pricing_level=(
            self.pricing_level
            if hasattr(self, "pricing_level")
            else None
        )
        _sms_package_enabled=(
            self.sms_package_enabled
            if hasattr(self, "sms_package_enabled")
            else None
        )
        _tax_inclusive_prices=(
            self.tax_inclusive_prices
            if hasattr(self, "tax_inclusive_prices")
            else None
        )
        _currency_iso_code=(
            self.currency_iso_code
            if hasattr(self, "currency_iso_code")
            else None
        )
        _country_code=(
            self.country_code
            if hasattr(self, "country_code")
            else None
        )
        _time_zone=(
            self.time_zone
            if hasattr(self, "time_zone")
            else None
        )
        _accepts_direct_debit=(
            self.accepts_direct_debit
            if hasattr(self, "accepts_direct_debit")
            else None
        )
        _lead_channels=(
            self.lead_channels
            if hasattr(self, "lead_channels")
            else None
        )
        _per_staff_pricing=(
            self.per_staff_pricing
            if hasattr(self, "per_staff_pricing")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"accepts_american_express={_accepts_american_express!s}, "
            f"accepts_discover={_accepts_discover!s}, "
            f"accepts_master_card={_accepts_master_card!s}, "
            f"accepts_visa={_accepts_visa!s}, "
            f"allows_dashboard_access={_allows_dashboard_access!s}, "
            f"contact_email={_contact_email!s}, "
            f"description={_description!s}, "
            f"id={_id!s}, "
            f"logo_url={_logo_url!s}, "
            f"name={_name!s}, "
            f"page_color_1={_page_color_1!s}, "
            f"page_color_2={_page_color_2!s}, "
            f"page_color_3={_page_color_3!s}, "
            f"page_color_4={_page_color_4!s}, "
            f"pricing_level={_pricing_level!s}, "
            f"sms_package_enabled={_sms_package_enabled!s}, "
            f"tax_inclusive_prices={_tax_inclusive_prices!s}, "
            f"currency_iso_code={_currency_iso_code!s}, "
            f"country_code={_country_code!s}, "
            f"time_zone={_time_zone!s}, "
            f"accepts_direct_debit={_accepts_direct_debit!s}, "
            f"lead_channels={_lead_channels!s}, "
            f"per_staff_pricing={_per_staff_pricing!s}, "
            f")"
        )
