ShipmentRepositoryInterface.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 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.
  12. * @api
  13. * @since 100.0.2
  14. */
  15. interface ShipmentRepositoryInterface
  16. {
  17. /**
  18. * Lists shipments that match specified search criteria.
  19. *
  20. * This call returns an array of objects, but detailed information about each object’s attributes might not be
  21. * included. See https://devdocs.magento.com/codelinks/attributes.html#ShipmentRepositoryInterface to
  22. * determine which call to use to get detailed information about all attributes for an object.
  23. *
  24. * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria.
  25. * @return \Magento\Sales\Api\Data\ShipmentSearchResultInterface Shipment search results interface.
  26. */
  27. public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
  28. /**
  29. * Loads a specified shipment.
  30. *
  31. * @param int $id The shipment ID.
  32. * @return \Magento\Sales\Api\Data\ShipmentInterface
  33. */
  34. public function get($id);
  35. /**
  36. * Deletes a specified shipment.
  37. *
  38. * @param \Magento\Sales\Api\Data\ShipmentInterface $entity The shipment.
  39. * @return bool
  40. */
  41. public function delete(\Magento\Sales\Api\Data\ShipmentInterface $entity);
  42. /**
  43. * Performs persist operations for a specified shipment.
  44. *
  45. * @param \Magento\Sales\Api\Data\ShipmentInterface $entity The shipment.
  46. * @return \Magento\Sales\Api\Data\ShipmentInterface Shipment interface.
  47. */
  48. public function save(\Magento\Sales\Api\Data\ShipmentInterface $entity);
  49. /**
  50. * Creates new shipment instance.
  51. *
  52. * @return \Magento\Sales\Api\Data\ShipmentInterface Shipment interface.
  53. */
  54. public function create();
  55. }