StockInterface.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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\Data;
  8. /**
  9. * Represents product aggregation among some different physical storages (in technical words, it is an index)
  10. *
  11. * Used fully qualified namespaces in annotations for proper work of WebApi request parser
  12. *
  13. * @api
  14. */
  15. interface StockInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  16. {
  17. /**
  18. * Constants for keys of data array. Identical to the name of the getter in snake case
  19. */
  20. const STOCK_ID = 'stock_id';
  21. const NAME = 'name';
  22. /**#@-*/
  23. /**
  24. * Get stock id
  25. *
  26. * @return int|null
  27. */
  28. public function getStockId(): ?int;
  29. /**
  30. * Set stock id
  31. *
  32. * @param int|null $stockId
  33. * @return void
  34. */
  35. public function setStockId(?int $stockId): void;
  36. /**
  37. * Get stock name
  38. *
  39. * @return string|null
  40. */
  41. public function getName(): ?string;
  42. /**
  43. * Set stock name
  44. *
  45. * @param string|null $name
  46. * @return void
  47. */
  48. public function setName(?string $name): void;
  49. /**
  50. * Retrieve existing extension attributes object
  51. *
  52. * @return \Magento\InventoryApi\Api\Data\StockExtensionInterface|null
  53. */
  54. public function getExtensionAttributes(): ?\Magento\InventoryApi\Api\Data\StockExtensionInterface;
  55. /**
  56. * Set an extension attributes object
  57. *
  58. * @param \Magento\InventoryApi\Api\Data\StockExtensionInterface $extensionAttributes
  59. * @return void
  60. */
  61. public function setExtensionAttributes(
  62. \Magento\InventoryApi\Api\Data\StockExtensionInterface $extensionAttributes
  63. ): void;
  64. }