/// <summary> /// Create a new relation /// </summary> /// <param name="ID">Unique ID</param> /// <param name="body">Message-Body</param> /// <returns></returns> public ServiceHasBusinessObject createServiceHasBusinessObject(string ID, BusinessObject body) { // create path and map variables var path = "/businessObjects/{ID}/serviceHasBusinessObjects".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 (ServiceHasBusinessObject) ApiClient.deserialize(response, typeof(ServiceHasBusinessObject)); } else { return null; } } catch (ApiException ex) { if(ex.ErrorCode == 404) { return null; } else { throw ex; } } }
/// <summary> /// Create a new Data Object /// </summary> /// <param name="body">Message-Body</param> /// <returns></returns> public BusinessObject createBusinessObject(BusinessObject body) { // create path and map variables var path = "/businessObjects".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 (BusinessObject) ApiClient.deserialize(response, typeof(BusinessObject)); } else { return null; } } catch (ApiException ex) { if(ex.ErrorCode == 404) { return null; } else { throw ex; } } }