# coding: utf-8

"""
    UltraCart Rest API V2

    UltraCart REST API Version 2

    OpenAPI spec version: 2.0.0
    Contact: <EMAIL>
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class OrderCoupon(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 = {
        'accounting_code': 'str',
        'base_coupon_code': 'str',
        'coupon_code': 'str'
    }

    attribute_map = {
        'accounting_code': 'accounting_code',
        'base_coupon_code': 'base_coupon_code',
        'coupon_code': 'coupon_code'
    }

    def __init__(self, accounting_code=None, base_coupon_code=None, coupon_code=None):
        """
        OrderCoupon - a model defined in Swagger
        """

        self._accounting_code = None
        self._base_coupon_code = None
        self._coupon_code = None
        self.discriminator = None

        if accounting_code is not None:
          self.accounting_code = accounting_code
        if base_coupon_code is not None:
          self.base_coupon_code = base_coupon_code
        if coupon_code is not None:
          self.coupon_code = coupon_code

    @property
    def accounting_code(self):
        """
        Gets the accounting_code of this OrderCoupon.
        QuickBooks accounting code for this coupon

        :return: The accounting_code of this OrderCoupon.
        :rtype: str
        """
        return self._accounting_code

    @accounting_code.setter
    def accounting_code(self, accounting_code):
        """
        Sets the accounting_code of this OrderCoupon.
        QuickBooks accounting code for this coupon

        :param accounting_code: The accounting_code of this OrderCoupon.
        :type: str
        """

        self._accounting_code = accounting_code

    @property
    def base_coupon_code(self):
        """
        Gets the base_coupon_code of this OrderCoupon.
        Coupon code configured by the merchant.  Will differ if the customer used a one time coupon code generated off this base coupon

        :return: The base_coupon_code of this OrderCoupon.
        :rtype: str
        """
        return self._base_coupon_code

    @base_coupon_code.setter
    def base_coupon_code(self, base_coupon_code):
        """
        Sets the base_coupon_code of this OrderCoupon.
        Coupon code configured by the merchant.  Will differ if the customer used a one time coupon code generated off this base coupon

        :param base_coupon_code: The base_coupon_code of this OrderCoupon.
        :type: str
        """
        if base_coupon_code is not None and len(base_coupon_code) > 20:
            raise ValueError("Invalid value for `base_coupon_code`, length must be less than or equal to `20`")

        self._base_coupon_code = base_coupon_code

    @property
    def coupon_code(self):
        """
        Gets the coupon_code of this OrderCoupon.
        Coupon code entered by the customer

        :return: The coupon_code of this OrderCoupon.
        :rtype: str
        """
        return self._coupon_code

    @coupon_code.setter
    def coupon_code(self, coupon_code):
        """
        Sets the coupon_code of this OrderCoupon.
        Coupon code entered by the customer

        :param coupon_code: The coupon_code of this OrderCoupon.
        :type: str
        """
        if coupon_code is not None and len(coupon_code) > 20:
            raise ValueError("Invalid value for `coupon_code`, length must be less than or equal to `20`")

        self._coupon_code = coupon_code

    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
        """
        if not isinstance(other, OrderCoupon):
            return False

        return self.__dict__ == other.__dict__

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

# coding: utf-8

