# coding: utf-8

"""
    Spotii Billing API

    API for Billing  # noqa: E501

    OpenAPI spec version: v1.0
    Contact: hello@nuclearo.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six


class PaymentMethod(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 = {
        'payment_method_id': 'str',
        'plugin_properties': 'object',
        'plugin_details': 'str',
        'card_details': 'CardDetails',
        'external_key': 'str',
        'is_default': 'bool',
        'name': 'str',
        'plugin_name': 'str',
        'created_at': 'datetime',
        'updated_at': 'datetime',
        'billing_address': 'str'
    }

    attribute_map = {
        'payment_method_id': 'payment_method_id',
        'plugin_properties': 'plugin_properties',
        'plugin_details': 'plugin_details',
        'card_details': 'card_details',
        'external_key': 'external_key',
        'is_default': 'is_default',
        'name': 'name',
        'plugin_name': 'plugin_name',
        'created_at': 'created_at',
        'updated_at': 'updated_at',
        'billing_address': 'billing_address'
    }

    def __init__(self, payment_method_id=None, plugin_properties=None, plugin_details=None, card_details=None, external_key=None, is_default=None, name=None, plugin_name=None, created_at=None, updated_at=None, billing_address=None):  # noqa: E501
        """PaymentMethod - a model defined in Swagger"""  # noqa: E501
        self._payment_method_id = None
        self._plugin_properties = None
        self._plugin_details = None
        self._card_details = None
        self._external_key = None
        self._is_default = None
        self._name = None
        self._plugin_name = None
        self._created_at = None
        self._updated_at = None
        self._billing_address = None
        self.discriminator = None
        if payment_method_id is not None:
            self.payment_method_id = payment_method_id
        if plugin_properties is not None:
            self.plugin_properties = plugin_properties
        if plugin_details is not None:
            self.plugin_details = plugin_details
        self.card_details = card_details
        if external_key is not None:
            self.external_key = external_key
        if is_default is not None:
            self.is_default = is_default
        if name is not None:
            self.name = name
        self.plugin_name = plugin_name
        if created_at is not None:
            self.created_at = created_at
        if updated_at is not None:
            self.updated_at = updated_at
        if billing_address is not None:
            self.billing_address = billing_address

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


        :return: The payment_method_id of this PaymentMethod.  # noqa: E501
        :rtype: str
        """
        return self._payment_method_id

    @payment_method_id.setter
    def payment_method_id(self, payment_method_id):
        """Sets the payment_method_id of this PaymentMethod.


        :param payment_method_id: The payment_method_id of this PaymentMethod.  # noqa: E501
        :type: str
        """

        self._payment_method_id = payment_method_id

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


        :return: The plugin_properties of this PaymentMethod.  # noqa: E501
        :rtype: object
        """
        return self._plugin_properties

    @plugin_properties.setter
    def plugin_properties(self, plugin_properties):
        """Sets the plugin_properties of this PaymentMethod.


        :param plugin_properties: The plugin_properties of this PaymentMethod.  # noqa: E501
        :type: object
        """

        self._plugin_properties = plugin_properties

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


        :return: The plugin_details of this PaymentMethod.  # noqa: E501
        :rtype: str
        """
        return self._plugin_details

    @plugin_details.setter
    def plugin_details(self, plugin_details):
        """Sets the plugin_details of this PaymentMethod.


        :param plugin_details: The plugin_details of this PaymentMethod.  # noqa: E501
        :type: str
        """

        self._plugin_details = plugin_details

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


        :return: The card_details of this PaymentMethod.  # noqa: E501
        :rtype: CardDetails
        """
        return self._card_details

    @card_details.setter
    def card_details(self, card_details):
        """Sets the card_details of this PaymentMethod.


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

        self._card_details = card_details

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


        :return: The external_key of this PaymentMethod.  # noqa: E501
        :rtype: str
        """
        return self._external_key

    @external_key.setter
    def external_key(self, external_key):
        """Sets the external_key of this PaymentMethod.


        :param external_key: The external_key of this PaymentMethod.  # noqa: E501
        :type: str
        """

        self._external_key = external_key

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


        :return: The is_default of this PaymentMethod.  # noqa: E501
        :rtype: bool
        """
        return self._is_default

    @is_default.setter
    def is_default(self, is_default):
        """Sets the is_default of this PaymentMethod.


        :param is_default: The is_default of this PaymentMethod.  # noqa: E501
        :type: bool
        """

        self._is_default = is_default

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


        :return: The name of this PaymentMethod.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this PaymentMethod.


        :param name: The name of this PaymentMethod.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The plugin_name of this PaymentMethod.  # noqa: E501
        :rtype: str
        """
        return self._plugin_name

    @plugin_name.setter
    def plugin_name(self, plugin_name):
        """Sets the plugin_name of this PaymentMethod.


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

        self._plugin_name = plugin_name

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


        :return: The created_at of this PaymentMethod.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this PaymentMethod.


        :param created_at: The created_at of this PaymentMethod.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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


        :return: The updated_at of this PaymentMethod.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this PaymentMethod.


        :param updated_at: The updated_at of this PaymentMethod.  # noqa: E501
        :type: datetime
        """

        self._updated_at = updated_at

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


        :return: The billing_address of this PaymentMethod.  # noqa: E501
        :rtype: str
        """
        return self._billing_address

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


        :param billing_address: The billing_address of this PaymentMethod.  # noqa: E501
        :type: str
        """

        self._billing_address = billing_address

    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(PaymentMethod, 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, PaymentMethod):
            return False

        return self.__dict__ == other.__dict__

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