# coding: utf-8

"""
Copyright 2017 Square, Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""


from pprint import pformat
from six import iteritems
import re


class AdditionalRecipientReceivableRefund(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, id=None, receivable_id=None, refund_id=None, transaction_location_id=None, amount_money=None, created_at=None):
        """
        AdditionalRecipientReceivableRefund - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'id': 'str',
            'receivable_id': 'str',
            'refund_id': 'str',
            'transaction_location_id': 'str',
            'amount_money': 'Money',
            'created_at': 'str'
        }

        self.attribute_map = {
            'id': 'id',
            'receivable_id': 'receivable_id',
            'refund_id': 'refund_id',
            'transaction_location_id': 'transaction_location_id',
            'amount_money': 'amount_money',
            'created_at': 'created_at'
        }

        self._id = id
        self._receivable_id = receivable_id
        self._refund_id = refund_id
        self._transaction_location_id = transaction_location_id
        self._amount_money = amount_money
        self._created_at = created_at

    @property
    def id(self):
        """
        Gets the id of this AdditionalRecipientReceivableRefund.
        The receivable refund's unique ID, issued by Square payments servers.

        :return: The id of this AdditionalRecipientReceivableRefund.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this AdditionalRecipientReceivableRefund.
        The receivable refund's unique ID, issued by Square payments servers.

        :param id: The id of this AdditionalRecipientReceivableRefund.
        :type: str
        """

        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")
        if len(id) < 1:
            raise ValueError("Invalid value for `id`, length must be greater than or equal to `1`")

        self._id = id

    @property
    def receivable_id(self):
        """
        Gets the receivable_id of this AdditionalRecipientReceivableRefund.
        The ID of the receivable that the refund was applied to.

        :return: The receivable_id of this AdditionalRecipientReceivableRefund.
        :rtype: str
        """
        return self._receivable_id

    @receivable_id.setter
    def receivable_id(self, receivable_id):
        """
        Sets the receivable_id of this AdditionalRecipientReceivableRefund.
        The ID of the receivable that the refund was applied to.

        :param receivable_id: The receivable_id of this AdditionalRecipientReceivableRefund.
        :type: str
        """

        if receivable_id is None:
            raise ValueError("Invalid value for `receivable_id`, must not be `None`")
        if len(receivable_id) < 1:
            raise ValueError("Invalid value for `receivable_id`, length must be greater than or equal to `1`")

        self._receivable_id = receivable_id

    @property
    def refund_id(self):
        """
        Gets the refund_id of this AdditionalRecipientReceivableRefund.
        The ID of the refund that is associated to this receivable refund.

        :return: The refund_id of this AdditionalRecipientReceivableRefund.
        :rtype: str
        """
        return self._refund_id

    @refund_id.setter
    def refund_id(self, refund_id):
        """
        Sets the refund_id of this AdditionalRecipientReceivableRefund.
        The ID of the refund that is associated to this receivable refund.

        :param refund_id: The refund_id of this AdditionalRecipientReceivableRefund.
        :type: str
        """

        if refund_id is None:
            raise ValueError("Invalid value for `refund_id`, must not be `None`")
        if len(refund_id) < 1:
            raise ValueError("Invalid value for `refund_id`, length must be greater than or equal to `1`")

        self._refund_id = refund_id

    @property
    def transaction_location_id(self):
        """
        Gets the transaction_location_id of this AdditionalRecipientReceivableRefund.
        The ID of the location that created the receivable. This is the location ID on the associated transaction.

        :return: The transaction_location_id of this AdditionalRecipientReceivableRefund.
        :rtype: str
        """
        return self._transaction_location_id

    @transaction_location_id.setter
    def transaction_location_id(self, transaction_location_id):
        """
        Sets the transaction_location_id of this AdditionalRecipientReceivableRefund.
        The ID of the location that created the receivable. This is the location ID on the associated transaction.

        :param transaction_location_id: The transaction_location_id of this AdditionalRecipientReceivableRefund.
        :type: str
        """

        if transaction_location_id is None:
            raise ValueError("Invalid value for `transaction_location_id`, must not be `None`")
        if len(transaction_location_id) < 1:
            raise ValueError("Invalid value for `transaction_location_id`, length must be greater than or equal to `1`")

        self._transaction_location_id = transaction_location_id

    @property
    def amount_money(self):
        """
        Gets the amount_money of this AdditionalRecipientReceivableRefund.
        The amount of the refund. This will always be non-negative.

        :return: The amount_money of this AdditionalRecipientReceivableRefund.
        :rtype: Money
        """
        return self._amount_money

    @amount_money.setter
    def amount_money(self, amount_money):
        """
        Sets the amount_money of this AdditionalRecipientReceivableRefund.
        The amount of the refund. This will always be non-negative.

        :param amount_money: The amount_money of this AdditionalRecipientReceivableRefund.
        :type: Money
        """

        self._amount_money = amount_money

    @property
    def created_at(self):
        """
        Gets the created_at of this AdditionalRecipientReceivableRefund.
        The time when the refund was created, in RFC 3339 format.

        :return: The created_at of this AdditionalRecipientReceivableRefund.
        :rtype: str
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """
        Sets the created_at of this AdditionalRecipientReceivableRefund.
        The time when the refund was created, in RFC 3339 format.

        :param created_at: The created_at of this AdditionalRecipientReceivableRefund.
        :type: str
        """

        self._created_at = created_at

    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
        """
        return self.__dict__ == other.__dict__

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