Interface OrderItemApi


public interface OrderItemApi
OrderItemApi contains all the api operations handling OrderItem in the DzidziApp.
  • Method Details

    • findOrderItemById

      OrderItem findOrderItemById(UUID itemId)
      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

      List<OrderItem> findOrderItemsByItemIds(List<UUID> itemIds)
      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

      OrderItem createOrderItem(AddOrderItemRequest addOrderItemRequest)
      Adds/create a new order item.
      Parameters:
      addOrderItemRequest - the AddOrderItemRequest containing the properties to create/add a new order item
      Returns:
      the created order item
    • editOrderItem

      OrderItem editOrderItem(ChangeOrderItemRequest changeOrderItemRequest)
      Changes an existing order item.
      Parameters:
      changeOrderItemRequest - the ChangeExtraRequest containing the properties to change the existing item
      Returns:
      the updated order item
    • deleteItem

      void deleteItem(UUID itemId)
      Deletes an order item by id.
      Parameters:
      itemId - the item id
    • findOrderItems

      List<OrderItem> findOrderItems()
      Finds the list of all order items.
      Returns:
      the list of order items
    • findByOrderId

      List<OrderItem> findByOrderId(UUID orderId)
      Finds the list of all items by order id.
      Parameters:
      orderId - the order id
      Returns:
      the list of order items