/// <summary> /// Create a new relation /// </summary> /// <param name="ID">Unique ID</param> /// <param name="body">Message-Body</param> /// <returns></returns> public ProjectHasProvider createProjectHasProvider(string ID, Provider body) { // create path and map variables var path = "/providers/{ID}/projectHasProviders".Replace("{format}","json").Replace("{" + "ID" + "}", apiClient.escapeString(ID.ToString())); // query params var queryParams = new Dictionary<String, String>(); var headerParams = new Dictionary<String, String>(); // verify required params are set if (ID == null ) { throw new ApiException(400, "missing required params"); } string paramStr = null; try { var response = apiClient.invokeAPI(path, "POST", queryParams, body, headerParams); if(response != null){ return (ProjectHasProvider) ApiClient.deserialize(response, typeof(ProjectHasProvider)); } else { return null; } } catch (ApiException ex) { if(ex.ErrorCode == 404) { return null; } else { throw ex; } } }
/// <summary> /// Create a new Provider /// </summary> /// <param name="body">Message-Body</param> /// <returns></returns> public Provider createProvider(Provider body) { // create path and map variables var path = "/providers".Replace("{format}","json"); // query params var queryParams = new Dictionary<String, String>(); var headerParams = new Dictionary<String, String>(); string paramStr = null; try { var response = apiClient.invokeAPI(path, "POST", queryParams, body, headerParams); if(response != null){ return (Provider) ApiClient.deserialize(response, typeof(Provider)); } else { return null; } } catch (ApiException ex) { if(ex.ErrorCode == 404) { return null; } else { throw ex; } } }