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

"""
shelldatareportingapis

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


class PricingCurrentVolume(object):

    """Implementation of the 'PricingCurrentVolume' model.

    TODO: type model description here.

    Attributes:
        fee_rule_id (int): Bonus or association bonus configuration identifier
            that is associated to the payer.
        fee_rule_description (str): Bonus or association bonus configuration
            description that is associated to the payer
        price_rule_id (int): Pricing current period Pricing Price Rule ID that
            is associated to the payer.
        price_rule_description (str): Pricing current period pricing rule
            description that is associated to the payer
        total_volume (float): Total volume consumption for the current period.
        next_fee_creation_date (str): Next Fee Rule Creation Date for that is
            associated to the payer. Format: YYYYMMDD

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "fee_rule_id": 'FeeRuleId',
        "fee_rule_description": 'FeeRuleDescription',
        "price_rule_id": 'PriceRuleID',
        "price_rule_description": 'PriceRuleDescription',
        "total_volume": 'TotalVolume',
        "next_fee_creation_date": 'NextFeeCreationDate'
    }

    _optionals = [
        'fee_rule_id',
        'fee_rule_description',
        'price_rule_id',
        'price_rule_description',
        'total_volume',
        'next_fee_creation_date',
    ]

    _nullables = [
        'fee_rule_id',
        'fee_rule_description',
        'price_rule_id',
        'price_rule_description',
        'total_volume',
        'next_fee_creation_date',
    ]

    def __init__(self,
                 fee_rule_id=APIHelper.SKIP,
                 fee_rule_description=APIHelper.SKIP,
                 price_rule_id=APIHelper.SKIP,
                 price_rule_description=APIHelper.SKIP,
                 total_volume=APIHelper.SKIP,
                 next_fee_creation_date=APIHelper.SKIP):
        """Constructor for the PricingCurrentVolume class"""

        # Initialize members of the class
        if fee_rule_id is not APIHelper.SKIP:
            self.fee_rule_id = fee_rule_id 
        if fee_rule_description is not APIHelper.SKIP:
            self.fee_rule_description = fee_rule_description 
        if price_rule_id is not APIHelper.SKIP:
            self.price_rule_id = price_rule_id 
        if price_rule_description is not APIHelper.SKIP:
            self.price_rule_description = price_rule_description 
        if total_volume is not APIHelper.SKIP:
            self.total_volume = total_volume 
        if next_fee_creation_date is not APIHelper.SKIP:
            self.next_fee_creation_date = next_fee_creation_date 

    @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_rule_id = dictionary.get("FeeRuleId") if "FeeRuleId" in dictionary.keys() else APIHelper.SKIP
        fee_rule_description = dictionary.get("FeeRuleDescription") if "FeeRuleDescription" in dictionary.keys() else APIHelper.SKIP
        price_rule_id = dictionary.get("PriceRuleID") if "PriceRuleID" in dictionary.keys() else APIHelper.SKIP
        price_rule_description = dictionary.get("PriceRuleDescription") if "PriceRuleDescription" in dictionary.keys() else APIHelper.SKIP
        total_volume = dictionary.get("TotalVolume") if "TotalVolume" in dictionary.keys() else APIHelper.SKIP
        next_fee_creation_date = dictionary.get("NextFeeCreationDate") if "NextFeeCreationDate" in dictionary.keys() else APIHelper.SKIP
        # Return an object of this model
        return cls(fee_rule_id,
                   fee_rule_description,
                   price_rule_id,
                   price_rule_description,
                   total_volume,
                   next_fee_creation_date)
