/// <summary> /// Get the details of a project. /// </summary> /// <param name="project_id">The project_id is the identifier of the project.</param> /// <returns>Project object.</returns> public Project Get(string project_id) { var url = baseAddress + "/" + project_id; var responce = ZohoHttpClient.get(url, getQueryParameters()); return(ProjectParser.getProject(responce)); }
/// <summary> /// Creates a project for the customer. /// </summary> /// <param name="new_project_info"> /// The new_project_info is the Projrct object with /// project_name,customer_id,billing_type,user_id,task_name as mandatory attributes. /// </param> /// <returns>Project object.</returns> public Project Create(Project new_project_info) { var url = baseAddress; var json = JsonConvert.SerializeObject(new_project_info); var jsonstring = new Dictionary <object, object>(); jsonstring.Add("JSONString", json); var responce = ZohoHttpClient.post(url, getQueryParameters(jsonstring)); return(ProjectParser.getProject(responce)); }
/// <summary> /// Clones the project. /// </summary> /// <param name="project_id">The project_id is the identifier of the project.</param> /// <param name="clone_details"> /// The clone_details is the Project object which contains the project details which has to be /// cloned with project_name as mandatory attribute. /// </param> /// <returns>Project object.</returns> public Project Clone(string project_id, Project clone_details) { var url = baseAddress + "/" + project_id + "/clone"; var json = JsonConvert.SerializeObject(clone_details); var jsonstring = new Dictionary <object, object>(); jsonstring.Add("JSONString", json); var responce = ZohoHttpClient.post(url, getQueryParameters(jsonstring)); return(ProjectParser.getProject(responce)); }
/// <summary> /// Update details of a project. /// </summary> /// <param name="project_id">The project_id is the identifier of the project.</param> /// <param name="update_info">The update_info is the Project object which contains the updation information.</param> /// <returns>Project object.</returns> public Project Update(string project_id, Project update_info) { var url = baseAddress + "/" + project_id; var json = JsonConvert.SerializeObject(update_info); var jsonstring = new Dictionary <object, object>(); jsonstring.Add("JSONString", json); var responce = ZohoHttpClient.put(url, getQueryParameters(jsonstring)); return(ProjectParser.getProject(responce)); }