ShipmentRepositoryInterface.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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\Exception\CouldNotDeleteException;
  7. use Magento\Framework\Exception\LocalizedException;
  8. use Temando\Shipping\Model\ShipmentInterface;
  9. /**
  10. * Temando Shipment Repository Interface.
  11. *
  12. * A shipment entity is registered at the Temando platform in order to create
  13. * shipping labels and other documentation. A reference to the external shipment
  14. * is stored locally.
  15. *
  16. * This interface can be used to retrieve shipment details and tracking
  17. * information from the Temando platform.
  18. *
  19. * @package Temando\Shipping\Model
  20. * @author Christoph Aßmann <christoph.assmann@netresearch.de>
  21. * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  22. * @link https://www.temando.com/
  23. */
  24. interface ShipmentRepositoryInterface
  25. {
  26. /**
  27. * Load external shipment entity from platform.
  28. *
  29. * @param string $shipmentId
  30. * @return ShipmentInterface
  31. * @throws LocalizedException
  32. */
  33. public function getById(string $shipmentId): ShipmentInterface;
  34. /**
  35. * Cancel external shipment at the platform.
  36. *
  37. * @param string $shipmentId
  38. * @return ShipmentInterface
  39. * @throws CouldNotDeleteException
  40. */
  41. public function cancel(string $shipmentId): ShipmentInterface;
  42. }