"""
    UltraCart Rest API V2

    UltraCart REST API Version 2

    OpenAPI spec version: 2.0.0
    Contact: <EMAIL>
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class OrderCoupon(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 = {
        'accounting_code': 'str',
        'base_coupon_code': 'str',
        'coupon_code': 'str'
    }

    attribute_map = {
        'accounting_code': 'accounting_code',
        'base_coupon_code': 'base_coupon_code',
        'coupon_code': 'coupon_code'
    }

    def __init__(self, accounting_code=None, base_coupon_code=None, coupon_code=None):
        """
        OrderCoupon - a model defined in Swagger
        """

        self._accounting_code = None
        self._base_coupon_code = None
        self._coupon_code = None
        self.discriminator = None

        if accounting_code is not None:
          self.accounting_code = accounting_code
        if base_coupon_code is not None:
          self.base_coupon_code = base_coupon_code
        if coupon_code is not None:
          self.coupon_code = coupon_code

    @property
    def accounting_code(self):
        """
        Gets the accounting_code of this OrderCoupon.
        QuickBooks accounting code for this coupon

        :return: The accounting_code of this OrderCoupon.
        :rtype: str
        """
        return self._accounting_code

    @accounting_code.setter
    def accounting_code(self, accounting_code):
        """
        Sets the accounting_code of this OrderCoupon.
        QuickBooks accounting code for this coupon

        :param accounting_code: The accounting_code of this OrderCoupon.
        :type: str
        """

        self._accounting_code = accounting_code

    @property
    def base_coupon_code(self):
        """
        Gets the base_coupon_code of this OrderCoupon.
        Coupon code configured by the merchant.  Will differ if the customer used a one time coupon code generated off this base coupon

        :return: The base_coupon_code of this OrderCoupon.
        :rtype: str
        """
        return self._base_coupon_code

    @base_coupon_code.setter
    def base_coupon_code(self, base_coupon_code):
        """
        Sets the base_coupon_code of this OrderCoupon.
        Coupon code configured by the merchant.  Will differ if the customer used a one time coupon code generated off this base coupon

        :param base_coupon_code: The base_coupon_code of this OrderCoupon.
        :type: str
        """
        if base_coupon_code is not None and len(base_coupon_code) > 20:
            raise ValueError("Invalid value for `base_coupon_code`, length must be less than or equal to `20`")

        self._base_coupon_code = base_coupon_code

    @property
    def coupon_code(self):
        """
        Gets the coupon_code of this OrderCoupon.
        Coupon code entered by the customer

        :return: The coupon_code of this OrderCoupon.
        :rtype: str
        """
        return self._coupon_code

    @coupon_code.setter
    def coupon_code(self, coupon_code):
        """
        Sets the coupon_code of this OrderCoupon.
        Coupon code entered by the customer

        :param coupon_code: The coupon_code of this OrderCoupon.
        :type: str
        """
        if coupon_code is not None and len(coupon_code) > 20:
            raise ValueError("Invalid value for `coupon_code`, length must be less than or equal to `20`")

        self._coupon_code = coupon_code

    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
        """
        if not isinstance(other, OrderCoupon):
            return False

        return self.__dict__ == other.__dict__

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

# coding: utf-8 UltraCart Rest API V2      UltraCart REST API Version 2      OpenAPI spec version: 2.0.0     Contact: <EMAIL>     Generated by: https://github.com/swagger-api/swagger-codegen.git 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. OrderCoupon - a model defined in Swagger Gets the accounting_code of this OrderCoupon.         QuickBooks accounting code for this coupon          :return: The accounting_code of this OrderCoupon.         :rtype: str Sets the accounting_code of this OrderCoupon.         QuickBooks accounting code for this coupon          :param accounting_code: The accounting_code of this OrderCoupon.         :type: str Gets the base_coupon_code of this OrderCoupon.         Coupon code configured by the merchant.  Will differ if the customer used a one time coupon code generated off this base coupon          :return: The base_coupon_code of this OrderCoupon.         :rtype: str Sets the base_coupon_code of this OrderCoupon.         Coupon code configured by the merchant.  Will differ if the customer used a one time coupon code generated off this base coupon          :param base_coupon_code: The base_coupon_code of this OrderCoupon.         :type: str Gets the coupon_code of this OrderCoupon.         Coupon code entered by the customer          :return: The coupon_code of this OrderCoupon.         :rtype: str Sets the coupon_code of this OrderCoupon.         Coupon code entered by the customer          :param coupon_code: The coupon_code of this OrderCoupon.         :type: str Returns the model properties as a dict Returns the string representation of the model For `print` and `pprint` Returns true if both objects are equal Returns true if both objects are not equal