Shipment.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Model;
  6. use Magento\Framework\DataObject;
  7. /**
  8. * Temando Shipment Entity
  9. *
  10. * This model contains a subset of data that is used in the shipping module.
  11. * It does not contain all data as available in its platform representation.
  12. *
  13. * @package Temando\Shipping\Model
  14. * @author Christoph Aßmann <christoph.assmann@netresearch.de>
  15. * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  16. * @link https://www.temando.com/
  17. */
  18. class Shipment extends DataObject implements ShipmentInterface
  19. {
  20. /**
  21. * @return string
  22. */
  23. public function getShipmentId()
  24. {
  25. return $this->getData(ShipmentInterface::SHIPMENT_ID);
  26. }
  27. /**
  28. * @return string
  29. */
  30. public function getOrderId()
  31. {
  32. return $this->getData(ShipmentInterface::ORDER_ID);
  33. }
  34. /**
  35. * @return string
  36. */
  37. public function getOriginId()
  38. {
  39. return $this->getData(ShipmentInterface::ORIGIN_ID);
  40. }
  41. /**
  42. * @return string
  43. */
  44. public function getCustomerReference()
  45. {
  46. return $this->getData(ShipmentInterface::CUSTOMER_REFERENCE);
  47. }
  48. /**
  49. * @return \Temando\Shipping\Model\Shipment\Location
  50. */
  51. public function getOriginLocation()
  52. {
  53. return $this->getData(ShipmentInterface::ORIGIN_LOCATION);
  54. }
  55. /**
  56. * @return \Temando\Shipping\Model\Shipment\Location
  57. */
  58. public function getDestinationLocation()
  59. {
  60. return $this->getData(ShipmentInterface::DESTINATION_LOCATION);
  61. }
  62. /**
  63. * @return \Temando\Shipping\Model\Shipment\Location
  64. */
  65. public function getFinalRecipientLocation()
  66. {
  67. return $this->getData(ShipmentInterface::FINAL_RECIPIENT_LOCATION);
  68. }
  69. /**
  70. * @return \Temando\Shipping\Model\Shipment\FulfillmentInterface
  71. */
  72. public function getFulfillment()
  73. {
  74. return $this->getData(ShipmentInterface::FULFILLMENT);
  75. }
  76. /**
  77. * @return \Temando\Shipping\Model\Shipment\ShipmentItemInterface[]
  78. */
  79. public function getItems()
  80. {
  81. return $this->getData(ShipmentInterface::ITEMS);
  82. }
  83. /**
  84. * @return \Temando\Shipping\Model\Shipment\PackageInterface[]
  85. */
  86. public function getPackages()
  87. {
  88. return $this->getData(ShipmentInterface::PACKAGES);
  89. }
  90. /**
  91. * @return DocumentationInterface[]
  92. */
  93. public function getDocumentation()
  94. {
  95. return $this->getData(ShipmentInterface::DOCUMENTATION);
  96. }
  97. /**
  98. * @return bool
  99. */
  100. public function isPaperless()
  101. {
  102. return $this->getData(ShipmentInterface::IS_PAPERLESS);
  103. }
  104. /**
  105. * @return \Temando\Shipping\Model\Shipment\ExportDeclarationInterface
  106. */
  107. public function getExportDeclaration()
  108. {
  109. return $this->getData(ShipmentInterface::EXPORT_DECLARATION);
  110. }
  111. /**
  112. * @return string
  113. */
  114. public function getStatus()
  115. {
  116. return $this->getData(ShipmentInterface::STATUS);
  117. }
  118. /**
  119. * @return \Temando\Shipping\Model\Shipment\CapabilityInterface[]
  120. */
  121. public function getCapabilities()
  122. {
  123. return $this->getData(ShipmentInterface::CAPABILITIES);
  124. }
  125. /**
  126. * @return string
  127. */
  128. public function getCreatedAt()
  129. {
  130. return $this->getData(ShipmentInterface::CREATED_AT);
  131. }
  132. /**
  133. * @return bool
  134. */
  135. public function isCancelable()
  136. {
  137. return $this->getData(ShipmentInterface::IS_CANCELABLE);
  138. }
  139. }