@staticmethod
def _add_boolean_param_by_name(req_dict, param_name, param_value):
    """
        Adds the specified boolean parameter to the dictionary

        :param req_dict: The dictionary
        :param param_name: The name of the parameter
        :param param_value: The value for the parameter
        :raises ValueError: if the param_value cannot be coerced into a boolean
        """
    if param_value is not None:
        param_value_as_lowercase_string = str(param_value).lower()
        if param_value_as_lowercase_string not in ('true', 'false'):
            raise ValueError('%s must be true or false, found: %s' % (
                param_name, param_value))
        req_dict[param_name] = param_value_as_lowercase_string
