# coding: utf-8

"""
    Lotus API

    Lotus is an open-core pricing and billing engine. We enable API companies to automate and optimize their custom usage-based pricing for any metric.  # noqa: E501

    OpenAPI spec version: 0.9.3
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class CustomerCreateRequest(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'customer_name': 'str',
        'customer_id': 'str',
        'email': 'str',
        'payment_provider': 'str',
        'payment_provider_id': 'str',
        'properties': 'dict(str, object)',
        'default_currency_code': 'str',
        'address': 'AllOfCustomerCreateRequestAddress',
        'billing_address': 'AllOfCustomerCreateRequestBillingAddress',
        'shipping_address': 'AllOfCustomerCreateRequestShippingAddress',
        'tax_rate': 'float'
    }

    attribute_map = {
        'customer_name': 'customer_name',
        'customer_id': 'customer_id',
        'email': 'email',
        'payment_provider': 'payment_provider',
        'payment_provider_id': 'payment_provider_id',
        'properties': 'properties',
        'default_currency_code': 'default_currency_code',
        'address': 'address',
        'billing_address': 'billing_address',
        'shipping_address': 'shipping_address',
        'tax_rate': 'tax_rate'
    }

    def __init__(self, customer_name=None, customer_id=None, email=None, payment_provider=None, payment_provider_id=None, properties=None, default_currency_code=None, address=None, billing_address=None, shipping_address=None, tax_rate=None):  # noqa: E501
        """CustomerCreateRequest - a model defined in Swagger"""  # noqa: E501
        self._customer_name = None
        self._customer_id = None
        self._email = None
        self._payment_provider = None
        self._payment_provider_id = None
        self._properties = None
        self._default_currency_code = None
        self._address = None
        self._billing_address = None
        self._shipping_address = None
        self._tax_rate = None
        self.discriminator = None
        if customer_name is not None:
            self.customer_name = customer_name
        self.customer_id = customer_id
        self.email = email
        if payment_provider is not None:
            self.payment_provider = payment_provider
        if payment_provider_id is not None:
            self.payment_provider_id = payment_provider_id
        if properties is not None:
            self.properties = properties
        if default_currency_code is not None:
            self.default_currency_code = default_currency_code
        if address is not None:
            self.address = address
        if billing_address is not None:
            self.billing_address = billing_address
        if shipping_address is not None:
            self.shipping_address = shipping_address
        if tax_rate is not None:
            self.tax_rate = tax_rate

    @property
    def customer_name(self):
        """Gets the customer_name of this CustomerCreateRequest.  # noqa: E501

        The display name of the customer  # noqa: E501

        :return: The customer_name of this CustomerCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._customer_name

    @customer_name.setter
    def customer_name(self, customer_name):
        """Sets the customer_name of this CustomerCreateRequest.

        The display name of the customer  # noqa: E501

        :param customer_name: The customer_name of this CustomerCreateRequest.  # noqa: E501
        :type: str
        """

        self._customer_name = customer_name

    @property
    def customer_id(self):
        """Gets the customer_id of this CustomerCreateRequest.  # noqa: E501

        The id provided when creating the customer, we suggest matching with your internal customer id in your backend  # noqa: E501

        :return: The customer_id of this CustomerCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._customer_id

    @customer_id.setter
    def customer_id(self, customer_id):
        """Sets the customer_id of this CustomerCreateRequest.

        The id provided when creating the customer, we suggest matching with your internal customer id in your backend  # noqa: E501

        :param customer_id: The customer_id of this CustomerCreateRequest.  # noqa: E501
        :type: str
        """
        if customer_id is None:
            raise ValueError("Invalid value for `customer_id`, must not be `None`")  # noqa: E501

        self._customer_id = customer_id

    @property
    def email(self):
        """Gets the email of this CustomerCreateRequest.  # noqa: E501

        The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider  # noqa: E501

        :return: The email of this CustomerCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._email

    @email.setter
    def email(self, email):
        """Sets the email of this CustomerCreateRequest.

        The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider  # noqa: E501

        :param email: The email of this CustomerCreateRequest.  # noqa: E501
        :type: str
        """
        if email is None:
            raise ValueError("Invalid value for `email`, must not be `None`")  # noqa: E501

        self._email = email

    @property
    def payment_provider(self):
        """Gets the payment_provider of this CustomerCreateRequest.  # noqa: E501

        The payment provider this customer is associated with. Currently, only Stripe is supported.  * `stripe` - Stripe * `braintree` - Braintree  # noqa: E501

        :return: The payment_provider of this CustomerCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._payment_provider

    @payment_provider.setter
    def payment_provider(self, payment_provider):
        """Sets the payment_provider of this CustomerCreateRequest.

        The payment provider this customer is associated with. Currently, only Stripe is supported.  * `stripe` - Stripe * `braintree` - Braintree  # noqa: E501

        :param payment_provider: The payment_provider of this CustomerCreateRequest.  # noqa: E501
        :type: str
        """
        allowed_values = ["stripe", "braintree"]  # noqa: E501
        if payment_provider not in allowed_values:
            raise ValueError(
                "Invalid value for `payment_provider` ({0}), must be one of {1}"  # noqa: E501
                .format(payment_provider, allowed_values)
            )

        self._payment_provider = payment_provider

    @property
    def payment_provider_id(self):
        """Gets the payment_provider_id of this CustomerCreateRequest.  # noqa: E501

        The customer's ID in the specified payment provider. Please note that payment_provider and payment_provider_id are mutually necessary.  # noqa: E501

        :return: The payment_provider_id of this CustomerCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._payment_provider_id

    @payment_provider_id.setter
    def payment_provider_id(self, payment_provider_id):
        """Sets the payment_provider_id of this CustomerCreateRequest.

        The customer's ID in the specified payment provider. Please note that payment_provider and payment_provider_id are mutually necessary.  # noqa: E501

        :param payment_provider_id: The payment_provider_id of this CustomerCreateRequest.  # noqa: E501
        :type: str
        """

        self._payment_provider_id = payment_provider_id

    @property
    def properties(self):
        """Gets the properties of this CustomerCreateRequest.  # noqa: E501

        Extra metadata for the customer  # noqa: E501

        :return: The properties of this CustomerCreateRequest.  # noqa: E501
        :rtype: dict(str, object)
        """
        return self._properties

    @properties.setter
    def properties(self, properties):
        """Sets the properties of this CustomerCreateRequest.

        Extra metadata for the customer  # noqa: E501

        :param properties: The properties of this CustomerCreateRequest.  # noqa: E501
        :type: dict(str, object)
        """

        self._properties = properties

    @property
    def default_currency_code(self):
        """Gets the default_currency_code of this CustomerCreateRequest.  # noqa: E501

        The currency code this customer will be invoiced in. Codes are 3 letters, e.g. 'USD'.  # noqa: E501

        :return: The default_currency_code of this CustomerCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._default_currency_code

    @default_currency_code.setter
    def default_currency_code(self, default_currency_code):
        """Sets the default_currency_code of this CustomerCreateRequest.

        The currency code this customer will be invoiced in. Codes are 3 letters, e.g. 'USD'.  # noqa: E501

        :param default_currency_code: The default_currency_code of this CustomerCreateRequest.  # noqa: E501
        :type: str
        """

        self._default_currency_code = default_currency_code

    @property
    def address(self):
        """Gets the address of this CustomerCreateRequest.  # noqa: E501


        :return: The address of this CustomerCreateRequest.  # noqa: E501
        :rtype: AllOfCustomerCreateRequestAddress
        """
        return self._address

    @address.setter
    def address(self, address):
        """Sets the address of this CustomerCreateRequest.


        :param address: The address of this CustomerCreateRequest.  # noqa: E501
        :type: AllOfCustomerCreateRequestAddress
        """

        self._address = address

    @property
    def billing_address(self):
        """Gets the billing_address of this CustomerCreateRequest.  # noqa: E501


        :return: The billing_address of this CustomerCreateRequest.  # noqa: E501
        :rtype: AllOfCustomerCreateRequestBillingAddress
        """
        return self._billing_address

    @billing_address.setter
    def billing_address(self, billing_address):
        """Sets the billing_address of this CustomerCreateRequest.


        :param billing_address: The billing_address of this CustomerCreateRequest.  # noqa: E501
        :type: AllOfCustomerCreateRequestBillingAddress
        """

        self._billing_address = billing_address

    @property
    def shipping_address(self):
        """Gets the shipping_address of this CustomerCreateRequest.  # noqa: E501


        :return: The shipping_address of this CustomerCreateRequest.  # noqa: E501
        :rtype: AllOfCustomerCreateRequestShippingAddress
        """
        return self._shipping_address

    @shipping_address.setter
    def shipping_address(self, shipping_address):
        """Sets the shipping_address of this CustomerCreateRequest.


        :param shipping_address: The shipping_address of this CustomerCreateRequest.  # noqa: E501
        :type: AllOfCustomerCreateRequestShippingAddress
        """

        self._shipping_address = shipping_address

    @property
    def tax_rate(self):
        """Gets the tax_rate of this CustomerCreateRequest.  # noqa: E501

        Tax rate as percentage. For example, 10.5 for 10.5%  # noqa: E501

        :return: The tax_rate of this CustomerCreateRequest.  # noqa: E501
        :rtype: float
        """
        return self._tax_rate

    @tax_rate.setter
    def tax_rate(self, tax_rate):
        """Sets the tax_rate of this CustomerCreateRequest.

        Tax rate as percentage. For example, 10.5 for 10.5%  # noqa: E501

        :param tax_rate: The tax_rate of this CustomerCreateRequest.  # noqa: E501
        :type: float
        """

        self._tax_rate = tax_rate

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

        for attr, _ in six.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
        if issubclass(CustomerCreateRequest, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.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"""
        if not isinstance(other, CustomerCreateRequest):
            return False

        return self.__dict__ == other.__dict__

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