RmaShipmentRepositoryInterface.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Model\ResourceModel\Repository;
  6. use Magento\Framework\Api\SearchCriteriaInterface;
  7. use Magento\Framework\Exception\CouldNotDeleteException;
  8. use Magento\Framework\Exception\CouldNotSaveException;
  9. use Temando\Shipping\Model\ShipmentInterface;
  10. /**
  11. * Temando RMA Shipment Repository Interface.
  12. *
  13. * @package Temando\Shipping\Model
  14. * @author Sebastian Ertner <sebastian.ertner@netresearch.de>
  15. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  16. * @link http://www.temando.com/
  17. */
  18. interface RmaShipmentRepositoryInterface
  19. {
  20. /**
  21. * @param SearchCriteriaInterface $criteria
  22. * @return ShipmentInterface[]
  23. */
  24. public function getAddedShipments(SearchCriteriaInterface $criteria);
  25. /**
  26. * @param SearchCriteriaInterface $criteria
  27. * @return ShipmentInterface[]
  28. */
  29. public function getAvailableShipments(SearchCriteriaInterface $criteria);
  30. /**
  31. * Save external shipment IDs to be associated with core RMA entity.
  32. *
  33. * @param int $rmaId
  34. * @param string[] $shipmentIds
  35. * @return int Number of saved shipments
  36. * @throws CouldNotSaveException
  37. */
  38. public function saveShipmentIds($rmaId, array $shipmentIds);
  39. /**
  40. * Revoke assignment of external shipment IDs with core RMA entity.
  41. *
  42. * @param int $rmaId
  43. * @param string[] $shipmentIds
  44. * @return int Number of saved shipments
  45. * @throws CouldNotDeleteException
  46. */
  47. public function deleteShipmentIds($rmaId, array $shipmentIds);
  48. }