ItemCreation.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Sales\Model\Order\Shipment;
  7. use Magento\Sales\Api\Data\ShipmentItemCreationInterface;
  8. /**
  9. * Class ItemCreation
  10. */
  11. class ItemCreation implements ShipmentItemCreationInterface
  12. {
  13. /**
  14. * @var int
  15. */
  16. private $orderItemId;
  17. /**
  18. * @var float
  19. */
  20. private $qty;
  21. /**
  22. * @var \Magento\Sales\Api\Data\ShipmentItemCreationExtensionInterface
  23. */
  24. private $extensionAttributes;
  25. //@codeCoverageIgnoreStart
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function getOrderItemId()
  30. {
  31. return $this->orderItemId;
  32. }
  33. /**
  34. * {@inheritdoc}
  35. */
  36. public function setOrderItemId($orderItemId)
  37. {
  38. $this->orderItemId = $orderItemId;
  39. return $this;
  40. }
  41. /**
  42. * {@inheritdoc}
  43. */
  44. public function getQty()
  45. {
  46. return $this->qty;
  47. }
  48. /**
  49. * {@inheritdoc}
  50. */
  51. public function setQty($qty)
  52. {
  53. $this->qty = $qty;
  54. return $this;
  55. }
  56. /**
  57. * {@inheritdoc}
  58. *
  59. * @return \Magento\Sales\Api\Data\ShipmentItemCreationExtensionInterface|null
  60. */
  61. public function getExtensionAttributes()
  62. {
  63. return $this->extensionAttributes;
  64. }
  65. /**
  66. * {@inheritdoc}
  67. *
  68. * @param \Magento\Sales\Api\Data\ShipmentItemCreationExtensionInterface $extensionAttributes
  69. * @return $this
  70. */
  71. public function setExtensionAttributes(
  72. \Magento\Sales\Api\Data\ShipmentItemCreationExtensionInterface $extensionAttributes
  73. ) {
  74. $this->extensionAttributes = $extensionAttributes;
  75. return $this;
  76. }
  77. //@codeCoverageIgnoreEnd
  78. }