Beispiel #1
0
        private IRestRequest UpdateTaskAssignmentRequest(long projectId, long taskAssignmentId,
                                                         TaskAssignmentOptions options)
        {
            var request = Request($"{ProjectsResource}/{projectId}/{TaskAssignmentsAction}/{taskAssignmentId}", RestSharp.Method.PUT);

            request.AddBody(options);

            return(request);
        }
        /// <summary>
        /// Update a task assignment on a project. Makes a PUT and a GET request to the Projects/Task_Assignments resource.
        /// </summary>
        /// <param name="projectId">The ID of the project to update</param>
        /// <param name="taskAssignmentId">The ID of the task assignment to update</param>
        /// <param name="billable">Whether the task assignment is billable</param>
        /// <param name="deactivated">Whether the task assignment is inactive</param>
        /// <param name="hourlyRate">The hourly rate</param>
        /// <param name="budget">The budget</param>
        public TaskAssignment UpdateTaskAssignment(long projectId, long taskAssignmentId, bool?billable = null, bool?deactivated = null, decimal?hourlyRate = null, decimal?budget = null)
        {
            var options = new TaskAssignmentOptions()
            {
                Billable    = billable,
                Deactivated = deactivated,
                HourlyRate  = hourlyRate,
                Budget      = budget,
            };

            return(UpdateTaskAssignment(projectId, taskAssignmentId, options));
        }
Beispiel #3
0
        /// <summary>
        /// Update a task assignment on a project. Makes a PUT and a GET request to the Projects/Task_Assignments resource.
        /// </summary>
        /// <param name="projectId">The ID of the project to update</param>
        /// <param name="taskAssignmentId">The ID of the task assignment to update</param>
        /// <param name="options">The options to be updated</param>
        public Task <TaskAssignment> UpdateTaskAssignmentAsync(long projectId, long taskAssignmentId, TaskAssignmentOptions options)
        {
            var request = Request("projects/" + projectId + "/task_assignments/" + taskAssignmentId, Method.PUT);

            request.AddBody(options);

            return(ExecuteAsync <TaskAssignment>(request));
        }
Beispiel #4
0
 /// <summary>
 /// Update a task assignment on a project. Makes a PUT and a GET request to the Projects/Task_Assignments resource.
 /// </summary>
 /// <param name="projectId">The ID of the project to update</param>
 /// <param name="taskAssignmentId">The ID of the task assignment to update</param>
 /// <param name="options">The options to be updated</param>
 public async Task <TaskAssignment> UpdateTaskAssignmentAsync(long projectId, long taskAssignmentId, TaskAssignmentOptions options, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(await ExecuteAsync <TaskAssignment>(UpdateTaskAssignmentRequest(projectId, taskAssignmentId, options), cancellationToken));
 }
Beispiel #5
0
 /// <summary>
 /// Update a task assignment on a project. Makes a PUT and a GET request to the Projects/Task_Assignments resource.
 /// </summary>
 /// <param name="projectId">The ID of the project to update</param>
 /// <param name="taskAssignmentId">The ID of the task assignment to update</param>
 /// <param name="options">The options to be updated</param>
 public TaskAssignment UpdateTaskAssignment(long projectId, long taskAssignmentId, TaskAssignmentOptions options)
 {
     return(Execute <TaskAssignment>(UpdateTaskAssignmentRequest(projectId, taskAssignmentId, options)));
 }