# coding: utf-8

"""
    Cyclos 4.11.5 API

    The REST API for Cyclos 4.11.5  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from swagger_client.configuration import Configuration


class TransactionTypeData(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 = {
        'currency': 'Currency',
        'fixed_amount': 'BigDecimal',
        'allows_recurring_payments': 'bool',
        'max_installments': 'int',
        'requires_description': 'bool',
        'description_availability': 'AvailabilityEnum',
        'default_expiration_date': 'datetime',
        'hide_expiration_date': 'bool',
        'custom_fields': 'list[CustomFieldDetailed]',
        'a_rate': 'BigDecimal',
        'd_rate': 'BigDecimal',
        'd_rate_creation_value': 'BigDecimal',
        'limited_awaiting_authorization': 'bool',
        'no_negatives_maturity_policy': 'bool',
        'maturity_policy': 'MaturityPolicyEnum',
        'max_amount_by_maturity_policy': 'BigDecimal',
        'maturity_table_winner_id': 'str'
    }

    attribute_map = {
        'currency': 'currency',
        'fixed_amount': 'fixedAmount',
        'allows_recurring_payments': 'allowsRecurringPayments',
        'max_installments': 'maxInstallments',
        'requires_description': 'requiresDescription',
        'description_availability': 'descriptionAvailability',
        'default_expiration_date': 'defaultExpirationDate',
        'hide_expiration_date': 'hideExpirationDate',
        'custom_fields': 'customFields',
        'a_rate': 'ARate',
        'd_rate': 'DRate',
        'd_rate_creation_value': 'DRateCreationValue',
        'limited_awaiting_authorization': 'limitedAwaitingAuthorization',
        'no_negatives_maturity_policy': 'noNegativesMaturityPolicy',
        'maturity_policy': 'maturityPolicy',
        'max_amount_by_maturity_policy': 'maxAmountByMaturityPolicy',
        'maturity_table_winner_id': 'maturityTableWinnerId'
    }

    def __init__(self, currency=None, fixed_amount=None, allows_recurring_payments=None, max_installments=None, requires_description=None, description_availability=None, default_expiration_date=None, hide_expiration_date=None, custom_fields=None, a_rate=None, d_rate=None, d_rate_creation_value=None, limited_awaiting_authorization=None, no_negatives_maturity_policy=None, maturity_policy=None, max_amount_by_maturity_policy=None, maturity_table_winner_id=None, _configuration=None):  # noqa: E501
        """TransactionTypeData - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._currency = None
        self._fixed_amount = None
        self._allows_recurring_payments = None
        self._max_installments = None
        self._requires_description = None
        self._description_availability = None
        self._default_expiration_date = None
        self._hide_expiration_date = None
        self._custom_fields = None
        self._a_rate = None
        self._d_rate = None
        self._d_rate_creation_value = None
        self._limited_awaiting_authorization = None
        self._no_negatives_maturity_policy = None
        self._maturity_policy = None
        self._max_amount_by_maturity_policy = None
        self._maturity_table_winner_id = None
        self.discriminator = None

        if currency is not None:
            self.currency = currency
        if fixed_amount is not None:
            self.fixed_amount = fixed_amount
        if allows_recurring_payments is not None:
            self.allows_recurring_payments = allows_recurring_payments
        if max_installments is not None:
            self.max_installments = max_installments
        if requires_description is not None:
            self.requires_description = requires_description
        if description_availability is not None:
            self.description_availability = description_availability
        if default_expiration_date is not None:
            self.default_expiration_date = default_expiration_date
        if hide_expiration_date is not None:
            self.hide_expiration_date = hide_expiration_date
        if custom_fields is not None:
            self.custom_fields = custom_fields
        if a_rate is not None:
            self.a_rate = a_rate
        if d_rate is not None:
            self.d_rate = d_rate
        if d_rate_creation_value is not None:
            self.d_rate_creation_value = d_rate_creation_value
        if limited_awaiting_authorization is not None:
            self.limited_awaiting_authorization = limited_awaiting_authorization
        if no_negatives_maturity_policy is not None:
            self.no_negatives_maturity_policy = no_negatives_maturity_policy
        if maturity_policy is not None:
            self.maturity_policy = maturity_policy
        if max_amount_by_maturity_policy is not None:
            self.max_amount_by_maturity_policy = max_amount_by_maturity_policy
        if maturity_table_winner_id is not None:
            self.maturity_table_winner_id = maturity_table_winner_id

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

        The payment type currency  # noqa: E501

        :return: The currency of this TransactionTypeData.  # noqa: E501
        :rtype: Currency
        """
        return self._currency

    @currency.setter
    def currency(self, currency):
        """Sets the currency of this TransactionTypeData.

        The payment type currency  # noqa: E501

        :param currency: The currency of this TransactionTypeData.  # noqa: E501
        :type: Currency
        """

        self._currency = currency

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

        The only allowed amount if the payment type uses a fixed amount   # noqa: E501

        :return: The fixed_amount of this TransactionTypeData.  # noqa: E501
        :rtype: BigDecimal
        """
        return self._fixed_amount

    @fixed_amount.setter
    def fixed_amount(self, fixed_amount):
        """Sets the fixed_amount of this TransactionTypeData.

        The only allowed amount if the payment type uses a fixed amount   # noqa: E501

        :param fixed_amount: The fixed_amount of this TransactionTypeData.  # noqa: E501
        :type: BigDecimal
        """

        self._fixed_amount = fixed_amount

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

        Can payments of this type be made recurring?   # noqa: E501

        :return: The allows_recurring_payments of this TransactionTypeData.  # noqa: E501
        :rtype: bool
        """
        return self._allows_recurring_payments

    @allows_recurring_payments.setter
    def allows_recurring_payments(self, allows_recurring_payments):
        """Sets the allows_recurring_payments of this TransactionTypeData.

        Can payments of this type be made recurring?   # noqa: E501

        :param allows_recurring_payments: The allows_recurring_payments of this TransactionTypeData.  # noqa: E501
        :type: bool
        """

        self._allows_recurring_payments = allows_recurring_payments

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

        The maximum allowed installments. If it is zero, no kind of scheduled payments is allowed. If it is 1, a single future date can be used.   # noqa: E501

        :return: The max_installments of this TransactionTypeData.  # noqa: E501
        :rtype: int
        """
        return self._max_installments

    @max_installments.setter
    def max_installments(self, max_installments):
        """Sets the max_installments of this TransactionTypeData.

        The maximum allowed installments. If it is zero, no kind of scheduled payments is allowed. If it is 1, a single future date can be used.   # noqa: E501

        :param max_installments: The max_installments of this TransactionTypeData.  # noqa: E501
        :type: int
        """

        self._max_installments = max_installments

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

        The transaction description can be either required, or optional, depending on this setting.  # noqa: E501

        :return: The requires_description of this TransactionTypeData.  # noqa: E501
        :rtype: bool
        """
        return self._requires_description

    @requires_description.setter
    def requires_description(self, requires_description):
        """Sets the requires_description of this TransactionTypeData.

        The transaction description can be either required, or optional, depending on this setting.  # noqa: E501

        :param requires_description: The requires_description of this TransactionTypeData.  # noqa: E501
        :type: bool
        """

        self._requires_description = requires_description

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

        The availability for the transaction description           Possible values are: * disabled: The data is disabled * optional: The data is enabled and optional * required: The data is enabled and required   # noqa: E501

        :return: The description_availability of this TransactionTypeData.  # noqa: E501
        :rtype: AvailabilityEnum
        """
        return self._description_availability

    @description_availability.setter
    def description_availability(self, description_availability):
        """Sets the description_availability of this TransactionTypeData.

        The availability for the transaction description           Possible values are: * disabled: The data is disabled * optional: The data is enabled and optional * required: The data is enabled and required   # noqa: E501

        :param description_availability: The description_availability of this TransactionTypeData.  # noqa: E501
        :type: AvailabilityEnum
        """

        self._description_availability = description_availability

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

        The default expiration date, according to the configuration. Only for payment requests.  # noqa: E501

        :return: The default_expiration_date of this TransactionTypeData.  # noqa: E501
        :rtype: datetime
        """
        return self._default_expiration_date

    @default_expiration_date.setter
    def default_expiration_date(self, default_expiration_date):
        """Sets the default_expiration_date of this TransactionTypeData.

        The default expiration date, according to the configuration. Only for payment requests.  # noqa: E501

        :param default_expiration_date: The default_expiration_date of this TransactionTypeData.  # noqa: E501
        :type: datetime
        """

        self._default_expiration_date = default_expiration_date

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

        Whether the expiration date should be hidden from users, Only for payment requests.  # noqa: E501

        :return: The hide_expiration_date of this TransactionTypeData.  # noqa: E501
        :rtype: bool
        """
        return self._hide_expiration_date

    @hide_expiration_date.setter
    def hide_expiration_date(self, hide_expiration_date):
        """Sets the hide_expiration_date of this TransactionTypeData.

        Whether the expiration date should be hidden from users, Only for payment requests.  # noqa: E501

        :param hide_expiration_date: The hide_expiration_date of this TransactionTypeData.  # noqa: E501
        :type: bool
        """

        self._hide_expiration_date = hide_expiration_date

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

        The custom fields related to this payment type  # noqa: E501

        :return: The custom_fields of this TransactionTypeData.  # noqa: E501
        :rtype: list[CustomFieldDetailed]
        """
        return self._custom_fields

    @custom_fields.setter
    def custom_fields(self, custom_fields):
        """Sets the custom_fields of this TransactionTypeData.

        The custom fields related to this payment type  # noqa: E501

        :param custom_fields: The custom_fields of this TransactionTypeData.  # noqa: E501
        :type: list[CustomFieldDetailed]
        """

        self._custom_fields = custom_fields

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

        The balance aging counter used for this payment. Only for payments.   # noqa: E501

        :return: The a_rate of this TransactionTypeData.  # noqa: E501
        :rtype: BigDecimal
        """
        return self._a_rate

    @a_rate.setter
    def a_rate(self, a_rate):
        """Sets the a_rate of this TransactionTypeData.

        The balance aging counter used for this payment. Only for payments.   # noqa: E501

        :param a_rate: The a_rate of this TransactionTypeData.  # noqa: E501
        :type: BigDecimal
        """

        self._a_rate = a_rate

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

        The balance maturity used for this payment. Only for payments.   # noqa: E501

        :return: The d_rate of this TransactionTypeData.  # noqa: E501
        :rtype: BigDecimal
        """
        return self._d_rate

    @d_rate.setter
    def d_rate(self, d_rate):
        """Sets the d_rate of this TransactionTypeData.

        The balance maturity used for this payment. Only for payments.   # noqa: E501

        :param d_rate: The d_rate of this TransactionTypeData.  # noqa: E501
        :type: BigDecimal
        """

        self._d_rate = d_rate

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

        The initial value for the balance maturity on this payment type. Only for payments.   # noqa: E501

        :return: The d_rate_creation_value of this TransactionTypeData.  # noqa: E501
        :rtype: BigDecimal
        """
        return self._d_rate_creation_value

    @d_rate_creation_value.setter
    def d_rate_creation_value(self, d_rate_creation_value):
        """Sets the d_rate_creation_value of this TransactionTypeData.

        The initial value for the balance maturity on this payment type. Only for payments.   # noqa: E501

        :param d_rate_creation_value: The d_rate_creation_value of this TransactionTypeData.  # noqa: E501
        :type: BigDecimal
        """

        self._d_rate_creation_value = d_rate_creation_value

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

        Only for payments.  # noqa: E501

        :return: The limited_awaiting_authorization of this TransactionTypeData.  # noqa: E501
        :rtype: bool
        """
        return self._limited_awaiting_authorization

    @limited_awaiting_authorization.setter
    def limited_awaiting_authorization(self, limited_awaiting_authorization):
        """Sets the limited_awaiting_authorization of this TransactionTypeData.

        Only for payments.  # noqa: E501

        :param limited_awaiting_authorization: The limited_awaiting_authorization of this TransactionTypeData.  # noqa: E501
        :type: bool
        """

        self._limited_awaiting_authorization = limited_awaiting_authorization

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

        Only for payments.  # noqa: E501

        :return: The no_negatives_maturity_policy of this TransactionTypeData.  # noqa: E501
        :rtype: bool
        """
        return self._no_negatives_maturity_policy

    @no_negatives_maturity_policy.setter
    def no_negatives_maturity_policy(self, no_negatives_maturity_policy):
        """Sets the no_negatives_maturity_policy of this TransactionTypeData.

        Only for payments.  # noqa: E501

        :param no_negatives_maturity_policy: The no_negatives_maturity_policy of this TransactionTypeData.  # noqa: E501
        :type: bool
        """

        self._no_negatives_maturity_policy = no_negatives_maturity_policy

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

        Only for payments. Possible values are: * always: The payment can always be performed, regardless its maturity * history: It the balance maturity ever reached zero in the past, that balance can be used on payment. If later on the maturity went above zero, that new balance cannot be used. Is normally used in conjunction with the maturity table, so the user can pick the balance from past maturity * zero: The payment can only be performed if the current maturity is zero   # noqa: E501

        :return: The maturity_policy of this TransactionTypeData.  # noqa: E501
        :rtype: MaturityPolicyEnum
        """
        return self._maturity_policy

    @maturity_policy.setter
    def maturity_policy(self, maturity_policy):
        """Sets the maturity_policy of this TransactionTypeData.

        Only for payments. Possible values are: * always: The payment can always be performed, regardless its maturity * history: It the balance maturity ever reached zero in the past, that balance can be used on payment. If later on the maturity went above zero, that new balance cannot be used. Is normally used in conjunction with the maturity table, so the user can pick the balance from past maturity * zero: The payment can only be performed if the current maturity is zero   # noqa: E501

        :param maturity_policy: The maturity_policy of this TransactionTypeData.  # noqa: E501
        :type: MaturityPolicyEnum
        """

        self._maturity_policy = maturity_policy

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

        The maximum amount that can be performed when `maturityPolicy` is `history`. It corresponds to the maturity table entry indicated by `maturityTableWinnerId`. Only for payments.   # noqa: E501

        :return: The max_amount_by_maturity_policy of this TransactionTypeData.  # noqa: E501
        :rtype: BigDecimal
        """
        return self._max_amount_by_maturity_policy

    @max_amount_by_maturity_policy.setter
    def max_amount_by_maturity_policy(self, max_amount_by_maturity_policy):
        """Sets the max_amount_by_maturity_policy of this TransactionTypeData.

        The maximum amount that can be performed when `maturityPolicy` is `history`. It corresponds to the maturity table entry indicated by `maturityTableWinnerId`. Only for payments.   # noqa: E501

        :param max_amount_by_maturity_policy: The max_amount_by_maturity_policy of this TransactionTypeData.  # noqa: E501
        :type: BigDecimal
        """

        self._max_amount_by_maturity_policy = max_amount_by_maturity_policy

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

        When `maturityPolicy` is `history`, contains the id of the maturity table entry that granted. Only for payments.   # noqa: E501

        :return: The maturity_table_winner_id of this TransactionTypeData.  # noqa: E501
        :rtype: str
        """
        return self._maturity_table_winner_id

    @maturity_table_winner_id.setter
    def maturity_table_winner_id(self, maturity_table_winner_id):
        """Sets the maturity_table_winner_id of this TransactionTypeData.

        When `maturityPolicy` is `history`, contains the id of the maturity table entry that granted. Only for payments.   # noqa: E501

        :param maturity_table_winner_id: The maturity_table_winner_id of this TransactionTypeData.  # noqa: E501
        :type: str
        """

        self._maturity_table_winner_id = maturity_table_winner_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(TransactionTypeData, 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, TransactionTypeData):
            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, TransactionTypeData):
            return True

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