QuoteCollectionPointRepositoryInterface.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\CollectionPointSearchResultInterface;
  11. use Temando\Shipping\Api\Data\Delivery\QuoteCollectionPointInterface;
  12. /**
  13. * @package Temando\Shipping\Model
  14. * @author Christoph Aßmann <christoph.assmann@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 QuoteCollectionPointRepositoryInterface
  19. {
  20. /**
  21. * Load collection point by entity id.
  22. *
  23. * @param int $entityId
  24. * @return QuoteCollectionPointInterface
  25. * @throws NoSuchEntityException
  26. */
  27. public function get($entityId);
  28. /**
  29. * Load selected collection point for given shipping address ID.
  30. *
  31. * @param int $addressId
  32. * @return QuoteCollectionPointInterface
  33. * @throws NoSuchEntityException
  34. */
  35. public function getSelected($addressId);
  36. /**
  37. * Save collection point.
  38. *
  39. * @param QuoteCollectionPointInterface $collectionPoint
  40. * @return QuoteCollectionPointInterface
  41. * @throws CouldNotSaveException
  42. */
  43. public function save(QuoteCollectionPointInterface $collectionPoint);
  44. /**
  45. * Delete collection point.
  46. *
  47. * @param QuoteCollectionPointInterface $collectionPoint
  48. * @return bool
  49. * @throws CouldNotDeleteException
  50. */
  51. public function delete(QuoteCollectionPointInterface $collectionPoint);
  52. /**
  53. * Load collection points.
  54. *
  55. * @param SearchCriteriaInterface $criteria
  56. * @return CollectionPointSearchResultInterface
  57. */
  58. public function getList(SearchCriteriaInterface $criteria);
  59. }