ShippingAssignment.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Quote\Model;
  7. use Magento\Quote\Api\Data\ShippingAssignmentInterface;
  8. class ShippingAssignment extends \Magento\Framework\Model\AbstractExtensibleModel implements ShippingAssignmentInterface
  9. {
  10. const SHIPPING = 'shipping';
  11. const ITEMS = 'items';
  12. /**
  13. * @inheritDoc
  14. */
  15. public function getShipping()
  16. {
  17. return $this->getData(self::SHIPPING);
  18. }
  19. /**
  20. * @inheritDoc
  21. */
  22. public function getItems()
  23. {
  24. return $this->getData(self::ITEMS);
  25. }
  26. /**
  27. * @inheritDoc
  28. */
  29. public function setShipping(\Magento\Quote\Api\Data\ShippingInterface $value)
  30. {
  31. $this->setData(self::SHIPPING, $value);
  32. return $this;
  33. }
  34. /**
  35. * @inheritDoc
  36. */
  37. public function setItems($value)
  38. {
  39. $this->setData(self::ITEMS, $value);
  40. return $this;
  41. }
  42. /**
  43. * @inheritDoc
  44. */
  45. public function getExtensionAttributes()
  46. {
  47. return $this->_getExtensionAttributes();
  48. }
  49. /**
  50. * @inheritDoc
  51. */
  52. public function setExtensionAttributes(
  53. \Magento\Quote\Api\Data\ShippingAssignmentExtensionInterface $extensionAttributes
  54. ) {
  55. return $this->_setExtensionAttributes($extensionAttributes);
  56. }
  57. }