# coding: utf-8

"""
    Billingo API v3

    This is a Billingo API v3 documentation. Our API based on REST software architectural style. API has resource-oriented URLs, accepts JSON-encoded request bodies and returns JSON-encoded responses. To use this API you have to generate a new API key on our [site](https://app.billingo.hu/api-key). After that, you can test your API key on this page.  # noqa: E501

    OpenAPI spec version: 3.0.14
    Contact: hello@billingo.hu
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class Document(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 = {
        'id': 'int',
        'invoice_number': 'str',
        'type': 'DocumentType',
        'cancelled': 'bool',
        'block_id': 'int',
        'payment_status': 'PaymentStatus',
        'payment_method': 'PaymentMethod',
        'gross_total': 'float',
        'currency': 'Currency',
        'conversion_rate': 'float',
        'invoice_date': 'date',
        'fulfillment_date': 'date',
        'due_date': 'date',
        'paid_date': 'date',
        'organization': 'DocumentOrganization',
        'partner': 'Partner',
        'document_partner': 'DocumentPartner',
        'electronic': 'bool',
        'comment': 'str',
        'tags': 'list[str]',
        'notification_status': 'DocumentNotificationStatus',
        'language': 'DocumentLanguage',
        'items': 'list[DocumentItem]',
        'summary': 'DocumentSummary',
        'settings': 'DocumentSettings',
        'online_szamla_status': 'OnlineSzamlaStatusEnum',
        'related_documents': 'list[DocumentAncestor]',
        'discount': 'Discount',
        'correction_type': 'CorrectionType'
    }

    attribute_map = {
        'id': 'id',
        'invoice_number': 'invoice_number',
        'type': 'type',
        'cancelled': 'cancelled',
        'block_id': 'block_id',
        'payment_status': 'payment_status',
        'payment_method': 'payment_method',
        'gross_total': 'gross_total',
        'currency': 'currency',
        'conversion_rate': 'conversion_rate',
        'invoice_date': 'invoice_date',
        'fulfillment_date': 'fulfillment_date',
        'due_date': 'due_date',
        'paid_date': 'paid_date',
        'organization': 'organization',
        'partner': 'partner',
        'document_partner': 'document_partner',
        'electronic': 'electronic',
        'comment': 'comment',
        'tags': 'tags',
        'notification_status': 'notification_status',
        'language': 'language',
        'items': 'items',
        'summary': 'summary',
        'settings': 'settings',
        'online_szamla_status': 'online_szamla_status',
        'related_documents': 'related_documents',
        'discount': 'discount',
        'correction_type': 'correction_type'
    }

    def __init__(self, id=None, invoice_number=None, type=None, cancelled=None, block_id=None, payment_status=None, payment_method=None, gross_total=None, currency=None, conversion_rate=None, invoice_date=None, fulfillment_date=None, due_date=None, paid_date=None, organization=None, partner=None, document_partner=None, electronic=None, comment=None, tags=None, notification_status=None, language=None, items=None, summary=None, settings=None, online_szamla_status=None, related_documents=None, discount=None, correction_type=None):  # noqa: E501
        """Document - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._invoice_number = None
        self._type = None
        self._cancelled = None
        self._block_id = None
        self._payment_status = None
        self._payment_method = None
        self._gross_total = None
        self._currency = None
        self._conversion_rate = None
        self._invoice_date = None
        self._fulfillment_date = None
        self._due_date = None
        self._paid_date = None
        self._organization = None
        self._partner = None
        self._document_partner = None
        self._electronic = None
        self._comment = None
        self._tags = None
        self._notification_status = None
        self._language = None
        self._items = None
        self._summary = None
        self._settings = None
        self._online_szamla_status = None
        self._related_documents = None
        self._discount = None
        self._correction_type = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if invoice_number is not None:
            self.invoice_number = invoice_number
        if type is not None:
            self.type = type
        if cancelled is not None:
            self.cancelled = cancelled
        if block_id is not None:
            self.block_id = block_id
        if payment_status is not None:
            self.payment_status = payment_status
        if payment_method is not None:
            self.payment_method = payment_method
        if gross_total is not None:
            self.gross_total = gross_total
        if currency is not None:
            self.currency = currency
        if conversion_rate is not None:
            self.conversion_rate = conversion_rate
        if invoice_date is not None:
            self.invoice_date = invoice_date
        if fulfillment_date is not None:
            self.fulfillment_date = fulfillment_date
        if due_date is not None:
            self.due_date = due_date
        if paid_date is not None:
            self.paid_date = paid_date
        if organization is not None:
            self.organization = organization
        if partner is not None:
            self.partner = partner
        if document_partner is not None:
            self.document_partner = document_partner
        if electronic is not None:
            self.electronic = electronic
        if comment is not None:
            self.comment = comment
        if tags is not None:
            self.tags = tags
        if notification_status is not None:
            self.notification_status = notification_status
        if language is not None:
            self.language = language
        if items is not None:
            self.items = items
        if summary is not None:
            self.summary = summary
        if settings is not None:
            self.settings = settings
        if online_szamla_status is not None:
            self.online_szamla_status = online_szamla_status
        if related_documents is not None:
            self.related_documents = related_documents
        if discount is not None:
            self.discount = discount
        if correction_type is not None:
            self.correction_type = correction_type

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

        The document's unique identifier.  # noqa: E501

        :return: The id of this Document.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Document.

        The document's unique identifier.  # noqa: E501

        :param id: The id of this Document.  # noqa: E501
        :type: int
        """

        self._id = id

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

        The document's invoice number.  # noqa: E501

        :return: The invoice_number of this Document.  # noqa: E501
        :rtype: str
        """
        return self._invoice_number

    @invoice_number.setter
    def invoice_number(self, invoice_number):
        """Sets the invoice_number of this Document.

        The document's invoice number.  # noqa: E501

        :param invoice_number: The invoice_number of this Document.  # noqa: E501
        :type: str
        """

        self._invoice_number = invoice_number

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


        :return: The type of this Document.  # noqa: E501
        :rtype: DocumentType
        """
        return self._type

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


        :param type: The type of this Document.  # noqa: E501
        :type: DocumentType
        """

        self._type = type

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


        :return: The cancelled of this Document.  # noqa: E501
        :rtype: bool
        """
        return self._cancelled

    @cancelled.setter
    def cancelled(self, cancelled):
        """Sets the cancelled of this Document.


        :param cancelled: The cancelled of this Document.  # noqa: E501
        :type: bool
        """

        self._cancelled = cancelled

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

        DocumentBlock's identifier.  # noqa: E501

        :return: The block_id of this Document.  # noqa: E501
        :rtype: int
        """
        return self._block_id

    @block_id.setter
    def block_id(self, block_id):
        """Sets the block_id of this Document.

        DocumentBlock's identifier.  # noqa: E501

        :param block_id: The block_id of this Document.  # noqa: E501
        :type: int
        """

        self._block_id = block_id

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


        :return: The payment_status of this Document.  # noqa: E501
        :rtype: PaymentStatus
        """
        return self._payment_status

    @payment_status.setter
    def payment_status(self, payment_status):
        """Sets the payment_status of this Document.


        :param payment_status: The payment_status of this Document.  # noqa: E501
        :type: PaymentStatus
        """

        self._payment_status = payment_status

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


        :return: The payment_method of this Document.  # noqa: E501
        :rtype: PaymentMethod
        """
        return self._payment_method

    @payment_method.setter
    def payment_method(self, payment_method):
        """Sets the payment_method of this Document.


        :param payment_method: The payment_method of this Document.  # noqa: E501
        :type: PaymentMethod
        """

        self._payment_method = payment_method

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

        The document's gross total price.  # noqa: E501

        :return: The gross_total of this Document.  # noqa: E501
        :rtype: float
        """
        return self._gross_total

    @gross_total.setter
    def gross_total(self, gross_total):
        """Sets the gross_total of this Document.

        The document's gross total price.  # noqa: E501

        :param gross_total: The gross_total of this Document.  # noqa: E501
        :type: float
        """

        self._gross_total = gross_total

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


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

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


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

        self._currency = currency

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


        :return: The conversion_rate of this Document.  # noqa: E501
        :rtype: float
        """
        return self._conversion_rate

    @conversion_rate.setter
    def conversion_rate(self, conversion_rate):
        """Sets the conversion_rate of this Document.


        :param conversion_rate: The conversion_rate of this Document.  # noqa: E501
        :type: float
        """

        self._conversion_rate = conversion_rate

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


        :return: The invoice_date of this Document.  # noqa: E501
        :rtype: date
        """
        return self._invoice_date

    @invoice_date.setter
    def invoice_date(self, invoice_date):
        """Sets the invoice_date of this Document.


        :param invoice_date: The invoice_date of this Document.  # noqa: E501
        :type: date
        """

        self._invoice_date = invoice_date

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


        :return: The fulfillment_date of this Document.  # noqa: E501
        :rtype: date
        """
        return self._fulfillment_date

    @fulfillment_date.setter
    def fulfillment_date(self, fulfillment_date):
        """Sets the fulfillment_date of this Document.


        :param fulfillment_date: The fulfillment_date of this Document.  # noqa: E501
        :type: date
        """

        self._fulfillment_date = fulfillment_date

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


        :return: The due_date of this Document.  # noqa: E501
        :rtype: date
        """
        return self._due_date

    @due_date.setter
    def due_date(self, due_date):
        """Sets the due_date of this Document.


        :param due_date: The due_date of this Document.  # noqa: E501
        :type: date
        """

        self._due_date = due_date

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


        :return: The paid_date of this Document.  # noqa: E501
        :rtype: date
        """
        return self._paid_date

    @paid_date.setter
    def paid_date(self, paid_date):
        """Sets the paid_date of this Document.


        :param paid_date: The paid_date of this Document.  # noqa: E501
        :type: date
        """

        self._paid_date = paid_date

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


        :return: The organization of this Document.  # noqa: E501
        :rtype: DocumentOrganization
        """
        return self._organization

    @organization.setter
    def organization(self, organization):
        """Sets the organization of this Document.


        :param organization: The organization of this Document.  # noqa: E501
        :type: DocumentOrganization
        """

        self._organization = organization

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


        :return: The partner of this Document.  # noqa: E501
        :rtype: Partner
        """
        return self._partner

    @partner.setter
    def partner(self, partner):
        """Sets the partner of this Document.


        :param partner: The partner of this Document.  # noqa: E501
        :type: Partner
        """

        self._partner = partner

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


        :return: The document_partner of this Document.  # noqa: E501
        :rtype: DocumentPartner
        """
        return self._document_partner

    @document_partner.setter
    def document_partner(self, document_partner):
        """Sets the document_partner of this Document.


        :param document_partner: The document_partner of this Document.  # noqa: E501
        :type: DocumentPartner
        """

        self._document_partner = document_partner

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


        :return: The electronic of this Document.  # noqa: E501
        :rtype: bool
        """
        return self._electronic

    @electronic.setter
    def electronic(self, electronic):
        """Sets the electronic of this Document.


        :param electronic: The electronic of this Document.  # noqa: E501
        :type: bool
        """

        self._electronic = electronic

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


        :return: The comment of this Document.  # noqa: E501
        :rtype: str
        """
        return self._comment

    @comment.setter
    def comment(self, comment):
        """Sets the comment of this Document.


        :param comment: The comment of this Document.  # noqa: E501
        :type: str
        """

        self._comment = comment

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


        :return: The tags of this Document.  # noqa: E501
        :rtype: list[str]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this Document.


        :param tags: The tags of this Document.  # noqa: E501
        :type: list[str]
        """

        self._tags = tags

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


        :return: The notification_status of this Document.  # noqa: E501
        :rtype: DocumentNotificationStatus
        """
        return self._notification_status

    @notification_status.setter
    def notification_status(self, notification_status):
        """Sets the notification_status of this Document.


        :param notification_status: The notification_status of this Document.  # noqa: E501
        :type: DocumentNotificationStatus
        """

        self._notification_status = notification_status

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


        :return: The language of this Document.  # noqa: E501
        :rtype: DocumentLanguage
        """
        return self._language

    @language.setter
    def language(self, language):
        """Sets the language of this Document.


        :param language: The language of this Document.  # noqa: E501
        :type: DocumentLanguage
        """

        self._language = language

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


        :return: The items of this Document.  # noqa: E501
        :rtype: list[DocumentItem]
        """
        return self._items

    @items.setter
    def items(self, items):
        """Sets the items of this Document.


        :param items: The items of this Document.  # noqa: E501
        :type: list[DocumentItem]
        """

        self._items = items

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


        :return: The summary of this Document.  # noqa: E501
        :rtype: DocumentSummary
        """
        return self._summary

    @summary.setter
    def summary(self, summary):
        """Sets the summary of this Document.


        :param summary: The summary of this Document.  # noqa: E501
        :type: DocumentSummary
        """

        self._summary = summary

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


        :return: The settings of this Document.  # noqa: E501
        :rtype: DocumentSettings
        """
        return self._settings

    @settings.setter
    def settings(self, settings):
        """Sets the settings of this Document.


        :param settings: The settings of this Document.  # noqa: E501
        :type: DocumentSettings
        """

        self._settings = settings

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


        :return: The online_szamla_status of this Document.  # noqa: E501
        :rtype: OnlineSzamlaStatusEnum
        """
        return self._online_szamla_status

    @online_szamla_status.setter
    def online_szamla_status(self, online_szamla_status):
        """Sets the online_szamla_status of this Document.


        :param online_szamla_status: The online_szamla_status of this Document.  # noqa: E501
        :type: OnlineSzamlaStatusEnum
        """

        self._online_szamla_status = online_szamla_status

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


        :return: The related_documents of this Document.  # noqa: E501
        :rtype: list[DocumentAncestor]
        """
        return self._related_documents

    @related_documents.setter
    def related_documents(self, related_documents):
        """Sets the related_documents of this Document.


        :param related_documents: The related_documents of this Document.  # noqa: E501
        :type: list[DocumentAncestor]
        """

        self._related_documents = related_documents

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


        :return: The discount of this Document.  # noqa: E501
        :rtype: Discount
        """
        return self._discount

    @discount.setter
    def discount(self, discount):
        """Sets the discount of this Document.


        :param discount: The discount of this Document.  # noqa: E501
        :type: Discount
        """

        self._discount = discount

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


        :return: The correction_type of this Document.  # noqa: E501
        :rtype: CorrectionType
        """
        return self._correction_type

    @correction_type.setter
    def correction_type(self, correction_type):
        """Sets the correction_type of this Document.


        :param correction_type: The correction_type of this Document.  # noqa: E501
        :type: CorrectionType
        """

        self._correction_type = correction_type

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

        return self.__dict__ == other.__dict__

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