StockSourceLinkInterface.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 relation between Stock and Source entities.
  10. *
  11. * Used fully qualified namespaces in annotations for proper work of WebApi request parser
  12. *
  13. * @api
  14. */
  15. interface StockSourceLinkInterface 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 SOURCE_CODE = 'source_code';
  22. const PRIORITY = 'priority';
  23. /**#@-*/
  24. /**
  25. * Get stock id
  26. *
  27. * @return int|null
  28. */
  29. public function getStockId(): ?int;
  30. /**
  31. * Set stock id
  32. *
  33. * @param int|null $stockId
  34. * @return void
  35. */
  36. public function setStockId(?int $stockId): void;
  37. /**
  38. * Get source code of the link
  39. *
  40. * @return string|null
  41. */
  42. public function getSourceCode(): ?string;
  43. /**
  44. * Set source code of the link
  45. *
  46. * @param string|null $sourceCode
  47. *
  48. * @return void
  49. */
  50. public function setSourceCode(?string $sourceCode): void;
  51. /**
  52. * Get priority of the link
  53. *
  54. * @return int|null
  55. */
  56. public function getPriority(): ?int;
  57. /**
  58. * Set priority of the link
  59. *
  60. * @param int $priority
  61. *
  62. * @return void
  63. */
  64. public function setPriority(?int $priority): void;
  65. /**
  66. * Retrieve existing extension attributes object
  67. *
  68. * @return \Magento\InventoryApi\Api\Data\StockSourceLinkExtensionInterface|null
  69. */
  70. public function getExtensionAttributes(): ?\Magento\InventoryApi\Api\Data\StockSourceLinkExtensionInterface;
  71. /**
  72. * Set an extension attributes object
  73. *
  74. * @param \Magento\InventoryApi\Api\Data\StockSourceLinkExtensionInterface $extensionAttributes
  75. * @return void
  76. */
  77. public function setExtensionAttributes(
  78. \Magento\InventoryApi\Api\Data\StockSourceLinkExtensionInterface $extensionAttributes
  79. ): void;
  80. }