GetBatch.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Rest\Response\Document;
  6. use Temando\Shipping\Rest\Response\DataObject\Batch;
  7. /**
  8. * Temando API Get Batch Operation
  9. *
  10. * @package Temando\Shipping\Rest
  11. * @author Rhodri Davies <rhodri.davies@temando.com>
  12. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  13. * @link http://www.temando.com/
  14. */
  15. class GetBatch implements GetBatchInterface
  16. {
  17. /**
  18. * @var \Temando\Shipping\Rest\Response\DataObject\Batch
  19. */
  20. private $data;
  21. /**
  22. * @var \Temando\Shipping\Rest\Response\DataObject\Shipment[]
  23. */
  24. private $included = [];
  25. /**
  26. * Obtain response entity
  27. *
  28. * @return \Temando\Shipping\Rest\Response\DataObject\Batch
  29. */
  30. public function getData()
  31. {
  32. return $this->data;
  33. }
  34. /**
  35. * Set response entity
  36. *
  37. * @param \Temando\Shipping\Rest\Response\DataObject\Batch $batch
  38. *
  39. * @return void
  40. */
  41. public function setData(Batch $batch)
  42. {
  43. $this->data = $batch;
  44. }
  45. /**
  46. * Obtain included affecting shipments
  47. *
  48. * @return \Temando\Shipping\Rest\Response\DataObject\Shipment[]
  49. */
  50. public function getIncluded()
  51. {
  52. return $this->included;
  53. }
  54. /**
  55. * Set included affecting shipments
  56. *
  57. * @param \Temando\Shipping\Rest\Response\DataObject\Shipment[] $included
  58. *
  59. * @return void
  60. */
  61. public function setIncluded(array $included)
  62. {
  63. $this->included = $included;
  64. }
  65. }