# 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 InvoiceRequest(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 = {
        'invoice_id': 'str',
        'cost_due': 'float',
        'currency': 'PricingUnitRequest',
        'external_payment_obj_type': 'str',
        'external_payment_obj_status': 'str',
        'line_items': 'list[InvoiceLineItemRequest]',
        'seller': 'SellerRequest'
    }

    attribute_map = {
        'invoice_id': 'invoice_id',
        'cost_due': 'cost_due',
        'currency': 'currency',
        'external_payment_obj_type': 'external_payment_obj_type',
        'external_payment_obj_status': 'external_payment_obj_status',
        'line_items': 'line_items',
        'seller': 'seller'
    }

    def __init__(self, invoice_id=None, cost_due=None, currency=None, external_payment_obj_type=None, external_payment_obj_status=None, line_items=None, seller=None):  # noqa: E501
        """InvoiceRequest - a model defined in Swagger"""  # noqa: E501
        self._invoice_id = None
        self._cost_due = None
        self._currency = None
        self._external_payment_obj_type = None
        self._external_payment_obj_status = None
        self._line_items = None
        self._seller = None
        self.discriminator = None
        self.invoice_id = invoice_id
        self.cost_due = cost_due
        self.currency = currency
        self.external_payment_obj_type = external_payment_obj_type
        if external_payment_obj_status is not None:
            self.external_payment_obj_status = external_payment_obj_status
        self.line_items = line_items
        self.seller = seller

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


        :return: The invoice_id of this InvoiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._invoice_id

    @invoice_id.setter
    def invoice_id(self, invoice_id):
        """Sets the invoice_id of this InvoiceRequest.


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

        self._invoice_id = invoice_id

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


        :return: The cost_due of this InvoiceRequest.  # noqa: E501
        :rtype: float
        """
        return self._cost_due

    @cost_due.setter
    def cost_due(self, cost_due):
        """Sets the cost_due of this InvoiceRequest.


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

        self._cost_due = cost_due

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


        :return: The currency of this InvoiceRequest.  # noqa: E501
        :rtype: PricingUnitRequest
        """
        return self._currency

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


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

        self._currency = currency

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

        * `stripe` - Stripe * `braintree` - Braintree  # noqa: E501

        :return: The external_payment_obj_type of this InvoiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._external_payment_obj_type

    @external_payment_obj_type.setter
    def external_payment_obj_type(self, external_payment_obj_type):
        """Sets the external_payment_obj_type of this InvoiceRequest.

        * `stripe` - Stripe * `braintree` - Braintree  # noqa: E501

        :param external_payment_obj_type: The external_payment_obj_type of this InvoiceRequest.  # noqa: E501
        :type: str
        """
        if external_payment_obj_type is None:
            raise ValueError("Invalid value for `external_payment_obj_type`, must not be `None`")  # noqa: E501
        allowed_values = ["stripe", "braintree", ""]  # noqa: E501
        if external_payment_obj_type not in allowed_values:
            raise ValueError(
                "Invalid value for `external_payment_obj_type` ({0}), must be one of {1}"  # noqa: E501
                .format(external_payment_obj_type, allowed_values)
            )

        self._external_payment_obj_type = external_payment_obj_type

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


        :return: The external_payment_obj_status of this InvoiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._external_payment_obj_status

    @external_payment_obj_status.setter
    def external_payment_obj_status(self, external_payment_obj_status):
        """Sets the external_payment_obj_status of this InvoiceRequest.


        :param external_payment_obj_status: The external_payment_obj_status of this InvoiceRequest.  # noqa: E501
        :type: str
        """

        self._external_payment_obj_status = external_payment_obj_status

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


        :return: The line_items of this InvoiceRequest.  # noqa: E501
        :rtype: list[InvoiceLineItemRequest]
        """
        return self._line_items

    @line_items.setter
    def line_items(self, line_items):
        """Sets the line_items of this InvoiceRequest.


        :param line_items: The line_items of this InvoiceRequest.  # noqa: E501
        :type: list[InvoiceLineItemRequest]
        """
        if line_items is None:
            raise ValueError("Invalid value for `line_items`, must not be `None`")  # noqa: E501

        self._line_items = line_items

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


        :return: The seller of this InvoiceRequest.  # noqa: E501
        :rtype: SellerRequest
        """
        return self._seller

    @seller.setter
    def seller(self, seller):
        """Sets the seller of this InvoiceRequest.


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

        self._seller = seller

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

        return self.__dict__ == other.__dict__

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