ItemRequestInterface.php 1.4 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. * Represents requested quantity for particular product
  10. *
  11. * @api
  12. */
  13. interface ItemRequestInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  14. {
  15. /**
  16. * Requested SKU
  17. *
  18. * @return string
  19. */
  20. public function getSku(): string;
  21. /**
  22. * Requested Product Quantity
  23. *
  24. * @return float
  25. */
  26. public function getQty(): float;
  27. /**
  28. * Set SKU
  29. *
  30. * @param string $sku
  31. * @return void
  32. */
  33. public function setSku(string $sku): void;
  34. /**
  35. * Set Quantity
  36. *
  37. * @param float $qty
  38. * @return void
  39. */
  40. public function setQty(float $qty): void;
  41. /**
  42. * Retrieve existing extension attributes object
  43. *
  44. * @return \Magento\InventorySourceSelectionApi\Api\Data\ItemRequestExtensionInterface|null
  45. */
  46. public function getExtensionAttributes(): ?ItemRequestExtensionInterface;
  47. /**
  48. * Set an extension attributes object
  49. *
  50. * @param \Magento\InventorySourceSelectionApi\Api\Data\ItemRequestExtensionInterface $extensionAttributes
  51. * @return void
  52. */
  53. public function setExtensionAttributes(
  54. \Magento\InventorySourceSelectionApi\Api\Data\ItemRequestExtensionInterface $extensionAttributes
  55. ): void;
  56. }