# coding: utf-8

"""
Copyright 2017 Square, Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""


from pprint import pformat
from six import iteritems
import re


class V1Merchant(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, id=None, name=None, email=None, account_type=None, account_capabilities=None, country_code=None, language_code=None, currency_code=None, business_name=None, business_address=None, business_phone=None, business_type=None, shipping_address=None, location_details=None, market_url=None):
        """
        V1Merchant - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'id': 'str',
            'name': 'str',
            'email': 'str',
            'account_type': 'str',
            'account_capabilities': 'list[str]',
            'country_code': 'str',
            'language_code': 'str',
            'currency_code': 'str',
            'business_name': 'str',
            'business_address': 'Address',
            'business_phone': 'V1PhoneNumber',
            'business_type': 'str',
            'shipping_address': 'Address',
            'location_details': 'V1MerchantLocationDetails',
            'market_url': 'str'
        }

        self.attribute_map = {
            'id': 'id',
            'name': 'name',
            'email': 'email',
            'account_type': 'account_type',
            'account_capabilities': 'account_capabilities',
            'country_code': 'country_code',
            'language_code': 'language_code',
            'currency_code': 'currency_code',
            'business_name': 'business_name',
            'business_address': 'business_address',
            'business_phone': 'business_phone',
            'business_type': 'business_type',
            'shipping_address': 'shipping_address',
            'location_details': 'location_details',
            'market_url': 'market_url'
        }

        self._id = id
        self._name = name
        self._email = email
        self._account_type = account_type
        self._account_capabilities = account_capabilities
        self._country_code = country_code
        self._language_code = language_code
        self._currency_code = currency_code
        self._business_name = business_name
        self._business_address = business_address
        self._business_phone = business_phone
        self._business_type = business_type
        self._shipping_address = shipping_address
        self._location_details = location_details
        self._market_url = market_url

    @property
    def id(self):
        """
        Gets the id of this V1Merchant.
        The merchant account's unique identifier.

        :return: The id of this V1Merchant.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this V1Merchant.
        The merchant account's unique identifier.

        :param id: The id of this V1Merchant.
        :type: str
        """

        self._id = id

    @property
    def name(self):
        """
        Gets the name of this V1Merchant.
        The name associated with the merchant account.

        :return: The name of this V1Merchant.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this V1Merchant.
        The name associated with the merchant account.

        :param name: The name of this V1Merchant.
        :type: str
        """

        self._name = name

    @property
    def email(self):
        """
        Gets the email of this V1Merchant.
        The email address associated with the merchant account.

        :return: The email of this V1Merchant.
        :rtype: str
        """
        return self._email

    @email.setter
    def email(self, email):
        """
        Sets the email of this V1Merchant.
        The email address associated with the merchant account.

        :param email: The email of this V1Merchant.
        :type: str
        """

        self._email = email

    @property
    def account_type(self):
        """
        Gets the account_type of this V1Merchant.
        Indicates whether the merchant account corresponds to a single-location account (LOCATION) or a business account (BUSINESS). This value is almost always LOCATION. See [V1MerchantAccountType](#type-v1merchantaccounttype) for possible values

        :return: The account_type of this V1Merchant.
        :rtype: str
        """
        return self._account_type

    @account_type.setter
    def account_type(self, account_type):
        """
        Sets the account_type of this V1Merchant.
        Indicates whether the merchant account corresponds to a single-location account (LOCATION) or a business account (BUSINESS). This value is almost always LOCATION. See [V1MerchantAccountType](#type-v1merchantaccounttype) for possible values

        :param account_type: The account_type of this V1Merchant.
        :type: str
        """

        self._account_type = account_type

    @property
    def account_capabilities(self):
        """
        Gets the account_capabilities of this V1Merchant.
        Capabilities that are enabled for the merchant's Square account. Capabilities that are not listed in this array are not enabled for the account.

        :return: The account_capabilities of this V1Merchant.
        :rtype: list[str]
        """
        return self._account_capabilities

    @account_capabilities.setter
    def account_capabilities(self, account_capabilities):
        """
        Sets the account_capabilities of this V1Merchant.
        Capabilities that are enabled for the merchant's Square account. Capabilities that are not listed in this array are not enabled for the account.

        :param account_capabilities: The account_capabilities of this V1Merchant.
        :type: list[str]
        """

        self._account_capabilities = account_capabilities

    @property
    def country_code(self):
        """
        Gets the country_code of this V1Merchant.
        The country associated with the merchant account, in ISO 3166-1-alpha-2 format.

        :return: The country_code of this V1Merchant.
        :rtype: str
        """
        return self._country_code

    @country_code.setter
    def country_code(self, country_code):
        """
        Sets the country_code of this V1Merchant.
        The country associated with the merchant account, in ISO 3166-1-alpha-2 format.

        :param country_code: The country_code of this V1Merchant.
        :type: str
        """

        self._country_code = country_code

    @property
    def language_code(self):
        """
        Gets the language_code of this V1Merchant.
        The language associated with the merchant account, in BCP 47 format.

        :return: The language_code of this V1Merchant.
        :rtype: str
        """
        return self._language_code

    @language_code.setter
    def language_code(self, language_code):
        """
        Sets the language_code of this V1Merchant.
        The language associated with the merchant account, in BCP 47 format.

        :param language_code: The language_code of this V1Merchant.
        :type: str
        """

        self._language_code = language_code

    @property
    def currency_code(self):
        """
        Gets the currency_code of this V1Merchant.
        The currency associated with the merchant account, in ISO 4217 format. For example, the currency code for US dollars is USD.

        :return: The currency_code of this V1Merchant.
        :rtype: str
        """
        return self._currency_code

    @currency_code.setter
    def currency_code(self, currency_code):
        """
        Sets the currency_code of this V1Merchant.
        The currency associated with the merchant account, in ISO 4217 format. For example, the currency code for US dollars is USD.

        :param currency_code: The currency_code of this V1Merchant.
        :type: str
        """

        self._currency_code = currency_code

    @property
    def business_name(self):
        """
        Gets the business_name of this V1Merchant.
        The name of the merchant's business.

        :return: The business_name of this V1Merchant.
        :rtype: str
        """
        return self._business_name

    @business_name.setter
    def business_name(self, business_name):
        """
        Sets the business_name of this V1Merchant.
        The name of the merchant's business.

        :param business_name: The business_name of this V1Merchant.
        :type: str
        """

        self._business_name = business_name

    @property
    def business_address(self):
        """
        Gets the business_address of this V1Merchant.
        The address of the merchant's business.

        :return: The business_address of this V1Merchant.
        :rtype: Address
        """
        return self._business_address

    @business_address.setter
    def business_address(self, business_address):
        """
        Sets the business_address of this V1Merchant.
        The address of the merchant's business.

        :param business_address: The business_address of this V1Merchant.
        :type: Address
        """

        self._business_address = business_address

    @property
    def business_phone(self):
        """
        Gets the business_phone of this V1Merchant.
        The phone number of the merchant's business.

        :return: The business_phone of this V1Merchant.
        :rtype: V1PhoneNumber
        """
        return self._business_phone

    @business_phone.setter
    def business_phone(self, business_phone):
        """
        Sets the business_phone of this V1Merchant.
        The phone number of the merchant's business.

        :param business_phone: The business_phone of this V1Merchant.
        :type: V1PhoneNumber
        """

        self._business_phone = business_phone

    @property
    def business_type(self):
        """
        Gets the business_type of this V1Merchant.
        The type of business operated by the merchant. See [V1MerchantBusinessType](#type-v1merchantbusinesstype) for possible values

        :return: The business_type of this V1Merchant.
        :rtype: str
        """
        return self._business_type

    @business_type.setter
    def business_type(self, business_type):
        """
        Sets the business_type of this V1Merchant.
        The type of business operated by the merchant. See [V1MerchantBusinessType](#type-v1merchantbusinesstype) for possible values

        :param business_type: The business_type of this V1Merchant.
        :type: str
        """

        self._business_type = business_type

    @property
    def shipping_address(self):
        """
        Gets the shipping_address of this V1Merchant.
        The merchant's shipping address.

        :return: The shipping_address of this V1Merchant.
        :rtype: Address
        """
        return self._shipping_address

    @shipping_address.setter
    def shipping_address(self, shipping_address):
        """
        Sets the shipping_address of this V1Merchant.
        The merchant's shipping address.

        :param shipping_address: The shipping_address of this V1Merchant.
        :type: Address
        """

        self._shipping_address = shipping_address

    @property
    def location_details(self):
        """
        Gets the location_details of this V1Merchant.
        Additional information for a single-location account specified by its associated business account, if it has one.

        :return: The location_details of this V1Merchant.
        :rtype: V1MerchantLocationDetails
        """
        return self._location_details

    @location_details.setter
    def location_details(self, location_details):
        """
        Sets the location_details of this V1Merchant.
        Additional information for a single-location account specified by its associated business account, if it has one.

        :param location_details: The location_details of this V1Merchant.
        :type: V1MerchantLocationDetails
        """

        self._location_details = location_details

    @property
    def market_url(self):
        """
        Gets the market_url of this V1Merchant.
        The URL of the merchant's online store.

        :return: The market_url of this V1Merchant.
        :rtype: str
        """
        return self._market_url

    @market_url.setter
    def market_url(self, market_url):
        """
        Sets the market_url of this V1Merchant.
        The URL of the merchant's online store.

        :param market_url: The market_url of this V1Merchant.
        :type: str
        """

        self._market_url = market_url

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return pformat(self.to_dict())

    def __repr__(self):
        """
        For `print` and `pprint`
        """
        return self.to_str()

    def __eq__(self, other):
        """
        Returns true if both objects are equal
        """
        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """
        Returns true if both objects are not equal
        """
        return not self == other
