# coding: utf-8

"""
    Knetik Platform API Documentation latest 

    This is the spec for the Knetik API.  Use this in conjunction with the documentation found at https://knetikcloud.com.

    OpenAPI spec version: latest 
    Contact: support@knetik.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class ShippingItem(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 = {
        'countries': 'list[str]',
        'max_tier_total': 'int',
        'taxable': 'bool'
    }

    attribute_map = {
        'countries': 'countries',
        'max_tier_total': 'max_tier_total',
        'taxable': 'taxable'
    }

    def __init__(self, countries=None, max_tier_total=None, taxable=None):
        """
        ShippingItem - a model defined in Swagger
        """

        self._countries = None
        self._max_tier_total = None
        self._taxable = None
        self.discriminator = None

        if countries is not None:
          self.countries = countries
        self.max_tier_total = max_tier_total
        if taxable is not None:
          self.taxable = taxable

    @property
    def countries(self):
        """
        Gets the countries of this ShippingItem.
        A unique list of country iso3 codes that allow the shipping option

        :return: The countries of this ShippingItem.
        :rtype: list[str]
        """
        return self._countries

    @countries.setter
    def countries(self, countries):
        """
        Sets the countries of this ShippingItem.
        A unique list of country iso3 codes that allow the shipping option

        :param countries: The countries of this ShippingItem.
        :type: list[str]
        """

        self._countries = countries

    @property
    def max_tier_total(self):
        """
        Gets the max_tier_total of this ShippingItem.
        An abstract max value that the values of item's shipping_tier work against to decide whether an order can be fulfilled

        :return: The max_tier_total of this ShippingItem.
        :rtype: int
        """
        return self._max_tier_total

    @max_tier_total.setter
    def max_tier_total(self, max_tier_total):
        """
        Sets the max_tier_total of this ShippingItem.
        An abstract max value that the values of item's shipping_tier work against to decide whether an order can be fulfilled

        :param max_tier_total: The max_tier_total of this ShippingItem.
        :type: int
        """
        if max_tier_total is None:
            raise ValueError("Invalid value for `max_tier_total`, must not be `None`")

        self._max_tier_total = max_tier_total

    @property
    def taxable(self):
        """
        Gets the taxable of this ShippingItem.
        Whether tax should be applied to the shipping price.  Default = false

        :return: The taxable of this ShippingItem.
        :rtype: bool
        """
        return self._taxable

    @taxable.setter
    def taxable(self, taxable):
        """
        Sets the taxable of this ShippingItem.
        Whether tax should be applied to the shipping price.  Default = false

        :param taxable: The taxable of this ShippingItem.
        :type: bool
        """

        self._taxable = taxable

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

        return self.__dict__ == other.__dict__

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