/** * Deletes the provided entity on the server, then updates the Collection object by calling * fetch(). Executes synchronously. * * @param entity an Entity object that contains a 'type' and 'uuid' property */ public ApiResponse destroyEntity(Entity entity) { ApiResponse response = entity.destroy(); if (response.getError() != null) { this.client.writeLog("Could not destroy entity."); } else { response = this.fetch(); } return response; }