@classmethod
def _from_dict(cls, _dict):
    """Initialize a ConsumptionPreferences object from a json dictionary."""
    args = {}
    if 'consumption_preference_id' in _dict:
        args['consumption_preference_id'] = _dict.get(
            'consumption_preference_id')
    else:
        raise ValueError(
            "Required property 'consumption_preference_id' not present in ConsumptionPreferences JSON"
            )
    if 'name' in _dict:
        args['name'] = _dict.get('name')
    else:
        raise ValueError(
            "Required property 'name' not present in ConsumptionPreferences JSON"
            )
    if 'score' in _dict:
        args['score'] = _dict.get('score')
    else:
        raise ValueError(
            "Required property 'score' not present in ConsumptionPreferences JSON"
            )
    return cls(**args)
