ShippingAssignment.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Sales\Model\Order;
  7. use Magento\Framework\Model\AbstractExtensibleModel;
  8. use Magento\Sales\Api\Data\ShippingAssignmentInterface;
  9. class ShippingAssignment extends AbstractExtensibleModel implements ShippingAssignmentInterface
  10. {
  11. /**
  12. * {@inheritdoc}
  13. */
  14. public function getShipping()
  15. {
  16. return $this->_getData(self::KEY_SHIPPING);
  17. }
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public function getItems()
  22. {
  23. return $this->_getData(self::KEY_ITEMS);
  24. }
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public function getStockId()
  29. {
  30. return $this->_getData(self::KEY_STOCK_ID);
  31. }
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function setShipping(\Magento\Sales\Api\Data\ShippingInterface $shipping)
  36. {
  37. return $this->setData(self::KEY_SHIPPING, $shipping);
  38. }
  39. /**
  40. * {@inheritdoc}
  41. */
  42. public function setItems(array $items)
  43. {
  44. return $this->setData(self::KEY_ITEMS, $items);
  45. }
  46. /**
  47. * {@inheritdoc}
  48. */
  49. public function setStockId($stockId = null)
  50. {
  51. return $this->setData(self::KEY_STOCK_ID, $stockId);
  52. }
  53. /**
  54. * {@inheritdoc}
  55. */
  56. public function getExtensionAttributes()
  57. {
  58. return $this->_getExtensionAttributes();
  59. }
  60. /**
  61. * {@inheritdoc}
  62. */
  63. public function setExtensionAttributes(
  64. \Magento\Sales\Api\Data\ShippingAssignmentExtensionInterface $extensionAttributes
  65. ) {
  66. return $this->_setExtensionAttributes($extensionAttributes);
  67. }
  68. }