Package com.dzidzi.api
Interface MenuApi
public interface MenuApi
MenuApi contains all the api operations handling
Menu in the DzidziApp.-
Method Summary
Modifier and TypeMethodDescriptioncom.dzidzi.job.dto.JobbulkAddMenuJob(com.dzidzi.job.dto.MenuJobRequest menuJobRequest) An async job is triggered to make bulk addition of menuscreateMenu(AddMenuRequest addMenuRequest) Adds/create a new menu by the logged in restaurant user.voiddeleteMenu(UUID menuId) Removes an extra by extra id and logged in restaurant.com.dzidzi.job.dto.JobdisableMenusVisibilityJob(List<UUID> menuIds) An async job that disabled the visibility of bulk menus to users.voiddisableMenuVisibility(UUID menuId) A menu is disabled to be invisible to users.editMenu(ChangeMenuRequest changeMenuRequest) Changes a field/all fields of an existing extra.com.dzidzi.job.dto.JobenableMenusVisibilityJob(List<UUID> menuIds) An async job that enables the visibility of bulk extras to users.voidenableMenuVisibility(UUID menuId) An menu is enabled to be visible by users.findMenuById(UUID menuId) Finds a menu by id.findMenus(FindMenuRequest findMenuRequest) The paged results of the provided request.
-
Method Details
-
findMenuById
Finds a menu by id.- Parameters:
menuId- the id of the menu- Returns:
- the menu found
- Throws:
com.dzidzi.exception.EntityNotFoundException- when the menu is not found
-
deleteMenu
Removes an extra by extra id and logged in restaurant. You can only delete a restaurant only if you are logged in asUserRole.RESTAURANT_ADMINorUserRole.RESTAURANT_BRANCHand the extra belongs to the logged in restaurant.- Parameters:
menuId- the id of the menu
-
bulkAddMenuJob
com.dzidzi.job.dto.Job bulkAddMenuJob(com.dzidzi.job.dto.MenuJobRequest menuJobRequest) An async job is triggered to make bulk addition of menus- Parameters:
menuJobRequest- the request body- Returns:
- the
Job
-
enableMenusVisibilityJob
An async job that enables the visibility of bulk extras to users.- Parameters:
menuIds- the menu ids to enable- Returns:
- the
Job
-
disableMenusVisibilityJob
An async job that disabled the visibility of bulk menus to users.- Parameters:
menuIds- the menu ids to disable- Returns:
- the
Job
-
enableMenuVisibility
An menu is enabled to be visible by users.- Parameters:
menuId- the menu id to enable
-
disableMenuVisibility
A menu is disabled to be invisible to users.- Parameters:
menuId- the menu id to disable
-