Package com.dzidzi.api
Interface OrderItemApi
public interface OrderItemApi
OrderItemApi contains all the api operations handling
OrderItem in the DzidziApp.-
Method Summary
Modifier and TypeMethodDescriptioncreateOrderItem(AddOrderItemRequest addOrderItemRequest) Adds/create a new order item.voiddeleteItem(UUID itemId) Deletes an order item by id.editOrderItem(ChangeOrderItemRequest changeOrderItemRequest) Changes an existing order item.findByOrderId(UUID orderId) Finds the list of all items by order id.findOrderItemById(UUID itemId) Finds an order item by idFinds the list of all order items.findOrderItemsByItemIds(List<UUID> itemIds) Finds a list of order items by given order item ids.
-
Method Details
-
findOrderItemById
Finds an order item by id- Parameters:
itemId- the item id- Returns:
- the order item found
- Throws:
com.dzidzi.exception.EntityNotFoundException- when the order item is not found
-
findOrderItemsByItemIds
Finds a list of order items by given order item ids.- Parameters:
itemIds- list of item ids- Returns:
- list of order items
- Throws:
com.dzidzi.exception.EntityNotFoundException- when the order item is not found
-
createOrderItem
Adds/create a new order item.- Parameters:
addOrderItemRequest- theAddOrderItemRequestcontaining the properties to create/add a new order item- Returns:
- the created order item
-
editOrderItem
Changes an existing order item.- Parameters:
changeOrderItemRequest- theChangeExtraRequestcontaining the properties to change the existing item- Returns:
- the updated order item
-
deleteItem
Deletes an order item by id.- Parameters:
itemId- the item id
-
findOrderItems
Finds the list of all order items.- Returns:
- the list of order items
-
findByOrderId
Finds the list of all items by order id.- Parameters:
orderId- the order id- Returns:
- the list of order items
-