QuotePickupLocationRepositoryInterface.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 Magento\Framework\Exception\NoSuchEntityException;
  10. use Temando\Shipping\Api\Data\Delivery\PickupLocationSearchResultInterface;
  11. use Temando\Shipping\Api\Data\Delivery\QuotePickupLocationInterface;
  12. /**
  13. * @package Temando\Shipping\Model
  14. * @author Sebastian Ertner <sebastian.ertner@netresearch.de>
  15. * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  16. * @link https://www.temando.com/
  17. */
  18. interface QuotePickupLocationRepositoryInterface
  19. {
  20. /**
  21. * Load pickup location by entity id.
  22. *
  23. * @param int $entityId
  24. * @return QuotePickupLocationInterface
  25. * @throws NoSuchEntityException
  26. */
  27. public function get($entityId);
  28. /**
  29. * Load selected pickup location for given shipping address ID.
  30. *
  31. * @param int $addressId
  32. * @return QuotePickupLocationInterface
  33. * @throws NoSuchEntityException
  34. */
  35. public function getSelected($addressId);
  36. /**
  37. * Save pickup location.
  38. *
  39. * @param QuotePickupLocationInterface $pickupLocation
  40. * @return QuotePickupLocationInterface
  41. * @throws CouldNotSaveException
  42. */
  43. public function save(QuotePickupLocationInterface $pickupLocation);
  44. /**
  45. * Delete pickup location.
  46. *
  47. * @param QuotePickupLocationInterface $pickupLocation
  48. * @return bool
  49. * @throws CouldNotDeleteException
  50. */
  51. public function delete(QuotePickupLocationInterface $pickupLocation);
  52. /**
  53. * Load collect locations.
  54. *
  55. * @param SearchCriteriaInterface $criteria
  56. * @return PickupLocationSearchResultInterface
  57. */
  58. public function getList(SearchCriteriaInterface $criteria);
  59. }