# coding: utf-8

"""
    Logistics API

    <span class=\"tablenote\"><b>Note:</b> This is a <a href=\"https://developer.ebay.com/api-docs/static/versioning.html#limited\" target=\"_blank\"> <img src=\"/cms/img/docs/partners-api.svg\" class=\"legend-icon partners-icon\" title=\"Limited Release\"  alt=\"Limited Release\" />(Limited Release)</a> API available only to select developers approved by business units.</span><br /><br />The <b>Logistics API</b> resources offer the following capabilities: <ul><li><b>shipping_quote</b> &ndash; Consolidates into a list a set of live shipping rates, or quotes, from which you can select a rate to ship a package.</li> <li><b>shipment</b> &ndash; Creates a \"shipment\" for the selected shipping rate.</li></ul> Call <b>createShippingQuote</b> to get a list of live shipping rates. The rates returned are all valid for a specific time window and all quoted prices are at eBay-negotiated rates. <br><br>Select one of the live rates and using its associated <b>rateId</b>, create a \"shipment\" for the package by calling <b>createFromShippingQuote</b>. Creating a shipment completes an agreement, and the cost of the base service and any added shipping options are summed into the returned <b>totalShippingCost</b> value. This action also generates a shipping label that you can use to ship the package.  The total cost of the shipment is incurred when the package is shipped using the supplied shipping label.  <p class=\"tablenote\"><b>Important!</b> Sellers must set up a payment method via their eBay account before they can use the methods in this API to create a shipment and the associated shipping label.</p>  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class PurchasedRate(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 = {
        'additional_options': 'list[AdditionalOption]',
        'base_shipping_cost': 'Amount',
        'destination_time_zone': 'str',
        'max_estimated_delivery_date': 'str',
        'min_estimated_delivery_date': 'str',
        'pickup_networks': 'list[str]',
        'pickup_slot_id': 'str',
        'pickup_type': 'str',
        'rate_id': 'str',
        'shipping_carrier_code': 'str',
        'shipping_carrier_name': 'str',
        'shipping_quote_id': 'str',
        'shipping_service_code': 'str',
        'shipping_service_name': 'str',
        'total_shipping_cost': 'Amount'
    }

    attribute_map = {
        'additional_options': 'additionalOptions',
        'base_shipping_cost': 'baseShippingCost',
        'destination_time_zone': 'destinationTimeZone',
        'max_estimated_delivery_date': 'maxEstimatedDeliveryDate',
        'min_estimated_delivery_date': 'minEstimatedDeliveryDate',
        'pickup_networks': 'pickupNetworks',
        'pickup_slot_id': 'pickupSlotId',
        'pickup_type': 'pickupType',
        'rate_id': 'rateId',
        'shipping_carrier_code': 'shippingCarrierCode',
        'shipping_carrier_name': 'shippingCarrierName',
        'shipping_quote_id': 'shippingQuoteId',
        'shipping_service_code': 'shippingServiceCode',
        'shipping_service_name': 'shippingServiceName',
        'total_shipping_cost': 'totalShippingCost'
    }

    def __init__(self, additional_options=None, base_shipping_cost=None, destination_time_zone=None, max_estimated_delivery_date=None, min_estimated_delivery_date=None, pickup_networks=None, pickup_slot_id=None, pickup_type=None, rate_id=None, shipping_carrier_code=None, shipping_carrier_name=None, shipping_quote_id=None, shipping_service_code=None, shipping_service_name=None, total_shipping_cost=None):  # noqa: E501
        """PurchasedRate - a model defined in Swagger"""  # noqa: E501
        self._additional_options = None
        self._base_shipping_cost = None
        self._destination_time_zone = None
        self._max_estimated_delivery_date = None
        self._min_estimated_delivery_date = None
        self._pickup_networks = None
        self._pickup_slot_id = None
        self._pickup_type = None
        self._rate_id = None
        self._shipping_carrier_code = None
        self._shipping_carrier_name = None
        self._shipping_quote_id = None
        self._shipping_service_code = None
        self._shipping_service_name = None
        self._total_shipping_cost = None
        self.discriminator = None
        if additional_options is not None:
            self.additional_options = additional_options
        if base_shipping_cost is not None:
            self.base_shipping_cost = base_shipping_cost
        if destination_time_zone is not None:
            self.destination_time_zone = destination_time_zone
        if max_estimated_delivery_date is not None:
            self.max_estimated_delivery_date = max_estimated_delivery_date
        if min_estimated_delivery_date is not None:
            self.min_estimated_delivery_date = min_estimated_delivery_date
        if pickup_networks is not None:
            self.pickup_networks = pickup_networks
        if pickup_slot_id is not None:
            self.pickup_slot_id = pickup_slot_id
        if pickup_type is not None:
            self.pickup_type = pickup_type
        if rate_id is not None:
            self.rate_id = rate_id
        if shipping_carrier_code is not None:
            self.shipping_carrier_code = shipping_carrier_code
        if shipping_carrier_name is not None:
            self.shipping_carrier_name = shipping_carrier_name
        if shipping_quote_id is not None:
            self.shipping_quote_id = shipping_quote_id
        if shipping_service_code is not None:
            self.shipping_service_code = shipping_service_code
        if shipping_service_name is not None:
            self.shipping_service_name = shipping_service_name
        if total_shipping_cost is not None:
            self.total_shipping_cost = total_shipping_cost

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

        An list of additional, optional features that have been purchased for the shipment.  # noqa: E501

        :return: The additional_options of this PurchasedRate.  # noqa: E501
        :rtype: list[AdditionalOption]
        """
        return self._additional_options

    @additional_options.setter
    def additional_options(self, additional_options):
        """Sets the additional_options of this PurchasedRate.

        An list of additional, optional features that have been purchased for the shipment.  # noqa: E501

        :param additional_options: The additional_options of this PurchasedRate.  # noqa: E501
        :type: list[AdditionalOption]
        """

        self._additional_options = additional_options

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


        :return: The base_shipping_cost of this PurchasedRate.  # noqa: E501
        :rtype: Amount
        """
        return self._base_shipping_cost

    @base_shipping_cost.setter
    def base_shipping_cost(self, base_shipping_cost):
        """Sets the base_shipping_cost of this PurchasedRate.


        :param base_shipping_cost: The base_shipping_cost of this PurchasedRate.  # noqa: E501
        :type: Amount
        """

        self._base_shipping_cost = base_shipping_cost

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

        The time zone of the destination according to <a href=\"https://www.iana.org/time-zones\" target=\"_blank\">Time Zone Database</a>. For example, \"America/Los_Angeles\".  # noqa: E501

        :return: The destination_time_zone of this PurchasedRate.  # noqa: E501
        :rtype: str
        """
        return self._destination_time_zone

    @destination_time_zone.setter
    def destination_time_zone(self, destination_time_zone):
        """Sets the destination_time_zone of this PurchasedRate.

        The time zone of the destination according to <a href=\"https://www.iana.org/time-zones\" target=\"_blank\">Time Zone Database</a>. For example, \"America/Los_Angeles\".  # noqa: E501

        :param destination_time_zone: The destination_time_zone of this PurchasedRate.  # noqa: E501
        :type: str
        """

        self._destination_time_zone = destination_time_zone

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

        A string value representing maximum (latest) estimated delivery time, formatted as an <a href=\"https://www.iso.org/iso-8601-date-and-time-format.html\" title=\"https://www.iso.org\" target=\"_blank\">ISO 8601</a> string, which is based on the 24-hour Coordinated Universal Time (UTC) clock.  <br><br><b>Format:</b> <code>[YYYY]-[MM]-[DD]T[HH]:[MM]:[SS].[SSS]Z</code> <br><b>Example:</b> <code>2018-08-20T07:09:00.000Z</code>  # noqa: E501

        :return: The max_estimated_delivery_date of this PurchasedRate.  # noqa: E501
        :rtype: str
        """
        return self._max_estimated_delivery_date

    @max_estimated_delivery_date.setter
    def max_estimated_delivery_date(self, max_estimated_delivery_date):
        """Sets the max_estimated_delivery_date of this PurchasedRate.

        A string value representing maximum (latest) estimated delivery time, formatted as an <a href=\"https://www.iso.org/iso-8601-date-and-time-format.html\" title=\"https://www.iso.org\" target=\"_blank\">ISO 8601</a> string, which is based on the 24-hour Coordinated Universal Time (UTC) clock.  <br><br><b>Format:</b> <code>[YYYY]-[MM]-[DD]T[HH]:[MM]:[SS].[SSS]Z</code> <br><b>Example:</b> <code>2018-08-20T07:09:00.000Z</code>  # noqa: E501

        :param max_estimated_delivery_date: The max_estimated_delivery_date of this PurchasedRate.  # noqa: E501
        :type: str
        """

        self._max_estimated_delivery_date = max_estimated_delivery_date

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

        A string value representing minimum (earliest) estimated delivery time, formatted as an <a href=\"https://www.iso.org/iso-8601-date-and-time-format.html\" title=\"https://www.iso.org\" target=\"_blank\">ISO 8601</a>ISO 8601</a> UTC string.  # noqa: E501

        :return: The min_estimated_delivery_date of this PurchasedRate.  # noqa: E501
        :rtype: str
        """
        return self._min_estimated_delivery_date

    @min_estimated_delivery_date.setter
    def min_estimated_delivery_date(self, min_estimated_delivery_date):
        """Sets the min_estimated_delivery_date of this PurchasedRate.

        A string value representing minimum (earliest) estimated delivery time, formatted as an <a href=\"https://www.iso.org/iso-8601-date-and-time-format.html\" title=\"https://www.iso.org\" target=\"_blank\">ISO 8601</a>ISO 8601</a> UTC string.  # noqa: E501

        :param min_estimated_delivery_date: The min_estimated_delivery_date of this PurchasedRate.  # noqa: E501
        :type: str
        """

        self._min_estimated_delivery_date = min_estimated_delivery_date

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

        A list of pickup networks compatible with the shipping service.  # noqa: E501

        :return: The pickup_networks of this PurchasedRate.  # noqa: E501
        :rtype: list[str]
        """
        return self._pickup_networks

    @pickup_networks.setter
    def pickup_networks(self, pickup_networks):
        """Sets the pickup_networks of this PurchasedRate.

        A list of pickup networks compatible with the shipping service.  # noqa: E501

        :param pickup_networks: The pickup_networks of this PurchasedRate.  # noqa: E501
        :type: list[str]
        """

        self._pickup_networks = pickup_networks

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

        This unique eBay-assigned ID value is returned only if the shipment has been configured for a scheduled pickup.  # noqa: E501

        :return: The pickup_slot_id of this PurchasedRate.  # noqa: E501
        :rtype: str
        """
        return self._pickup_slot_id

    @pickup_slot_id.setter
    def pickup_slot_id(self, pickup_slot_id):
        """Sets the pickup_slot_id of this PurchasedRate.

        This unique eBay-assigned ID value is returned only if the shipment has been configured for a scheduled pickup.  # noqa: E501

        :param pickup_slot_id: The pickup_slot_id of this PurchasedRate.  # noqa: E501
        :type: str
        """

        self._pickup_slot_id = pickup_slot_id

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

        The type of pickup or drop off configured for the shipment. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/logistics/types/api:PickupTypeEnum'>eBay API documentation</a>  # noqa: E501

        :return: The pickup_type of this PurchasedRate.  # noqa: E501
        :rtype: str
        """
        return self._pickup_type

    @pickup_type.setter
    def pickup_type(self, pickup_type):
        """Sets the pickup_type of this PurchasedRate.

        The type of pickup or drop off configured for the shipment. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/logistics/types/api:PickupTypeEnum'>eBay API documentation</a>  # noqa: E501

        :param pickup_type: The pickup_type of this PurchasedRate.  # noqa: E501
        :type: str
        """

        self._pickup_type = pickup_type

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

        The eBay-generated ID of the shipping rate that the seller has chosen to purchase for the shipment.  # noqa: E501

        :return: The rate_id of this PurchasedRate.  # noqa: E501
        :rtype: str
        """
        return self._rate_id

    @rate_id.setter
    def rate_id(self, rate_id):
        """Sets the rate_id of this PurchasedRate.

        The eBay-generated ID of the shipping rate that the seller has chosen to purchase for the shipment.  # noqa: E501

        :param rate_id: The rate_id of this PurchasedRate.  # noqa: E501
        :type: str
        """

        self._rate_id = rate_id

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

        The ID code for the carrier that was selected for the package shipment.  # noqa: E501

        :return: The shipping_carrier_code of this PurchasedRate.  # noqa: E501
        :rtype: str
        """
        return self._shipping_carrier_code

    @shipping_carrier_code.setter
    def shipping_carrier_code(self, shipping_carrier_code):
        """Sets the shipping_carrier_code of this PurchasedRate.

        The ID code for the carrier that was selected for the package shipment.  # noqa: E501

        :param shipping_carrier_code: The shipping_carrier_code of this PurchasedRate.  # noqa: E501
        :type: str
        """

        self._shipping_carrier_code = shipping_carrier_code

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

        The name of the shipping carrier.  # noqa: E501

        :return: The shipping_carrier_name of this PurchasedRate.  # noqa: E501
        :rtype: str
        """
        return self._shipping_carrier_name

    @shipping_carrier_name.setter
    def shipping_carrier_name(self, shipping_carrier_name):
        """Sets the shipping_carrier_name of this PurchasedRate.

        The name of the shipping carrier.  # noqa: E501

        :param shipping_carrier_name: The shipping_carrier_name of this PurchasedRate.  # noqa: E501
        :type: str
        """

        self._shipping_carrier_name = shipping_carrier_name

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

        The unique eBay-generated ID of the <i>shipping quote</i> from which the seller selected a shipping rate (<b>rateId</b>).  # noqa: E501

        :return: The shipping_quote_id of this PurchasedRate.  # noqa: E501
        :rtype: str
        """
        return self._shipping_quote_id

    @shipping_quote_id.setter
    def shipping_quote_id(self, shipping_quote_id):
        """Sets the shipping_quote_id of this PurchasedRate.

        The unique eBay-generated ID of the <i>shipping quote</i> from which the seller selected a shipping rate (<b>rateId</b>).  # noqa: E501

        :param shipping_quote_id: The shipping_quote_id of this PurchasedRate.  # noqa: E501
        :type: str
        """

        self._shipping_quote_id = shipping_quote_id

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

        String ID code for the shipping service selected for the package shipment. This is a service that the shipping carrier supplies.  # noqa: E501

        :return: The shipping_service_code of this PurchasedRate.  # noqa: E501
        :rtype: str
        """
        return self._shipping_service_code

    @shipping_service_code.setter
    def shipping_service_code(self, shipping_service_code):
        """Sets the shipping_service_code of this PurchasedRate.

        String ID code for the shipping service selected for the package shipment. This is a service that the shipping carrier supplies.  # noqa: E501

        :param shipping_service_code: The shipping_service_code of this PurchasedRate.  # noqa: E501
        :type: str
        """

        self._shipping_service_code = shipping_service_code

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

        The name of the shipping service.  # noqa: E501

        :return: The shipping_service_name of this PurchasedRate.  # noqa: E501
        :rtype: str
        """
        return self._shipping_service_name

    @shipping_service_name.setter
    def shipping_service_name(self, shipping_service_name):
        """Sets the shipping_service_name of this PurchasedRate.

        The name of the shipping service.  # noqa: E501

        :param shipping_service_name: The shipping_service_name of this PurchasedRate.  # noqa: E501
        :type: str
        """

        self._shipping_service_name = shipping_service_name

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


        :return: The total_shipping_cost of this PurchasedRate.  # noqa: E501
        :rtype: Amount
        """
        return self._total_shipping_cost

    @total_shipping_cost.setter
    def total_shipping_cost(self, total_shipping_cost):
        """Sets the total_shipping_cost of this PurchasedRate.


        :param total_shipping_cost: The total_shipping_cost of this PurchasedRate.  # noqa: E501
        :type: Amount
        """

        self._total_shipping_cost = total_shipping_cost

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

        return self.__dict__ == other.__dict__

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