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

"""
billbeeapi

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


class BillbeeInterfacesBillbeeAPIModelBomSubArticleApiModel(object):

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

    TODO: type model description here.

    Attributes:
        amount (float): TODO: type description here.
        article_id (long|int): TODO: type description here.
        sku (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "amount": 'Amount',
        "article_id": 'ArticleId',
        "sku": 'SKU'
    }

    def __init__(self,
                 amount=None,
                 article_id=None,
                 sku=None):
        """Constructor for the BillbeeInterfacesBillbeeAPIModelBomSubArticleApiModel class"""

        # Initialize members of the class
        self.amount = amount
        self.article_id = article_id
        self.sku = sku

    @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
        amount = dictionary.get('Amount')
        article_id = dictionary.get('ArticleId')
        sku = dictionary.get('SKU')

        # Return an object of this model
        return cls(amount,
                   article_id,
                   sku)
