def update(task)
      validate_type!(task)
      params = extract_params!(task, :id)
      id = params[:id]

      attributes = sanitize(task)
      _, _, root = @client.put("/tasks/#{id}", attributes)

      Task.new(root[:data])
    end
def update(task)
      validate_type!(task)
      params = extract_params!(task, :id)
      id = params[:id]

      attributes = sanitize(task)
      _, _, root = @client.put("/tasks/#{id}", attributes)

      Task.new(root[:data])
    end
Update a task

 put '/tasks/{id}'

 Updates task information
 If the specified task does not exist, this query will return an error

 @param task [Task, Hash] Either object of the Task type or Hash. This object's attributes describe the object to be updated.
 @return [Task] The resulting object represting updated resource.