Ejemplo n.º 1
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="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);
        }
Ejemplo n.º 2
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)
        {
            var request = Request("projects/" + projectId + "/task_assignments/" + taskAssignmentId, RestSharp.Method.PUT);

            request.AddBody(options);

            return Execute<TaskAssignment>(request);
        }