BatchListing.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\ViewModel\Batch;
  6. use Magento\Framework\View\Element\Block\ArgumentInterface;
  7. use Temando\Shipping\ViewModel\DataProvider\BatchUrl;
  8. use Temando\Shipping\ViewModel\DataProvider\EntityUrlInterface;
  9. use Temando\Shipping\ViewModel\DataProvider\ShippingApiAccess;
  10. use Temando\Shipping\ViewModel\DataProvider\ShippingApiAccessInterface;
  11. use Temando\Shipping\ViewModel\ShippingApiInterface;
  12. /**
  13. * View model for dispatch list JS component.
  14. *
  15. * @package Temando\Shipping\ViewModel
  16. * @author Rhodri Davies <rhodri.davies@temando.com>
  17. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  18. * @link http://www.temando.com/
  19. */
  20. class BatchListing implements ArgumentInterface, ShippingApiInterface
  21. {
  22. /**
  23. * @var ShippingApiAccess
  24. */
  25. private $apiAccess;
  26. /**
  27. * @var BatchUrl
  28. */
  29. private $batchUrl;
  30. /**
  31. * DispatchListing constructor.
  32. * @param ShippingApiAccess $apiAccess
  33. * @param BatchUrl $batchUrl
  34. */
  35. public function __construct(
  36. ShippingApiAccess $apiAccess,
  37. BatchUrl $batchUrl
  38. ) {
  39. $this->apiAccess = $apiAccess;
  40. $this->batchUrl = $batchUrl;
  41. }
  42. /**
  43. * @return ShippingApiAccessInterface
  44. */
  45. public function getShippingApiAccess(): ShippingApiAccessInterface
  46. {
  47. return $this->apiAccess;
  48. }
  49. /**
  50. * @return EntityUrlInterface|BatchUrl
  51. */
  52. public function getBatchUrl(): EntityUrlInterface
  53. {
  54. return $this->batchUrl;
  55. }
  56. }