ShippingInformation.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Checkout\Model;
  7. use Magento\Framework\Model\AbstractExtensibleModel;
  8. use Magento\Checkout\Api\Data\ShippingInformationInterface;
  9. /**
  10. * @codeCoverageIgnoreStart
  11. */
  12. class ShippingInformation extends AbstractExtensibleModel implements ShippingInformationInterface
  13. {
  14. /**
  15. * {@inheritdoc}
  16. */
  17. public function getShippingAddress()
  18. {
  19. return $this->getData(self::SHIPPING_ADDRESS);
  20. }
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public function setShippingAddress(\Magento\Quote\Api\Data\AddressInterface $address)
  25. {
  26. return $this->setData(self::SHIPPING_ADDRESS, $address);
  27. }
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public function getBillingAddress()
  32. {
  33. return $this->getData(self::BILLING_ADDRESS);
  34. }
  35. /**
  36. * {@inheritdoc}
  37. */
  38. public function setBillingAddress(\Magento\Quote\Api\Data\AddressInterface $address)
  39. {
  40. return $this->setData(self::BILLING_ADDRESS, $address);
  41. }
  42. /**
  43. * {@inheritdoc}
  44. */
  45. public function getShippingMethodCode()
  46. {
  47. return $this->getData(self::SHIPPING_METHOD_CODE);
  48. }
  49. /**
  50. * {@inheritdoc}
  51. */
  52. public function setShippingMethodCode($code)
  53. {
  54. return $this->setData(self::SHIPPING_METHOD_CODE, $code);
  55. }
  56. /**
  57. * {@inheritdoc}
  58. */
  59. public function getShippingCarrierCode()
  60. {
  61. return $this->getData(self::SHIPPING_CARRIER_CODE);
  62. }
  63. /**
  64. * {@inheritdoc}
  65. */
  66. public function setShippingCarrierCode($code)
  67. {
  68. return $this->setData(self::SHIPPING_CARRIER_CODE, $code);
  69. }
  70. /**
  71. * {@inheritdoc}
  72. */
  73. public function getExtensionAttributes()
  74. {
  75. return $this->_getExtensionAttributes();
  76. }
  77. /**
  78. * {@inheritdoc}
  79. */
  80. public function setExtensionAttributes(
  81. \Magento\Checkout\Api\Data\ShippingInformationExtensionInterface $extensionAttributes
  82. ) {
  83. return $this->_setExtensionAttributes($extensionAttributes);
  84. }
  85. }