示例#1
0
        /// <summary>
        /// Update an user assignment on a project. Makes a PUT and a GET request to the Projects/User_Assignments resource.
        /// </summary>
        /// <param name="projectId">The ID of the project to update</param>
        /// <param name="userAssignmentId">The ID of the user assignment to update</param>
        /// <param name="userId">The ID of the user assigned</param>
        /// <param name="deactivated">Whether the user assignment is inactive</param>
        /// <param name="hourlyRate">The hourly rate</param>
        /// <param name="budget">The budget</param>
        /// <param name="isProjectManager">Whether this user is a project manager</param>
        public UserAssignment UpdateUserAssignment(long projectId, long userAssignmentId, long userId, bool? deactivated = null, decimal? hourlyRate = null, decimal? budget = null, bool? isProjectManager = null)
        {
            var options = new UserAssignmentOptions()
            {
                UserId = userId,
                ProjectId = projectId,
                Deactivated = deactivated,
                HourlyRate = hourlyRate,
                Budget = budget,
                IsProjectManager = isProjectManager
            };

            return UpdateUserAssignment(projectId, userAssignmentId, options);
        }
示例#2
0
        /// <summary>
        /// Updates an user assignment on a project. Makes a PUT and a GET request to the Projects/User_Assignments resource.
        /// </summary>
        /// <param name="projectId">The ID of the project to update</param>
        /// <param name="userAssignmentId">The ID of the user assignment to update</param>
        /// <param name="options">The options to be updated</param>
        public UserAssignment UpdateUserAssignment(long projectId, long userAssignmentId, UserAssignmentOptions options)
        {
            var request = Request("projects/" + projectId + "/user_assignments/" + userAssignmentId, RestSharp.Method.PUT);

            request.AddBody(options);

            return Execute<UserAssignment>(request);
        }