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

"""
shelldatareportingapis

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


class PricedTransSummaryResponseTransactionsSummaryItems(object):

    """Implementation of the 'PricedTransSummaryResponseTransactionsSummaryItems' model.

    TODO: type model description here.

    Attributes:
        product_id (int): Product Id
        product_code (str): Product Code  Examples:   10    TMF Charges  11   
            Tunnel/Bridges  12    Motorway toll  13    Ferries
        product_name (str): Product Name  Examples:   Unleaded - High octane 
            Unleaded - Medium octane  Unleaded - Low octane  Unleaded
            Environmental
        product_group_id (int): Product Group Id  Example:   1    Parent
            Product Group  2    All Fuels  3    Motor gasoline  4    2 stroke 
            5    Autogas  6    CNG
        product_group_name (str): Product Group Name  Example:   1    Parent
            Product Group  2    All Fuels  3    Motor gasoline  4    2 stroke 
            5    Autogas  6    CNG  7    Automotive Gas Oil
        site_group_id (int): Site Group Id Example: 202
        site_group_name (str): Site Group Name Example: CZ 9100 ECONOMY NETWORK
        total_fuel_quantity (int): Total Fuel Quantity
        total_net_amount (int): Total Net amount in invoice currency
        total_gross_amount (int): Total Gross amount in invoice currency
        invoice_currency_code (str): ISO currency code   Example: GBP
        invoice_currency_symbol (str): Currency symbol of the Invoice Currency
            Code   Example: £, $
        customer_retail_value_total_net (float): Sum of the retail net price
        customer_retail_value_total_gross (float): Sum of the retail gross
            price

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "product_id": 'ProductId',
        "product_code": 'ProductCode',
        "product_name": 'ProductName',
        "product_group_id": 'ProductGroupId',
        "product_group_name": 'ProductGroupName',
        "site_group_id": 'SiteGroupId',
        "site_group_name": 'SiteGroupName',
        "total_fuel_quantity": 'TotalFuelQuantity',
        "total_net_amount": 'TotalNetAmount',
        "total_gross_amount": 'TotalGrossAmount',
        "invoice_currency_code": 'InvoiceCurrencyCode',
        "invoice_currency_symbol": 'InvoiceCurrencySymbol',
        "customer_retail_value_total_net": 'CustomerRetailValueTotalNet',
        "customer_retail_value_total_gross": 'CustomerRetailValueTotalGross'
    }

    _optionals = [
        'product_id',
        'product_code',
        'product_name',
        'product_group_id',
        'product_group_name',
        'site_group_id',
        'site_group_name',
        'total_fuel_quantity',
        'total_net_amount',
        'total_gross_amount',
        'invoice_currency_code',
        'invoice_currency_symbol',
        'customer_retail_value_total_net',
        'customer_retail_value_total_gross',
    ]

    _nullables = [
        'product_id',
        'product_code',
        'product_name',
        'product_group_id',
        'product_group_name',
        'site_group_id',
        'site_group_name',
        'total_fuel_quantity',
        'total_net_amount',
        'total_gross_amount',
        'invoice_currency_code',
        'invoice_currency_symbol',
        'customer_retail_value_total_net',
        'customer_retail_value_total_gross',
    ]

    def __init__(self,
                 product_id=APIHelper.SKIP,
                 product_code=APIHelper.SKIP,
                 product_name=APIHelper.SKIP,
                 product_group_id=APIHelper.SKIP,
                 product_group_name=APIHelper.SKIP,
                 site_group_id=APIHelper.SKIP,
                 site_group_name=APIHelper.SKIP,
                 total_fuel_quantity=APIHelper.SKIP,
                 total_net_amount=APIHelper.SKIP,
                 total_gross_amount=APIHelper.SKIP,
                 invoice_currency_code=APIHelper.SKIP,
                 invoice_currency_symbol=APIHelper.SKIP,
                 customer_retail_value_total_net=APIHelper.SKIP,
                 customer_retail_value_total_gross=APIHelper.SKIP):
        """Constructor for the PricedTransSummaryResponseTransactionsSummaryItems class"""

        # Initialize members of the class
        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 site_group_id is not APIHelper.SKIP:
            self.site_group_id = site_group_id 
        if site_group_name is not APIHelper.SKIP:
            self.site_group_name = site_group_name 
        if total_fuel_quantity is not APIHelper.SKIP:
            self.total_fuel_quantity = total_fuel_quantity 
        if total_net_amount is not APIHelper.SKIP:
            self.total_net_amount = total_net_amount 
        if total_gross_amount is not APIHelper.SKIP:
            self.total_gross_amount = total_gross_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 
        if customer_retail_value_total_net is not APIHelper.SKIP:
            self.customer_retail_value_total_net = customer_retail_value_total_net 
        if customer_retail_value_total_gross is not APIHelper.SKIP:
            self.customer_retail_value_total_gross = customer_retail_value_total_gross 

    @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
        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
        site_group_id = dictionary.get("SiteGroupId") if "SiteGroupId" in dictionary.keys() else APIHelper.SKIP
        site_group_name = dictionary.get("SiteGroupName") if "SiteGroupName" in dictionary.keys() else APIHelper.SKIP
        total_fuel_quantity = dictionary.get("TotalFuelQuantity") if "TotalFuelQuantity" in dictionary.keys() else APIHelper.SKIP
        total_net_amount = dictionary.get("TotalNetAmount") if "TotalNetAmount" in dictionary.keys() else APIHelper.SKIP
        total_gross_amount = dictionary.get("TotalGrossAmount") if "TotalGrossAmount" 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
        customer_retail_value_total_net = dictionary.get("CustomerRetailValueTotalNet") if "CustomerRetailValueTotalNet" in dictionary.keys() else APIHelper.SKIP
        customer_retail_value_total_gross = dictionary.get("CustomerRetailValueTotalGross") if "CustomerRetailValueTotalGross" in dictionary.keys() else APIHelper.SKIP
        # Return an object of this model
        return cls(product_id,
                   product_code,
                   product_name,
                   product_group_id,
                   product_group_name,
                   site_group_id,
                   site_group_name,
                   total_fuel_quantity,
                   total_net_amount,
                   total_gross_amount,
                   invoice_currency_code,
                   invoice_currency_symbol,
                   customer_retail_value_total_net,
                   customer_retail_value_total_gross)
