# coding: utf-8

"""
    Listing 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 />Enables a seller adding an ad or item on a Partner's site to automatically create an eBay listing draft using the item details from the Partner's site.  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class Charity(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 = {
        'donation_percentage': 'str',
        'charity_id': 'str'
    }

    attribute_map = {
        'donation_percentage': 'donationPercentage',
        'charity_id': 'charityId'
    }

    def __init__(self, donation_percentage=None, charity_id=None):  # noqa: E501
        """Charity - a model defined in Swagger"""  # noqa: E501
        self._donation_percentage = None
        self._charity_id = None
        self.discriminator = None
        if donation_percentage is not None:
            self.donation_percentage = donation_percentage
        if charity_id is not None:
            self.charity_id = charity_id

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

        This field sets the percentage of the purchase price that the charitable organization (identified in the <strong>charityId</strong> field) will receive for each sale that the listing generates. This field is conditionally required if a seller is planning on donating a percentage of the sale proceeds to a charitable organization. This numeric value can range from 10 to 100, and in any 5 (percent) increments in between this range (e.g. <code>10</code>, <code>15</code>, <code>20</code>...<code>95</code>,... <code>100</code>). The seller would pass in <code>10</code> for 10 percent, <code>15</code> for 15 percent, <code>20</code> for 20 percent, and so on, all the way to <code>100</code> for 100 percent.<br /><br /><span class=\"tablenote\"><b>Note: </b> For this field, <strong>createItemDraft</strong> will only validate that a positive integer value is supplied, so the listing draft will still be successfully created (with no error or warning message) if a non-supported value is specified. However, if the seller attempted to publish this listing draft with an unsupported value, the charity information would just be dropped from the listing. </span>  # noqa: E501

        :return: The donation_percentage of this Charity.  # noqa: E501
        :rtype: str
        """
        return self._donation_percentage

    @donation_percentage.setter
    def donation_percentage(self, donation_percentage):
        """Sets the donation_percentage of this Charity.

        This field sets the percentage of the purchase price that the charitable organization (identified in the <strong>charityId</strong> field) will receive for each sale that the listing generates. This field is conditionally required if a seller is planning on donating a percentage of the sale proceeds to a charitable organization. This numeric value can range from 10 to 100, and in any 5 (percent) increments in between this range (e.g. <code>10</code>, <code>15</code>, <code>20</code>...<code>95</code>,... <code>100</code>). The seller would pass in <code>10</code> for 10 percent, <code>15</code> for 15 percent, <code>20</code> for 20 percent, and so on, all the way to <code>100</code> for 100 percent.<br /><br /><span class=\"tablenote\"><b>Note: </b> For this field, <strong>createItemDraft</strong> will only validate that a positive integer value is supplied, so the listing draft will still be successfully created (with no error or warning message) if a non-supported value is specified. However, if the seller attempted to publish this listing draft with an unsupported value, the charity information would just be dropped from the listing. </span>  # noqa: E501

        :param donation_percentage: The donation_percentage of this Charity.  # noqa: E501
        :type: str
        """

        self._donation_percentage = donation_percentage

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

        The eBay-assigned unique identifier of the charitable organization that will receive a percentage of the sales proceeds. The charitable organization must be reqistered with the PayPal Giving Fund in order to receive sales proceeds through eBay listings.<br/><br/> This field is conditionally required if a seller is planning on donating a percentage of the sale proceeds to a charitable organization. <br/><br/>The eBay-assigned unique identifier of a charitable organization can be found using the <strong>GetCharities</strong> call of the Trading API. In the <strong>GetCharities</strong> call response, this unique identifier is shown in the <strong>id</strong> attribute of the <strong>Charity</strong> container.  # noqa: E501

        :return: The charity_id of this Charity.  # noqa: E501
        :rtype: str
        """
        return self._charity_id

    @charity_id.setter
    def charity_id(self, charity_id):
        """Sets the charity_id of this Charity.

        The eBay-assigned unique identifier of the charitable organization that will receive a percentage of the sales proceeds. The charitable organization must be reqistered with the PayPal Giving Fund in order to receive sales proceeds through eBay listings.<br/><br/> This field is conditionally required if a seller is planning on donating a percentage of the sale proceeds to a charitable organization. <br/><br/>The eBay-assigned unique identifier of a charitable organization can be found using the <strong>GetCharities</strong> call of the Trading API. In the <strong>GetCharities</strong> call response, this unique identifier is shown in the <strong>id</strong> attribute of the <strong>Charity</strong> container.  # noqa: E501

        :param charity_id: The charity_id of this Charity.  # noqa: E501
        :type: str
        """

        self._charity_id = charity_id

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

        return self.__dict__ == other.__dict__

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