ItemToDeduct.php 784 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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\InventorySourceDeductionApi\Model;
  8. /**
  9. * @inheritdoc
  10. */
  11. class ItemToDeduct implements ItemToDeductInterface
  12. {
  13. /**
  14. * @var string
  15. */
  16. private $sku;
  17. /**
  18. * @var float
  19. */
  20. private $qty;
  21. /**
  22. * @param string $sku
  23. * @param float $qty
  24. */
  25. public function __construct(string $sku, float $qty)
  26. {
  27. $this->sku = $sku;
  28. $this->qty = $qty;
  29. }
  30. /**
  31. * @inheritdoc
  32. */
  33. public function getSku(): string
  34. {
  35. return $this->sku;
  36. }
  37. /**
  38. * @inheritdoc
  39. */
  40. public function getQty(): float
  41. {
  42. return $this->qty;
  43. }
  44. }