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

"""
shelldatareportingapis

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""
from shelldatareportingapis.api_helper import APIHelper


class FeeItemSummaryAllOf0(object):

    """Implementation of the 'FeeItemSummaryAllOf0' model.

    TODO: type model description here.

    Attributes:
        fee_type_group (str): Fee type group in under which the Fee item is
            generated.
        fee_type_id (str): Fee Type Id ID  Description
        product_id (int): Product Id
        product_code (str): Product Code
        product_name (str): Product Name
        product_group_id (int): Product Group Id
        product_group_name (str): Product Group Name
        total_quantity (float): Total Quantity
        total_invoice_net_amount (float): Total Net amount in invoice currency
        total_invoice_gross_amount (float): Total Gross amount in invoice
            currency
        total_invoice_vat_amount (float): Total VAT amount in invoice currency
        invoice_currency_code (str): ISO 4217 currency code of the country
        invoice_currency_symbol (str): Currency symbol of the Invoice Currency
            Code

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "fee_type_group": 'FeeTypeGroup',
        "fee_type_id": 'FeeTypeId',
        "product_id": 'ProductId',
        "product_code": 'ProductCode',
        "product_name": 'ProductName',
        "product_group_id": 'ProductGroupId',
        "product_group_name": 'ProductGroupName',
        "total_quantity": 'TotalQuantity',
        "total_invoice_net_amount": 'TotalInvoiceNetAmount',
        "total_invoice_gross_amount": 'TotalInvoiceGrossAmount',
        "total_invoice_vat_amount": 'TotalInvoiceVATAmount',
        "invoice_currency_code": 'InvoiceCurrencyCode',
        "invoice_currency_symbol": 'InvoiceCurrencySymbol'
    }

    _optionals = [
        'fee_type_group',
        'fee_type_id',
        'product_id',
        'product_code',
        'product_name',
        'product_group_id',
        'product_group_name',
        'total_quantity',
        'total_invoice_net_amount',
        'total_invoice_gross_amount',
        'total_invoice_vat_amount',
        'invoice_currency_code',
        'invoice_currency_symbol',
    ]

    _nullables = [
        'fee_type_group',
        'fee_type_id',
        'product_id',
        'product_code',
        'product_name',
        'product_group_id',
        'product_group_name',
        'total_quantity',
        'total_invoice_net_amount',
        'total_invoice_gross_amount',
        'total_invoice_vat_amount',
        'invoice_currency_code',
        'invoice_currency_symbol',
    ]

    def __init__(self,
                 fee_type_group=APIHelper.SKIP,
                 fee_type_id=APIHelper.SKIP,
                 product_id=APIHelper.SKIP,
                 product_code=APIHelper.SKIP,
                 product_name=APIHelper.SKIP,
                 product_group_id=APIHelper.SKIP,
                 product_group_name=APIHelper.SKIP,
                 total_quantity=APIHelper.SKIP,
                 total_invoice_net_amount=APIHelper.SKIP,
                 total_invoice_gross_amount=APIHelper.SKIP,
                 total_invoice_vat_amount=APIHelper.SKIP,
                 invoice_currency_code=APIHelper.SKIP,
                 invoice_currency_symbol=APIHelper.SKIP):
        """Constructor for the FeeItemSummaryAllOf0 class"""

        # Initialize members of the class
        if fee_type_group is not APIHelper.SKIP:
            self.fee_type_group = fee_type_group 
        if fee_type_id is not APIHelper.SKIP:
            self.fee_type_id = fee_type_id 
        if product_id is not APIHelper.SKIP:
            self.product_id = product_id 
        if product_code is not APIHelper.SKIP:
            self.product_code = product_code 
        if product_name is not APIHelper.SKIP:
            self.product_name = product_name 
        if product_group_id is not APIHelper.SKIP:
            self.product_group_id = product_group_id 
        if product_group_name is not APIHelper.SKIP:
            self.product_group_name = product_group_name 
        if total_quantity is not APIHelper.SKIP:
            self.total_quantity = total_quantity 
        if total_invoice_net_amount is not APIHelper.SKIP:
            self.total_invoice_net_amount = total_invoice_net_amount 
        if total_invoice_gross_amount is not APIHelper.SKIP:
            self.total_invoice_gross_amount = total_invoice_gross_amount 
        if total_invoice_vat_amount is not APIHelper.SKIP:
            self.total_invoice_vat_amount = total_invoice_vat_amount 
        if invoice_currency_code is not APIHelper.SKIP:
            self.invoice_currency_code = invoice_currency_code 
        if invoice_currency_symbol is not APIHelper.SKIP:
            self.invoice_currency_symbol = invoice_currency_symbol 

    @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 not isinstance(dictionary, dict) or dictionary is None:
            return None

        # Extract variables from the dictionary
        fee_type_group = dictionary.get("FeeTypeGroup") if "FeeTypeGroup" in dictionary.keys() else APIHelper.SKIP
        fee_type_id = dictionary.get("FeeTypeId") if "FeeTypeId" in dictionary.keys() else APIHelper.SKIP
        product_id = dictionary.get("ProductId") if "ProductId" in dictionary.keys() else APIHelper.SKIP
        product_code = dictionary.get("ProductCode") if "ProductCode" in dictionary.keys() else APIHelper.SKIP
        product_name = dictionary.get("ProductName") if "ProductName" in dictionary.keys() else APIHelper.SKIP
        product_group_id = dictionary.get("ProductGroupId") if "ProductGroupId" in dictionary.keys() else APIHelper.SKIP
        product_group_name = dictionary.get("ProductGroupName") if "ProductGroupName" in dictionary.keys() else APIHelper.SKIP
        total_quantity = dictionary.get("TotalQuantity") if "TotalQuantity" in dictionary.keys() else APIHelper.SKIP
        total_invoice_net_amount = dictionary.get("TotalInvoiceNetAmount") if "TotalInvoiceNetAmount" in dictionary.keys() else APIHelper.SKIP
        total_invoice_gross_amount = dictionary.get("TotalInvoiceGrossAmount") if "TotalInvoiceGrossAmount" in dictionary.keys() else APIHelper.SKIP
        total_invoice_vat_amount = dictionary.get("TotalInvoiceVATAmount") if "TotalInvoiceVATAmount" in dictionary.keys() else APIHelper.SKIP
        invoice_currency_code = dictionary.get("InvoiceCurrencyCode") if "InvoiceCurrencyCode" in dictionary.keys() else APIHelper.SKIP
        invoice_currency_symbol = dictionary.get("InvoiceCurrencySymbol") if "InvoiceCurrencySymbol" in dictionary.keys() else APIHelper.SKIP
        # Return an object of this model
        return cls(fee_type_group,
                   fee_type_id,
                   product_id,
                   product_code,
                   product_name,
                   product_group_id,
                   product_group_name,
                   total_quantity,
                   total_invoice_net_amount,
                   total_invoice_gross_amount,
                   total_invoice_vat_amount,
                   invoice_currency_code,
                   invoice_currency_symbol)
