# coding: utf-8

"""
    Mauve Admin API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class Payment(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 = {
        'amount': 'float',
        'name': 'str',
        '_date': 'datetime',
        'financial_account_number': 'str',
        'type': 'str',
        'external_reference_number': 'str'
    }

    attribute_map = {
        'amount': 'amount',
        'name': 'name',
        '_date': 'date',
        'financial_account_number': 'financialAccountNumber',
        'type': 'type',
        'external_reference_number': 'externalReferenceNumber'
    }

    def __init__(self, amount=None, name=None, _date=None, financial_account_number=None, type=None, external_reference_number=None):  # noqa: E501
        """Payment - a model defined in Swagger"""  # noqa: E501
        self._amount = None
        self._name = None
        self.__date = None
        self._financial_account_number = None
        self._type = None
        self._external_reference_number = None
        self.discriminator = None
        self.amount = amount
        if name is not None:
            self.name = name
        self._date = _date
        self.financial_account_number = financial_account_number
        if type is not None:
            self.type = type
        if external_reference_number is not None:
            self.external_reference_number = external_reference_number

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

        The payment amount in decimal. (e.g. 1123.99 would equal 1123 EUR and 99 cents, if document currency is EUR)  # noqa: E501

        :return: The amount of this Payment.  # noqa: E501
        :rtype: float
        """
        return self._amount

    @amount.setter
    def amount(self, amount):
        """Sets the amount of this Payment.

        The payment amount in decimal. (e.g. 1123.99 would equal 1123 EUR and 99 cents, if document currency is EUR)  # noqa: E501

        :param amount: The amount of this Payment.  # noqa: E501
        :type: float
        """
        if amount is None:
            raise ValueError("Invalid value for `amount`, must not be `None`")  # noqa: E501

        self._amount = amount

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


        :return: The name of this Payment.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this Payment.


        :param name: The name of this Payment.  # noqa: E501
        :type: str
        """

        self._name = name

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

        The timestamp of the payment in UTC in ISO 8601 (e.g. 2022-09-25T19:20:30.45+01:00)  # noqa: E501

        :return: The _date of this Payment.  # noqa: E501
        :rtype: datetime
        """
        return self.__date

    @_date.setter
    def _date(self, _date):
        """Sets the _date of this Payment.

        The timestamp of the payment in UTC in ISO 8601 (e.g. 2022-09-25T19:20:30.45+01:00)  # noqa: E501

        :param _date: The _date of this Payment.  # noqa: E501
        :type: datetime
        """
        if _date is None:
            raise ValueError("Invalid value for `_date`, must not be `None`")  # noqa: E501

        self.__date = _date

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


        :return: The financial_account_number of this Payment.  # noqa: E501
        :rtype: str
        """
        return self._financial_account_number

    @financial_account_number.setter
    def financial_account_number(self, financial_account_number):
        """Sets the financial_account_number of this Payment.


        :param financial_account_number: The financial_account_number of this Payment.  # noqa: E501
        :type: str
        """
        if financial_account_number is None:
            raise ValueError("Invalid value for `financial_account_number`, must not be `None`")  # noqa: E501

        self._financial_account_number = financial_account_number

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

        Type of payment (possible values: Unknown, Coupon, PayPalCheckout, PayPalCheckoutPayUponInvoice)  # noqa: E501

        :return: The type of this Payment.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this Payment.

        Type of payment (possible values: Unknown, Coupon, PayPalCheckout, PayPalCheckoutPayUponInvoice)  # noqa: E501

        :param type: The type of this Payment.  # noqa: E501
        :type: str
        """
        allowed_values = ["Unknown", "Coupon", "PayPalCheckout", "PayPalCheckoutPayUponInvoice"]  # noqa: E501
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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

        An external identifier. Only used by epayment providers. (e.g. Paypal)  # noqa: E501

        :return: The external_reference_number of this Payment.  # noqa: E501
        :rtype: str
        """
        return self._external_reference_number

    @external_reference_number.setter
    def external_reference_number(self, external_reference_number):
        """Sets the external_reference_number of this Payment.

        An external identifier. Only used by epayment providers. (e.g. Paypal)  # noqa: E501

        :param external_reference_number: The external_reference_number of this Payment.  # noqa: E501
        :type: str
        """

        self._external_reference_number = external_reference_number

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

        return self.__dict__ == other.__dict__

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