PickupLocationSearchRequest.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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\PickupLocationSearchRequestInterface;
  8. use Temando\Shipping\Model\ResourceModel\Delivery\PickupLocationSearchRequest as SearchRequestResource;
  9. /**
  10. * Temando Pickup Location Search Request
  11. *
  12. * @package Temando\Shipping\Model
  13. * @author Sebastian Ertner <sebastian.ertner@netresearch.de>
  14. * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  15. * @link https://www.temando.com/
  16. */
  17. class PickupLocationSearchRequest extends AbstractModel implements PickupLocationSearchRequestInterface
  18. {
  19. /**
  20. * Init resource model.
  21. * @return void
  22. */
  23. protected function _construct()
  24. {
  25. parent::_construct();
  26. $this->_init(SearchRequestResource::class);
  27. }
  28. /**
  29. * @return int
  30. */
  31. public function getShippingAddressId()
  32. {
  33. return $this->getData(PickupLocationSearchRequestInterface::SHIPPING_ADDRESS_ID);
  34. }
  35. /**
  36. * @return bool
  37. */
  38. public function isActive()
  39. {
  40. return $this->getData(PickupLocationSearchRequestInterface::ACTIVE);
  41. }
  42. }