SourceSelectionItemInterface.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 source selection result for the specific source and SKU
  10. *
  11. * @api
  12. */
  13. interface SourceSelectionItemInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  14. {
  15. /**
  16. * Get source code
  17. *
  18. * @return string
  19. */
  20. public function getSourceCode(): string;
  21. /**
  22. * Get item SKU
  23. *
  24. * @return string
  25. */
  26. public function getSku(): string;
  27. /**
  28. * Get quantity which will be deducted for this source
  29. *
  30. * @return float
  31. */
  32. public function getQtyToDeduct(): float;
  33. /**
  34. * Get available quantity for this source
  35. *
  36. * @return float
  37. */
  38. public function getQtyAvailable(): float;
  39. /**
  40. * Retrieve existing extension attributes object
  41. *
  42. * @return \Magento\InventorySourceSelectionApi\Api\Data\SourceSelectionItemExtensionInterface|null
  43. */
  44. public function getExtensionAttributes(): ?SourceSelectionItemExtensionInterface;
  45. /**
  46. * Set an extension attributes object
  47. *
  48. * @param \Magento\InventorySourceSelectionApi\Api\Data\SourceSelectionItemExtensionInterface $extensionAttributes
  49. * @return void
  50. */
  51. public function setExtensionAttributes(
  52. \Magento\InventorySourceSelectionApi\Api\Data\SourceSelectionItemExtensionInterface $extensionAttributes
  53. ): void;
  54. }