OrderPickupLocation.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Model\Delivery;
  6. use Magento\Framework\Model\AbstractModel;
  7. use Temando\Shipping\Api\Data\Delivery\OrderPickupLocationInterface;
  8. use Temando\Shipping\Model\ResourceModel\Delivery\OrderPickupLocation as PickupLocationResource;
  9. /**
  10. * Temando Order Pickup Location Entity
  11. *
  12. * This model contains a subset of data that is used in the shipping module.
  13. * It does not contain all data as available in its platform representation.
  14. *
  15. * @package Temando\Shipping\Model
  16. * @author Sebastian Ertner <sebastian.ertner@netresearch.de>
  17. * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  18. * @link https://www.temando.com/
  19. */
  20. class OrderPickupLocation extends AbstractModel implements OrderPickupLocationInterface
  21. {
  22. /**
  23. * Init resource model.
  24. * @return void
  25. */
  26. protected function _construct()
  27. {
  28. parent::_construct();
  29. $this->_init(PickupLocationResource::class);
  30. }
  31. /**
  32. * @return int
  33. */
  34. public function getRecipientAddressId()
  35. {
  36. return $this->getData(OrderPickupLocationInterface::RECIPIENT_ADDRESS_ID);
  37. }
  38. /**
  39. * @return string
  40. */
  41. public function getPickupLocationId()
  42. {
  43. return $this->getData(OrderPickupLocationInterface::PICKUP_LOCATION_ID);
  44. }
  45. /**
  46. * @return string
  47. */
  48. public function getName()
  49. {
  50. return $this->getData(OrderPickupLocationInterface::NAME);
  51. }
  52. /**
  53. * @return string
  54. */
  55. public function getCountry()
  56. {
  57. return $this->getData(OrderPickupLocationInterface::COUNTRY);
  58. }
  59. /**
  60. * @return string
  61. */
  62. public function getRegion()
  63. {
  64. return $this->getData(OrderPickupLocationInterface::REGION);
  65. }
  66. /**
  67. * @return string
  68. */
  69. public function getPostcode()
  70. {
  71. return $this->getData(OrderPickupLocationInterface::POSTCODE);
  72. }
  73. /**
  74. * @return string
  75. */
  76. public function getCity()
  77. {
  78. return $this->getData(OrderPickupLocationInterface::CITY);
  79. }
  80. /**
  81. * @return string[]
  82. */
  83. public function getStreet()
  84. {
  85. return $this->getData(OrderPickupLocationInterface::STREET);
  86. }
  87. }