GuestCartCollectionPointManagementInterface.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Api\Checkout;
  6. use Magento\Framework\Exception\CouldNotDeleteException;
  7. use Magento\Framework\Exception\CouldNotSaveException;
  8. use Temando\Shipping\Api\Data\Delivery\CollectionPointSearchRequestInterface;
  9. /**
  10. * Process "collection point" delivery option (guest checkout).
  11. *
  12. * @api
  13. * @package Temando\Shipping\Api
  14. * @author Benjamin Heuer <benjamin.heuer@netresearch.de>
  15. * @author Christoph Aßmann <christoph.assmann@netresearch.de>
  16. * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  17. * @link https://www.temando.com/
  18. */
  19. interface GuestCartCollectionPointManagementInterface
  20. {
  21. /**
  22. * Save a customer's search for collection points.
  23. *
  24. * @param string $cartId
  25. * @param string $countryId
  26. * @param string $postcode
  27. * @return \Temando\Shipping\Api\Data\Delivery\CollectionPointSearchRequestInterface
  28. * @throws CouldNotSaveException
  29. */
  30. public function saveSearchRequest(
  31. string $cartId,
  32. string $countryId,
  33. string $postcode
  34. ): CollectionPointSearchRequestInterface;
  35. /**
  36. * Delete a customer's search for collection points.
  37. *
  38. * @param string $cartId
  39. * @return bool
  40. * @throws CouldNotDeleteException
  41. */
  42. public function deleteSearchRequest(string $cartId): bool;
  43. /**
  44. * Retrieve collection points matching the customer's search parameters.
  45. *
  46. * @param string $cartId
  47. * @return \Temando\Shipping\Api\Data\Delivery\QuoteCollectionPointInterface[]
  48. */
  49. public function getCollectionPoints(string $cartId): array;
  50. /**
  51. * Select a given collection point for checkout.
  52. *
  53. * @param string $cartId
  54. * @param string $collectionPointId
  55. * @return bool
  56. * @throws CouldNotSaveException
  57. */
  58. public function selectCollectionPoint(string $cartId, string $collectionPointId): bool;
  59. }