Order.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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 Order 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 Order extends DataObject implements OrderInterface
  19. {
  20. /**
  21. * @return string
  22. */
  23. public function getOrderId()
  24. {
  25. return $this->getData(OrderInterface::ORDER_ID);
  26. }
  27. /**
  28. * @return string
  29. */
  30. public function getCreatedAt()
  31. {
  32. return $this->getData(OrderInterface::CREATED_AT);
  33. }
  34. /**
  35. * @return string
  36. */
  37. public function getLastModifiedAt()
  38. {
  39. return $this->getData(OrderInterface::LAST_MODIFIED_AT);
  40. }
  41. /**
  42. * @return string
  43. */
  44. public function getOrderedAt()
  45. {
  46. return $this->getData(OrderInterface::ORDERED_AT);
  47. }
  48. /**
  49. * @return string
  50. */
  51. public function getStatus()
  52. {
  53. return $this->getData(OrderInterface::STATUS);
  54. }
  55. /**
  56. * @return \Temando\Shipping\Model\Order\OrderBillingInterface
  57. */
  58. public function getBilling()
  59. {
  60. return $this->getData(OrderInterface::BILLING);
  61. }
  62. /**
  63. * @return \Temando\Shipping\Model\Order\OrderRecipientInterface
  64. */
  65. public function getRecipient()
  66. {
  67. return $this->getData(OrderInterface::RECIPIENT);
  68. }
  69. /**
  70. * @return \Temando\Shipping\Model\Order\OrderItemInterface[]
  71. */
  72. public function getOrderItems()
  73. {
  74. return $this->getData(OrderInterface::ORDER_ITEMS);
  75. }
  76. /**
  77. * @return string
  78. */
  79. public function getCurrency()
  80. {
  81. return $this->getData(OrderInterface::CURRENCY);
  82. }
  83. /**
  84. * @return float
  85. */
  86. public function getAmount()
  87. {
  88. return $this->getData(OrderInterface::AMOUNT);
  89. }
  90. /**
  91. * @return int
  92. */
  93. public function getSourceReference()
  94. {
  95. return $this->getData(OrderInterface::SOURCE_REFERENCE);
  96. }
  97. /**
  98. * @return string
  99. */
  100. public function getSourceId()
  101. {
  102. return $this->getData(OrderInterface::SOURCE_ID);
  103. }
  104. /**
  105. * @return string
  106. */
  107. public function getSourceIncrementId()
  108. {
  109. return $this->getData(OrderInterface::SOURCE_INCREMENT_ID);
  110. }
  111. /**
  112. * @return \Temando\Shipping\Model\Checkout\Attribute\CheckoutFieldInterface[]
  113. */
  114. public function getCheckoutFields()
  115. {
  116. return $this->getData(OrderInterface::CHECKOUT_FIELDS);
  117. }
  118. /**
  119. * @return \Temando\Shipping\Api\Data\Delivery\CollectionPointSearchRequestInterface|null
  120. */
  121. public function getCollectionPointSearchRequest()
  122. {
  123. return $this->getData(OrderInterface::COLLECTION_POINT_SEARCH_REQUEST);
  124. }
  125. /**
  126. * @return \Temando\Shipping\Api\Data\Delivery\QuoteCollectionPointInterface|null
  127. */
  128. public function getCollectionPoint()
  129. {
  130. return $this->getData(OrderInterface::COLLECTION_POINT);
  131. }
  132. /**
  133. * @return \Temando\Shipping\Api\Data\Delivery\PickupLocationSearchRequestInterface|null
  134. */
  135. public function getPickupLocationSearchRequest()
  136. {
  137. return $this->getData(OrderInterface::PICKUP_LOCATION_SEARCH_REQUEST);
  138. }
  139. /**
  140. * @return \Temando\Shipping\Api\Data\Delivery\QuotePickupLocationInterface|null
  141. */
  142. public function getPickupLocation()
  143. {
  144. return $this->getData(OrderInterface::PICKUP_LOCATION);
  145. }
  146. /**
  147. * @return string
  148. */
  149. public function getExperienceCode()
  150. {
  151. return $this->getData(OrderInterface::SELECTED_EXPERIENCE_CODE);
  152. }
  153. /**
  154. * @return string
  155. */
  156. public function getExperienceCurrency()
  157. {
  158. return $this->getData(OrderInterface::SELECTED_EXPERIENCE_CURRENCY);
  159. }
  160. /**
  161. * @return float
  162. */
  163. public function getExperienceAmount()
  164. {
  165. return $this->getData(OrderInterface::SELECTED_EXPERIENCE_AMOUNT);
  166. }
  167. /**
  168. * @return string
  169. */
  170. public function getExperienceLanguage()
  171. {
  172. return $this->getData(OrderInterface::SELECTED_EXPERIENCE_LANGUAGE);
  173. }
  174. /**
  175. * @return string
  176. */
  177. public function getExperienceDescription()
  178. {
  179. return $this->getData(OrderInterface::SELECTED_EXPERIENCE_DESCRIPTION);
  180. }
  181. }