# coding: utf-8

"""
    Lotus API

    Lotus is an open-core pricing and billing engine. We enable API companies to automate and optimize their custom usage-based pricing for any metric.  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class SubscriptionRecordCancelRequest(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 = {
        'flat_fee_behavior': 'str',
        'usage_behavior': 'str',
        'invoicing_behavior': 'str'
    }

    attribute_map = {
        'flat_fee_behavior': 'flat_fee_behavior',
        'usage_behavior': 'usage_behavior',
        'invoicing_behavior': 'invoicing_behavior'
    }

    def __init__(self, flat_fee_behavior=None, usage_behavior='bill_full', invoicing_behavior='invoice_now'):  # noqa: E501
        """SubscriptionRecordCancelRequest - a model defined in Swagger"""  # noqa: E501
        self._flat_fee_behavior = None
        self._usage_behavior = None
        self._invoicing_behavior = None
        self.discriminator = None
        if flat_fee_behavior is not None:
            self.flat_fee_behavior = flat_fee_behavior
        if usage_behavior is not None:
            self.usage_behavior = usage_behavior
        if invoicing_behavior is not None:
            self.invoicing_behavior = invoicing_behavior

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

        When canceling a subscription, the behavior used to calculate the flat fee. If null or not provided, the charge's default behavior will be used according to the subscription's start and end dates. If charge_full, the full flat fee will be charged, regardless of the duration of the subscription. If refund, the flat fee will not be charged. If charge_prorated, the prorated flat fee will be charged.  * `refund` - Refund * `charge_prorated` - Prorate * `charge_full` - Charge Full  # noqa: E501

        :return: The flat_fee_behavior of this SubscriptionRecordCancelRequest.  # noqa: E501
        :rtype: str
        """
        return self._flat_fee_behavior

    @flat_fee_behavior.setter
    def flat_fee_behavior(self, flat_fee_behavior):
        """Sets the flat_fee_behavior of this SubscriptionRecordCancelRequest.

        When canceling a subscription, the behavior used to calculate the flat fee. If null or not provided, the charge's default behavior will be used according to the subscription's start and end dates. If charge_full, the full flat fee will be charged, regardless of the duration of the subscription. If refund, the flat fee will not be charged. If charge_prorated, the prorated flat fee will be charged.  * `refund` - Refund * `charge_prorated` - Prorate * `charge_full` - Charge Full  # noqa: E501

        :param flat_fee_behavior: The flat_fee_behavior of this SubscriptionRecordCancelRequest.  # noqa: E501
        :type: str
        """
        allowed_values = ["refund", "charge_prorated", "charge_full", ""]  # noqa: E501
        if flat_fee_behavior not in allowed_values:
            raise ValueError(
                "Invalid value for `flat_fee_behavior` ({0}), must be one of {1}"  # noqa: E501
                .format(flat_fee_behavior, allowed_values)
            )

        self._flat_fee_behavior = flat_fee_behavior

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

        If bill_full, current usage will be billed on the invoice. If bill_none, current unbilled usage will be dropped from the invoice. Defaults to bill_full.  * `bill_full` - Bill Full * `bill_none` - Bill None  # noqa: E501

        :return: The usage_behavior of this SubscriptionRecordCancelRequest.  # noqa: E501
        :rtype: str
        """
        return self._usage_behavior

    @usage_behavior.setter
    def usage_behavior(self, usage_behavior):
        """Sets the usage_behavior of this SubscriptionRecordCancelRequest.

        If bill_full, current usage will be billed on the invoice. If bill_none, current unbilled usage will be dropped from the invoice. Defaults to bill_full.  * `bill_full` - Bill Full * `bill_none` - Bill None  # noqa: E501

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

        self._usage_behavior = usage_behavior

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

        Whether to invoice now or invoice at the end of the billing period. Defaults to invoice now.  * `add_to_next_invoice` - Add to Next Invoice * `invoice_now` - Invoice Now  # noqa: E501

        :return: The invoicing_behavior of this SubscriptionRecordCancelRequest.  # noqa: E501
        :rtype: str
        """
        return self._invoicing_behavior

    @invoicing_behavior.setter
    def invoicing_behavior(self, invoicing_behavior):
        """Sets the invoicing_behavior of this SubscriptionRecordCancelRequest.

        Whether to invoice now or invoice at the end of the billing period. Defaults to invoice now.  * `add_to_next_invoice` - Add to Next Invoice * `invoice_now` - Invoice Now  # noqa: E501

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

        self._invoicing_behavior = invoicing_behavior

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

        return self.__dict__ == other.__dict__

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