GetSourcesAssignedToStockOrderedByPriorityInterface.php 833 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\InventoryApi\Api;
  8. /**
  9. * Retrieve sources related to current stock ordered by priority
  10. *
  11. * Used fully qualified namespaces in annotations for proper work of WebApi request parser
  12. *
  13. * @api
  14. */
  15. interface GetSourcesAssignedToStockOrderedByPriorityInterface
  16. {
  17. /**
  18. * Get Sources assigned to Stock ordered by priority
  19. *
  20. * If Stock with given id doesn't exist then return an empty array
  21. *
  22. * @param int $stockId
  23. * @return \Magento\InventoryApi\Api\Data\SourceInterface[]
  24. * @throws \Magento\Framework\Exception\InputException
  25. * @throws \Magento\Framework\Exception\LocalizedException
  26. */
  27. public function execute(int $stockId): array;
  28. }