ShipmentTrackRepositoryInterface.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 track 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 ShipmentTrackRepositoryInterface
  16. {
  17. /**
  18. * Lists shipment tracks that match specified search criteria.
  19. *
  20. * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria.
  21. * @return \Magento\Sales\Api\Data\ShipmentTrackSearchResultInterface Shipment track search result interface.
  22. */
  23. public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
  24. /**
  25. * Loads a specified shipment track.
  26. *
  27. * @param int $id The shipment track ID.
  28. * @return \Magento\Sales\Api\Data\ShipmentTrackInterface Shipment track interface.
  29. */
  30. public function get($id);
  31. /**
  32. * Deletes a specified shipment track.
  33. *
  34. * @param \Magento\Sales\Api\Data\ShipmentTrackInterface $entity The shipment track.
  35. * @return bool
  36. * @throws \Magento\Framework\Exception\CouldNotDeleteException
  37. */
  38. public function delete(\Magento\Sales\Api\Data\ShipmentTrackInterface $entity);
  39. /**
  40. * Performs persist operations for a specified shipment track.
  41. *
  42. * @param \Magento\Sales\Api\Data\ShipmentTrackInterface $entity The shipment track.
  43. * @return \Magento\Sales\Api\Data\ShipmentTrackInterface Shipment track interface.
  44. * @throws \Magento\Framework\Exception\CouldNotSaveException
  45. */
  46. public function save(\Magento\Sales\Api\Data\ShipmentTrackInterface $entity);
  47. /**
  48. * Deletes a specified shipment track by ID.
  49. *
  50. * @param int $id The shipment track ID.
  51. * @return bool
  52. * @throws \Magento\Framework\Exception\CouldNotDeleteException
  53. */
  54. public function deleteById($id);
  55. }