/// <summary> /// Allows for the REST API to delete a category from the store /// </summary> /// <param name="parameters"> /// Parameters passed in the URL of the REST API call. A single parameter (category ID/bvin) is /// expected. /// </param> /// <param name="querystring">Name/value pairs from the REST API call querystring. Not used in this method.</param> /// <param name="postdata">This parameter is not used in this method</param> /// <returns> /// String - a JSON representation of the Errors/Content to return. Content will contain either True or False, /// depending on success of the deletion /// </returns> public override string DeleteAction(string parameters, NameValueCollection querystring, string postdata) { var data = string.Empty; var bvin = FirstParameter(parameters); var response = new ApiResponse <bool>(); if (bvin == string.Empty) { // Clear Requested response.Content = HccApp.DestroyAllCategories(); } else { // Single Item Delete response.Content = HccApp.CatalogServices.Categories.Delete(bvin); } data = Json.ObjectToJson(response); return(data); }