'delete( self, trans, encoded_folder_id, **kwd )
* DELETE /api/folders/{encoded_folder_id}
marks the folder with the given ``encoded_folder_id`` as `deleted` (or removes the `deleted` mark if the `undelete` param is true)
.. note:: Currently, only admin users can un/delete folders.
:param  encoded_folder_id:     the encoded id of the folder to un/delete
:type   encoded_folder_id:     an encoded id string
:param  undelete:    (optional) flag specifying whether the item should be deleted or undeleted, defaults to false:
:type   undelete:    bool
:returns:   detailed folder information
:rtype:     dictionary'

@expose_api
def delete(self, trans, encoded_folder_id, **kwd):

    folder = self.folder_manager.get(trans, self.folder_manager.cut_and_decode(trans, encoded_folder_id), True)
    undelete = util.string_as_bool(kwd.get('undelete', False))
    folder = self.folder_manager.delete(trans, folder, undelete)
    folder_dict = self.folder_manager.get_folder_dict(trans, folder)
    return folder_dict
