# coding: utf-8

"""
    Selling Partner APIs for Fulfillment Outbound

    The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.

    The version of the OpenAPI document: 2020-07-01
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class CODSettings(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 = {
        'is_cod_required': 'bool',
        'cod_charge': 'Money',
        'cod_charge_tax': 'Money',
        'shipping_charge': 'Money',
        'shipping_charge_tax': 'Money',
    }

    attribute_map = {
        'is_cod_required': 'isCodRequired',
        'cod_charge': 'codCharge',
        'cod_charge_tax': 'codChargeTax',
        'shipping_charge': 'shippingCharge',
        'shipping_charge_tax': 'shippingChargeTax',
    }

    def __init__(self, is_cod_required=None, cod_charge=None, cod_charge_tax=None, shipping_charge=None, shipping_charge_tax=None, _configuration=None):  # noqa: E501
        """CODSettings - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._is_cod_required = None
        self._cod_charge = None
        self._cod_charge_tax = None
        self._shipping_charge = None
        self._shipping_charge_tax = None
        self.discriminator = None

        self.is_cod_required = is_cod_required
        if cod_charge is not None:
            self.cod_charge = cod_charge
        if cod_charge_tax is not None:
            self.cod_charge_tax = cod_charge_tax
        if shipping_charge is not None:
            self.shipping_charge = shipping_charge
        if shipping_charge_tax is not None:
            self.shipping_charge_tax = shipping_charge_tax

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

        When true, this fulfillment order requires a COD (Cash On Delivery) payment.  # noqa: E501

        :return: The is_cod_required of this CODSettings.  # noqa: E501
        :rtype: bool
        """
        return self._is_cod_required

    @is_cod_required.setter
    def is_cod_required(self, is_cod_required):
        """Sets the is_cod_required of this CODSettings.

        When true, this fulfillment order requires a COD (Cash On Delivery) payment.  # noqa: E501

        :param is_cod_required: The is_cod_required of this CODSettings.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and is_cod_required is None:
            raise ValueError("Invalid value for `is_cod_required`, must not be `None`")  # noqa: E501

        self._is_cod_required = is_cod_required

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


        :return: The cod_charge of this CODSettings.  # noqa: E501
        :rtype: Money
        """
        return self._cod_charge

    @cod_charge.setter
    def cod_charge(self, cod_charge):
        """Sets the cod_charge of this CODSettings.


        :param cod_charge: The cod_charge of this CODSettings.  # noqa: E501
        :type: Money
        """

        self._cod_charge = cod_charge

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


        :return: The cod_charge_tax of this CODSettings.  # noqa: E501
        :rtype: Money
        """
        return self._cod_charge_tax

    @cod_charge_tax.setter
    def cod_charge_tax(self, cod_charge_tax):
        """Sets the cod_charge_tax of this CODSettings.


        :param cod_charge_tax: The cod_charge_tax of this CODSettings.  # noqa: E501
        :type: Money
        """

        self._cod_charge_tax = cod_charge_tax

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


        :return: The shipping_charge of this CODSettings.  # noqa: E501
        :rtype: Money
        """
        return self._shipping_charge

    @shipping_charge.setter
    def shipping_charge(self, shipping_charge):
        """Sets the shipping_charge of this CODSettings.


        :param shipping_charge: The shipping_charge of this CODSettings.  # noqa: E501
        :type: Money
        """

        self._shipping_charge = shipping_charge

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


        :return: The shipping_charge_tax of this CODSettings.  # noqa: E501
        :rtype: Money
        """
        return self._shipping_charge_tax

    @shipping_charge_tax.setter
    def shipping_charge_tax(self, shipping_charge_tax):
        """Sets the shipping_charge_tax of this CODSettings.


        :param shipping_charge_tax: The shipping_charge_tax of this CODSettings.  # noqa: E501
        :type: Money
        """

        self._shipping_charge_tax = shipping_charge_tax

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
