ShipmentReference.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Model\Shipment;
  6. use Magento\Framework\Model\AbstractModel;
  7. use Temando\Shipping\Api\Data\Shipment\ShipmentReferenceInterface;
  8. use Temando\Shipping\Model\ResourceModel\Shipment\ShipmentReference as ShipmentResource;
  9. /**
  10. * Reference to shipment entity created at Temando platform
  11. *
  12. * @package Temando\Shipping\Model
  13. * @author Christoph Aßmann <christoph.assmann@netresearch.de>
  14. * @author Sebastian Ertner <sebastian.ertner@netresearch.de>
  15. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  16. * @link http://www.temando.com/
  17. */
  18. class ShipmentReference extends AbstractModel implements ShipmentReferenceInterface
  19. {
  20. /**
  21. * Init resource model.
  22. * @return void
  23. */
  24. protected function _construct()
  25. {
  26. parent::_construct();
  27. $this->_init(ShipmentResource::class);
  28. }
  29. /**
  30. * @return int
  31. */
  32. public function getEntityId()
  33. {
  34. return $this->getData(ShipmentReferenceInterface::ENTITY_ID);
  35. }
  36. /**
  37. * @param int $entityId
  38. * @return void
  39. */
  40. public function setEntityId($entityId)
  41. {
  42. $this->setData(ShipmentReferenceInterface::ENTITY_ID, $entityId);
  43. }
  44. /**
  45. * @return int
  46. */
  47. public function getShipmentId()
  48. {
  49. return $this->getData(ShipmentReferenceInterface::SHIPMENT_ID);
  50. }
  51. /**
  52. * @param int $shipmentId
  53. * @return void
  54. */
  55. public function setShipmentId($shipmentId)
  56. {
  57. $this->setData(ShipmentReferenceInterface::SHIPMENT_ID, $shipmentId);
  58. }
  59. /**
  60. * @return string
  61. */
  62. public function getExtShipmentId()
  63. {
  64. return $this->getData(ShipmentReferenceInterface::EXT_SHIPMENT_ID);
  65. }
  66. /**
  67. * @param string $extShipmentId
  68. * @return void
  69. */
  70. public function setExtShipmentId($extShipmentId)
  71. {
  72. $this->setData(ShipmentReferenceInterface::EXT_SHIPMENT_ID, $extShipmentId);
  73. }
  74. /**
  75. * @return string
  76. */
  77. public function getExtReturnShipmentId()
  78. {
  79. return $this->getData(ShipmentReferenceInterface::EXT_RETURN_SHIPMENT_ID);
  80. }
  81. /**
  82. * @param string $extReturnShipmentId
  83. * @return void
  84. */
  85. public function setExtReturnShipmentId($extReturnShipmentId)
  86. {
  87. $this->setData(ShipmentReferenceInterface::EXT_RETURN_SHIPMENT_ID, $extReturnShipmentId);
  88. }
  89. /**
  90. * @return string
  91. */
  92. public function getExtLocationId()
  93. {
  94. return $this->getData(ShipmentReferenceInterface::EXT_LOCATION_ID);
  95. }
  96. /**
  97. * @param string $extLocationId
  98. * @return void
  99. */
  100. public function setExtLocationId($extLocationId)
  101. {
  102. $this->setData(ShipmentReferenceInterface::EXT_LOCATION_ID, $extLocationId);
  103. }
  104. /**
  105. * @return string
  106. */
  107. public function getExtTrackingUrl()
  108. {
  109. return $this->getData(ShipmentReferenceInterface::EXT_TRACKING_URL);
  110. }
  111. /**
  112. * @param string $extTrackingUrl
  113. * @return void
  114. */
  115. public function setExtTrackingUrl($extTrackingUrl)
  116. {
  117. $this->setData(ShipmentReferenceInterface::EXT_TRACKING_URL, $extTrackingUrl);
  118. }
  119. /**
  120. * @return string
  121. */
  122. public function getExtTrackingReference()
  123. {
  124. return $this->getData(ShipmentReferenceInterface::EXT_TRACKING_REFERENCE);
  125. }
  126. /**
  127. * @param string $extTrackingReference
  128. * @return void
  129. */
  130. public function setExtTrackingReference($extTrackingReference)
  131. {
  132. $this->setData(ShipmentReferenceInterface::EXT_TRACKING_REFERENCE, $extTrackingReference);
  133. }
  134. }