StockResolverInterface.php 683 B

1234567891011121314151617181920212223242526
  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\InventorySalesApi\Api;
  8. /**
  9. * The stock resolver is responsible for getting the linked stock for a certain sales channel
  10. *
  11. * @api
  12. */
  13. interface StockResolverInterface
  14. {
  15. /**
  16. * Resolve Stock by Sales Channel type and code
  17. *
  18. * @param string $type
  19. * @param string $code
  20. * @throws \Magento\Framework\Exception\NoSuchEntityException
  21. * @return \Magento\InventoryApi\Api\Data\StockInterface
  22. */
  23. public function execute(string $type, string $code): \Magento\InventoryApi\Api\Data\StockInterface;
  24. }