ShipmentItemRepositoryInterface.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Sales\Api;
  7. /**
  8. * Shipment item repository interface.
  9. *
  10. * A shipment is a delivery package that contains products. A shipment document accompanies the shipment. This
  11. * document lists the products and their quantities in the delivery package. A product is an item in a shipment.
  12. * @api
  13. * @since 100.0.2
  14. */
  15. interface ShipmentItemRepositoryInterface
  16. {
  17. /**
  18. * Lists shipment items that match specified search criteria.
  19. *
  20. * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria.
  21. * @return \Magento\Sales\Api\Data\ShipmentItemSearchResultInterface Shipment item search result interface.
  22. */
  23. public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
  24. /**
  25. * Loads a specified shipment item.
  26. *
  27. * @param int $id
  28. * @return \Magento\Sales\Api\Data\ShipmentItemInterface
  29. */
  30. public function get($id);
  31. /**
  32. * Deletes a specified shipment item.
  33. *
  34. * @param \Magento\Sales\Api\Data\ShipmentItemInterface $entity The shipment item.
  35. * @return bool
  36. * @throws \Magento\Framework\Exception\CouldNotDeleteException
  37. */
  38. public function delete(\Magento\Sales\Api\Data\ShipmentItemInterface $entity);
  39. /**
  40. * Performs persist operations for a specified shipment item.
  41. *
  42. * @param \Magento\Sales\Api\Data\ShipmentItemInterface $entity The shipment item.
  43. * @return \Magento\Sales\Api\Data\ShipmentItemInterface Shipment interface.
  44. * @throws \Magento\Framework\Exception\CouldNotSaveException
  45. */
  46. public function save(\Magento\Sales\Api\Data\ShipmentItemInterface $entity);
  47. }