Location.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 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 Sebastian Ertner <sebastian.ertner@netresearch.de>
  15. * @author Christoph Aßmann <christoph.assmann@netresearch.de>
  16. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  17. * @link http://www.temando.com/
  18. */
  19. class Location extends DataObject implements LocationInterface
  20. {
  21. /**
  22. * @return string
  23. */
  24. public function getLocationId()
  25. {
  26. return $this->getData(self::LOCATION_ID);
  27. }
  28. /**
  29. * @return string
  30. */
  31. public function getName()
  32. {
  33. return $this->getData(self::NAME);
  34. }
  35. /**
  36. * @return string
  37. */
  38. public function getUniqueIdentifier()
  39. {
  40. return $this->getData(self::UNIQUE_IDENTIFIER);
  41. }
  42. /**
  43. * @return string
  44. */
  45. public function getType()
  46. {
  47. return $this->getData(self::TYPE);
  48. }
  49. /**
  50. * @return string[]
  51. */
  52. public function getStreet()
  53. {
  54. return $this->getData(self::STREET);
  55. }
  56. /**
  57. * @return string
  58. */
  59. public function getPostalCode()
  60. {
  61. return $this->getData(self::POSTAL_CODE);
  62. }
  63. /**
  64. * @return bool
  65. */
  66. public function isDefault()
  67. {
  68. return $this->getData(self::IS_DEFAULT);
  69. }
  70. }