/// <summary> /// Sends a PUT to '/api/requirement/{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 UpdateExistingRequirement(string id, CreateOrUpdateRequirement model, string expand = null) { return new RestOperation("PUT", "api/requirement/" + id + "") { Content = model, QueryParams = { {"$expand", expand}, } }; }
/// <summary> /// Sends a POST to '/api/requirements' /// </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 static RestOperation CreateRequirement(CreateOrUpdateRequirement model, string expand = null) { return new RestOperation("POST", "api/requirements") { Content = model, QueryParams = { {"$expand", expand}, } }; }
partial void CopyExtraPropertiesToClone(CreateOrUpdateRequirement clone, bool includeLocalProperties);
public CreateOrUpdateRequirement Clone(bool includeLocalProperties) { var c = new CreateOrUpdateRequirement { AssignedToId = AssignedToId, ChangeComment = ChangeComment, Description = Description, DifficultyLevelId = DifficultyLevelId, EstimatedDuration = EstimatedDuration, FieldValues = FieldValues, Id = Id, Name = Name, Number = Number, OrderNumber = OrderNumber, PackageId = PackageId, ParentId = ParentId, PriorityId = PriorityId, StatusId = StatusId, TemporaryId = TemporaryId, TypeId = TypeId, WidgetValues = WidgetValues, }; CopyExtraPropertiesToClone(c, includeLocalProperties); return c; }
/// <summary> /// Sends a POST to '/api/requirements' (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<Requirement> CreateRequirementAsync(CreateOrUpdateRequirement model, string expand = null) { var operation = Operations.CreateRequirement(model, expand); var response = await _client.SendAsync(operation.BuildRequest(_client)); EnsureSuccess(response); var result = await response.Content.ReadAsAsync<Requirement>(); return result; }
/// <summary> /// Sends a PUT to '/api/requirement/{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 Requirement UpdateExistingRequirement(string id, CreateOrUpdateRequirement model, string expand = null) { var operation = Operations.UpdateExistingRequirement(id, model, expand); var response = _client.SendAsync(operation.BuildRequest(_client)).Result; EnsureSuccess(response); var result = response.Content.ReadAsAsync<Requirement>().Result; return result; }