# coding: utf-8

"""
    Metadata API

    The Metadata API has operations that retrieve configuration details pertaining to the different eBay marketplaces. In addition to marketplace information, the API also has operations that get information that helps sellers list items on eBay.  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class ShippingHandlingTime(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 = {
        'description': 'str',
        'extended_handling': 'bool',
        'max_handling_time': 'int'
    }

    attribute_map = {
        'description': 'description',
        'extended_handling': 'extendedHandling',
        'max_handling_time': 'maxHandlingTime'
    }

    def __init__(self, description=None, extended_handling=None, max_handling_time=None):  # noqa: E501
        """ShippingHandlingTime - a model defined in Swagger"""  # noqa: E501
        self._description = None
        self._extended_handling = None
        self._max_handling_time = None
        self.discriminator = None
        if description is not None:
            self.description = description
        if extended_handling is not None:
            self.extended_handling = extended_handling
        if max_handling_time is not None:
            self.max_handling_time = max_handling_time

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

        The localized description of the maximum handling time.  # noqa: E501

        :return: The description of this ShippingHandlingTime.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this ShippingHandlingTime.

        The localized description of the maximum handling time.  # noqa: E501

        :param description: The description of this ShippingHandlingTime.  # noqa: E501
        :type: str
        """

        self._description = description

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

        This field is only returned if its value is <code>true</code>. If returned, it indicates that the corresponding handling time is considered extended handling for the marketplace. Extended handling times may be used for freight shipping, but should generally be avoided if possible, as they might adversely affect the buying decisions of potential customers.  # noqa: E501

        :return: The extended_handling of this ShippingHandlingTime.  # noqa: E501
        :rtype: bool
        """
        return self._extended_handling

    @extended_handling.setter
    def extended_handling(self, extended_handling):
        """Sets the extended_handling of this ShippingHandlingTime.

        This field is only returned if its value is <code>true</code>. If returned, it indicates that the corresponding handling time is considered extended handling for the marketplace. Extended handling times may be used for freight shipping, but should generally be avoided if possible, as they might adversely affect the buying decisions of potential customers.  # noqa: E501

        :param extended_handling: The extended_handling of this ShippingHandlingTime.  # noqa: E501
        :type: bool
        """

        self._extended_handling = extended_handling

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

        The integer value returned in this field indicates the maximum number of business days that the eBay site allows as a seller's handling time measured from when the buyer pays for the order. For example,  if the <b>maxHandlingTime</b> value is set to 1 and  a buyer pays for the order on a Wednesday, the seller would have to ship the item by the next day (Thursday). <br><br>A <b>maxHandlingTime</b> value of <code>0</code> indicates same day handling for an item. In this case, the seller's handling time commitment depends on the order cut off time set in the seller's user preferences. This defaults to 2:00 PM local time on most eBay sites. For orders placed (and cleared payment received) before the local order cut off time, the item must be shipped by the end of the current day. For orders completed on or after the order cut off time, the item must be shipped by the end of the following day (excluding weekends and local holidays).  # noqa: E501

        :return: The max_handling_time of this ShippingHandlingTime.  # noqa: E501
        :rtype: int
        """
        return self._max_handling_time

    @max_handling_time.setter
    def max_handling_time(self, max_handling_time):
        """Sets the max_handling_time of this ShippingHandlingTime.

        The integer value returned in this field indicates the maximum number of business days that the eBay site allows as a seller's handling time measured from when the buyer pays for the order. For example,  if the <b>maxHandlingTime</b> value is set to 1 and  a buyer pays for the order on a Wednesday, the seller would have to ship the item by the next day (Thursday). <br><br>A <b>maxHandlingTime</b> value of <code>0</code> indicates same day handling for an item. In this case, the seller's handling time commitment depends on the order cut off time set in the seller's user preferences. This defaults to 2:00 PM local time on most eBay sites. For orders placed (and cleared payment received) before the local order cut off time, the item must be shipped by the end of the current day. For orders completed on or after the order cut off time, the item must be shipped by the end of the following day (excluding weekends and local holidays).  # noqa: E501

        :param max_handling_time: The max_handling_time of this ShippingHandlingTime.  # noqa: E501
        :type: int
        """

        self._max_handling_time = max_handling_time

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

        return self.__dict__ == other.__dict__

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