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

"""
billbeeapi

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


class BillbeeInterfacesBillbeeAPIModelStockArticleApiModel(object):

    """Implementation of the 'Billbee.Interfaces.BillbeeAPI.Model.StockArticleApiModel' model.

    TODO: type model description here.

    Attributes:
        name (string): TODO: type description here.
        stock_id (int): TODO: type description here.
        stock_current (float): TODO: type description here.
        stock_warning (float): TODO: type description here.
        stock_code (string): TODO: type description here.
        unfulfilled_amount (float): TODO: type description here.
        stock_desired (float): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "name": 'Name',
        "stock_id": 'StockId',
        "stock_current": 'StockCurrent',
        "stock_warning": 'StockWarning',
        "stock_code": 'StockCode',
        "unfulfilled_amount": 'UnfulfilledAmount',
        "stock_desired": 'StockDesired'
    }

    def __init__(self,
                 name=None,
                 stock_id=None,
                 stock_current=None,
                 stock_warning=None,
                 stock_code=None,
                 unfulfilled_amount=None,
                 stock_desired=None):
        """Constructor for the BillbeeInterfacesBillbeeAPIModelStockArticleApiModel class"""

        # Initialize members of the class
        self.name = name
        self.stock_id = stock_id
        self.stock_current = stock_current
        self.stock_warning = stock_warning
        self.stock_code = stock_code
        self.unfulfilled_amount = unfulfilled_amount
        self.stock_desired = stock_desired

    @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
        name = dictionary.get('Name')
        stock_id = dictionary.get('StockId')
        stock_current = dictionary.get('StockCurrent')
        stock_warning = dictionary.get('StockWarning')
        stock_code = dictionary.get('StockCode')
        unfulfilled_amount = dictionary.get('UnfulfilledAmount')
        stock_desired = dictionary.get('StockDesired')

        # Return an object of this model
        return cls(name,
                   stock_id,
                   stock_current,
                   stock_warning,
                   stock_code,
                   unfulfilled_amount,
                   stock_desired)
