Shipping.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\Sales\Api\Data\ShippingInterface;
  8. use Magento\Framework\Model\AbstractExtensibleModel;
  9. class Shipping extends AbstractExtensibleModel implements ShippingInterface
  10. {
  11. /**
  12. * {@inheritdoc}
  13. */
  14. public function getAddress()
  15. {
  16. return $this->_getData(self::KEY_ADDRESS);
  17. }
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public function getMethod()
  22. {
  23. return $this->_getData(self::KEY_METHOD);
  24. }
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public function getTotal()
  29. {
  30. return $this->_getData(self::KEY_TOTAL);
  31. }
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function setAddress(\Magento\Sales\Api\Data\OrderAddressInterface $address)
  36. {
  37. return $this->setData(self::KEY_ADDRESS, $address);
  38. }
  39. /**
  40. * {@inheritdoc}
  41. */
  42. public function setMethod($method)
  43. {
  44. return $this->setData(self::KEY_METHOD, $method);
  45. }
  46. /**
  47. * {@inheritdoc}
  48. */
  49. public function setTotal(\Magento\Sales\Api\Data\TotalInterface $total)
  50. {
  51. return $this->setData(self::KEY_TOTAL, $total);
  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\ShippingExtensionInterface $extensionAttributes
  65. ) {
  66. return $this->_setExtensionAttributes($extensionAttributes);
  67. }
  68. }