InventoryRequestInterface.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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\InventorySourceSelectionApi\Api\Data;
  8. /**
  9. * Request products in a given Qty and StockId
  10. *
  11. * @api
  12. */
  13. interface InventoryRequestInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  14. {
  15. /**
  16. * Get Stock Id
  17. *
  18. * @return int
  19. */
  20. public function getStockId(): int;
  21. /**
  22. * Get Items
  23. *
  24. * @return \Magento\InventorySourceSelectionApi\Api\Data\ItemRequestInterface[]
  25. */
  26. public function getItems(): array;
  27. /**
  28. * Set Stock Id
  29. *
  30. * @param int $stockId
  31. * @return void
  32. */
  33. public function setStockId(int $stockId): void;
  34. /**
  35. * Set Items
  36. *
  37. * @param \Magento\InventorySourceSelectionApi\Api\Data\ItemRequestInterface[] $items
  38. * @return void
  39. */
  40. public function setItems(array $items): void;
  41. /**
  42. * Retrieve existing extension attributes object
  43. *
  44. * @return \Magento\InventorySourceSelectionApi\Api\Data\InventoryRequestExtensionInterface|null
  45. */
  46. public function getExtensionAttributes(): ?InventoryRequestExtensionInterface;
  47. /**
  48. * Set an extension attributes object
  49. *
  50. * @param \Magento\InventorySourceSelectionApi\Api\Data\InventoryRequestExtensionInterface $extensionAttributes
  51. * @return void
  52. */
  53. public function setExtensionAttributes(
  54. \Magento\InventorySourceSelectionApi\Api\Data\InventoryRequestExtensionInterface $extensionAttributes
  55. ): void;
  56. }