/// <summary> /// Sends a PUT to '/api/project/{id}' /// </summary> /// <param name="id">a path parameter (no description)</param> /// <param name="model">a body parameter (no description)</param> /// <param name="expand">a query parameter (Allows the specifying of eager-loading of related data which is returned in-line within the results of the request.)</param> /// <returns></returns> public static RestOperation UpdateProject(string id, CreateOrUpdateProject model, string expand = null) { return new RestOperation("PUT", "api/project/" + id + "") { Content = model, QueryParams = { {"$expand", expand}, } }; }
partial void CopyExtraPropertiesToClone(CreateOrUpdateProject clone, bool includeLocalProperties);
/// <summary> /// Sends a POST to '/api/projects' (asynchronous) /// </summary> /// <param name="model">a body parameter (no description)</param> /// <param name="expand">a query parameter (Allows the specifying of eager-loading of related data which is returned in-line within the results of the request.)</param> /// <returns></returns> public virtual async Task<Project> CreateProjectAsync(CreateOrUpdateProject model, string expand = null) { var operation = Operations.CreateProject(model, expand); var response = await _client.SendAsync(operation.BuildRequest(_client)); EnsureSuccess(response); var result = await response.Content.ReadAsAsync<Project>(); return result; }
public CreateOrUpdateProject Clone(bool includeLocalProperties) { var c = new CreateOrUpdateProject { AutoNumberRequirements = AutoNumberRequirements, AutoNumberScripts = AutoNumberScripts, Description = Description, EstimatedEndDate = EstimatedEndDate, Id = Id, Independent = Independent, ManagerId = ManagerId, Name = Name, OrderNumber = OrderNumber, OrganisationId = OrganisationId, ProjectCategoryId = ProjectCategoryId, RequirementNumberReadOnly = RequirementNumberReadOnly, ScriptNumberReadOnly = ScriptNumberReadOnly, Slug = Slug, StartDate = StartDate, TemplateId = TemplateId, TimeTrackingConfiguration = TimeTrackingConfiguration, }; CopyExtraPropertiesToClone(c, includeLocalProperties); return c; }
/// <summary> /// Sends a PUT to '/api/project/{id}' /// </summary> /// <param name="id">a path parameter (no description)</param> /// <param name="model">a body parameter (no description)</param> /// <param name="expand">a query parameter (Allows the specifying of eager-loading of related data which is returned in-line within the results of the request.)</param> /// <returns></returns> public virtual Project UpdateProject(string id, CreateOrUpdateProject model, string expand = null) { var operation = Operations.UpdateProject(id, model, expand); var response = _client.SendAsync(operation.BuildRequest(_client)).Result; EnsureSuccess(response); var result = response.Content.ReadAsAsync<Project>().Result; return result; }