# -*- coding: utf-8 -*-

"""
billbeeapi

This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
"""


class RechnungsdruckWebAppControllersApiSearchControllerOrderResult(object):

    """Implementation of the 'Rechnungsdruck.WebApp.Controllers.Api.SearchController.OrderResult' model.

    TODO: type model description here.

    Attributes:
        id (long|int): TODO: type description here.
        external_reference (string): TODO: type description here.
        buyer_name (string): TODO: type description here.
        invoice_number (string): TODO: type description here.
        customer_name (string): TODO: type description here.
        article_texts (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "id": 'Id',
        "external_reference": 'ExternalReference',
        "buyer_name": 'BuyerName',
        "invoice_number": 'InvoiceNumber',
        "customer_name": 'CustomerName',
        "article_texts": 'ArticleTexts'
    }

    def __init__(self,
                 id=None,
                 external_reference=None,
                 buyer_name=None,
                 invoice_number=None,
                 customer_name=None,
                 article_texts=None):
        """Constructor for the RechnungsdruckWebAppControllersApiSearchControllerOrderResult class"""

        # Initialize members of the class
        self.id = id
        self.external_reference = external_reference
        self.buyer_name = buyer_name
        self.invoice_number = invoice_number
        self.customer_name = customer_name
        self.article_texts = article_texts

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Creates an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """
        if dictionary is None:
            return None

        # Extract variables from the dictionary
        id = dictionary.get('Id')
        external_reference = dictionary.get('ExternalReference')
        buyer_name = dictionary.get('BuyerName')
        invoice_number = dictionary.get('InvoiceNumber')
        customer_name = dictionary.get('CustomerName')
        article_texts = dictionary.get('ArticleTexts')

        # Return an object of this model
        return cls(id,
                   external_reference,
                   buyer_name,
                   invoice_number,
                   customer_name,
                   article_texts)
