class Attio::Task

def destroy(**opts)

Override destroy to use the correct task ID
def destroy(**opts)
  raise InvalidRequestError, "Cannot destroy a task without an ID" unless persisted?
  task_id = extract_task_id
  self.class.send(:execute_request, :DELETE, "#{self.class.resource_path}/#{task_id}", {}, opts)
  @attributes.clear
  @changed_attributes.clear
  @id = nil
  true
end