# coding: utf-8

"""
    StockX API

    PRERELEASE API - Subject to change before release. Provides access to StockX's public services, allowing end users to query for product and order information.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from io_stockx.models.address_object import AddressObject  # noqa: F401,E501


class BillingObject(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 = {
        'card_type': 'str',
        'token': 'str',
        'last4': 'str',
        'account_email': 'str',
        'expiration_date': 'str',
        'cardholder_name': 'str',
        'address': 'AddressObject'
    }

    attribute_map = {
        'card_type': 'cardType',
        'token': 'token',
        'last4': 'last4',
        'account_email': 'accountEmail',
        'expiration_date': 'expirationDate',
        'cardholder_name': 'cardholderName',
        'address': 'Address'
    }

    def __init__(self, card_type=None, token=None, last4=None, account_email=None, expiration_date=None, cardholder_name=None, address=None):  # noqa: E501
        """BillingObject - a model defined in Swagger"""  # noqa: E501

        self._card_type = None
        self._token = None
        self._last4 = None
        self._account_email = None
        self._expiration_date = None
        self._cardholder_name = None
        self._address = None
        self.discriminator = None

        if card_type is not None:
            self.card_type = card_type
        if token is not None:
            self.token = token
        if last4 is not None:
            self.last4 = last4
        if account_email is not None:
            self.account_email = account_email
        if expiration_date is not None:
            self.expiration_date = expiration_date
        if cardholder_name is not None:
            self.cardholder_name = cardholder_name
        if address is not None:
            self.address = address

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


        :return: The card_type of this BillingObject.  # noqa: E501
        :rtype: str
        """
        return self._card_type

    @card_type.setter
    def card_type(self, card_type):
        """Sets the card_type of this BillingObject.


        :param card_type: The card_type of this BillingObject.  # noqa: E501
        :type: str
        """

        self._card_type = card_type

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


        :return: The token of this BillingObject.  # noqa: E501
        :rtype: str
        """
        return self._token

    @token.setter
    def token(self, token):
        """Sets the token of this BillingObject.


        :param token: The token of this BillingObject.  # noqa: E501
        :type: str
        """

        self._token = token

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


        :return: The last4 of this BillingObject.  # noqa: E501
        :rtype: str
        """
        return self._last4

    @last4.setter
    def last4(self, last4):
        """Sets the last4 of this BillingObject.


        :param last4: The last4 of this BillingObject.  # noqa: E501
        :type: str
        """

        self._last4 = last4

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


        :return: The account_email of this BillingObject.  # noqa: E501
        :rtype: str
        """
        return self._account_email

    @account_email.setter
    def account_email(self, account_email):
        """Sets the account_email of this BillingObject.


        :param account_email: The account_email of this BillingObject.  # noqa: E501
        :type: str
        """

        self._account_email = account_email

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


        :return: The expiration_date of this BillingObject.  # noqa: E501
        :rtype: str
        """
        return self._expiration_date

    @expiration_date.setter
    def expiration_date(self, expiration_date):
        """Sets the expiration_date of this BillingObject.


        :param expiration_date: The expiration_date of this BillingObject.  # noqa: E501
        :type: str
        """

        self._expiration_date = expiration_date

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


        :return: The cardholder_name of this BillingObject.  # noqa: E501
        :rtype: str
        """
        return self._cardholder_name

    @cardholder_name.setter
    def cardholder_name(self, cardholder_name):
        """Sets the cardholder_name of this BillingObject.


        :param cardholder_name: The cardholder_name of this BillingObject.  # noqa: E501
        :type: str
        """

        self._cardholder_name = cardholder_name

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


        :return: The address of this BillingObject.  # noqa: E501
        :rtype: AddressObject
        """
        return self._address

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


        :param address: The address of this BillingObject.  # noqa: E501
        :type: AddressObject
        """

        self._address = 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

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

        return self.__dict__ == other.__dict__

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