def METHOD_NAME(self, category, endpoint):
    # wraps mandatory and optional params in one js Object
    query_string_params = False
    mandatory_params = self.get_mandatory_query_params(endpoint)
    if self.has_params_object(endpoint):
        if len(mandatory_params) > 0:
            query_string_params = f'{{{", ".join(mandatory_params) if len(mandatory_params) > 1 else mandatory_params[0]}, ...params}}'
        else:
            query_string_params = f'params'
    else:
        if len(mandatory_params) > 0:
            query_string_params = f'{"{{" + ", ".join(mandatory_params) + "}}" if len(mandatory_params) > 1 else mandatory_params[0]}'
    endpoint_method_args = ", ".join(s for s in [
        f'"{self.get_endpoint_category()}"',
        self.get_endpoint_id1() if self.get_endpoint_id1() else "null",
        f'"{self.get_endpoint_subcategory()}"' if self.subcategory else "null",
        self.get_endpoint_id2() if self.get_endpoint_id2() else "null",
        f'"{self.get_endpoint_action()}"' if self.get_endpoint_action() else "null",
        "data" if self.has_body() else False,
        query_string_params
    ] if s)
    return (f' {self.get_method_doc(endpoint)}'
            f'    {self.camelCase(self.get_method_name(endpoint, category))}({self.get_method_args(endpoint)}) {{\n'
            f'        return this._{self.get_endpoint_method(endpoint).lower()}({endpoint_method_args});\n'
            f'    }}\n')