Location.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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\DataObject;
  7. /**
  8. * Temando Shipment Location Entity
  9. *
  10. * This model contains the data used in the shipping module, not necessarily all
  11. * data available in its webservice 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 Location extends DataObject implements LocationInterface
  19. {
  20. /**
  21. * Get location name.
  22. *
  23. * @return string
  24. */
  25. public function getName()
  26. {
  27. return $this->getData(LocationInterface::NAME);
  28. }
  29. /**
  30. * Get organisation name.
  31. *
  32. * @return string
  33. */
  34. public function getCompany()
  35. {
  36. return $this->getData(LocationInterface::COMPANY);
  37. }
  38. /**
  39. * Get contact person's first name.
  40. *
  41. * @return string
  42. */
  43. public function getPersonFirstName()
  44. {
  45. return $this->getData(LocationInterface::PERSON_FIRST_NAME);
  46. }
  47. /**
  48. * Get contact person's last name.
  49. *
  50. * @return string
  51. */
  52. public function getPersonLastName()
  53. {
  54. return $this->getData(LocationInterface::PERSON_LAST_NAME);
  55. }
  56. /**
  57. * Get contact person's email address.
  58. * @return string
  59. */
  60. public function getEmail()
  61. {
  62. return $this->getData(LocationInterface::EMAIL);
  63. }
  64. /**
  65. * Get contact person's telephone number.
  66. *
  67. * @return string
  68. */
  69. public function getPhoneNumber()
  70. {
  71. return $this->getData(LocationInterface::PHONE_NUMBER);
  72. }
  73. /**
  74. * Get address street lines.
  75. *
  76. * @return string[]
  77. */
  78. public function getStreet()
  79. {
  80. return $this->getData(LocationInterface::STREET);
  81. }
  82. /**
  83. * Get address locality.
  84. *
  85. * @return string
  86. */
  87. public function getCity()
  88. {
  89. return $this->getData(LocationInterface::CITY);
  90. }
  91. /**
  92. * Get address postal code.
  93. *
  94. * @return string
  95. */
  96. public function getPostalCode()
  97. {
  98. return $this->getData(LocationInterface::POSTAL_CODE);
  99. }
  100. /**
  101. * Get address administrative area.
  102. *
  103. * @return string
  104. */
  105. public function getRegionCode()
  106. {
  107. return $this->getData(LocationInterface::REGION_CODE);
  108. }
  109. /**
  110. * Get address country ISO 2 code.
  111. * @return string
  112. */
  113. public function getCountryCode()
  114. {
  115. return $this->getData(LocationInterface::COUNTRY_CODE);
  116. }
  117. /**
  118. * Get address type, e.g. "Store", "Warehouse", etc.
  119. * @return string
  120. */
  121. public function getType()
  122. {
  123. return $this->getData(LocationInterface::TYPE);
  124. }
  125. /**
  126. * Get location opening hours
  127. *
  128. * @return string[][]
  129. */
  130. public function getOpeningHours()
  131. {
  132. return $this->getData(LocationInterface::OPENING_HOURS);
  133. }
  134. }