class Attio::Task
def destroy(**opts)
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