Batch.php 1.5 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\Rest\Response\DataObject;
  6. use Temando\Shipping\Rest\Response\Fields\BatchAttributes;
  7. /**
  8. * Temando API Batch Response Type
  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 Batch extends AbstractResource
  16. {
  17. /**
  18. * @var \Temando\Shipping\Rest\Response\Fields\BatchAttributes
  19. */
  20. private $attributes;
  21. /**
  22. * @var \Temando\Shipping\Rest\Response\DataObject\Shipment[]
  23. */
  24. private $shipments = [];
  25. /**
  26. * @return \Temando\Shipping\Rest\Response\Fields\BatchAttributes
  27. */
  28. public function getAttributes()
  29. {
  30. return $this->attributes;
  31. }
  32. /**
  33. * @param \Temando\Shipping\Rest\Response\Fields\BatchAttributes $attributes
  34. * @return void
  35. */
  36. public function setAttributes(BatchAttributes $attributes)
  37. {
  38. $this->attributes = $attributes;
  39. }
  40. /**
  41. * @return \Temando\Shipping\Rest\Response\DataObject\Shipment[]
  42. */
  43. public function getShipments()
  44. {
  45. return $this->shipments;
  46. }
  47. /**
  48. * @param \Temando\Shipping\Rest\Response\DataObject\Shipment[] $shipments
  49. * @return void
  50. */
  51. public function setShipments(array $shipments)
  52. {
  53. $this->shipments = $shipments;
  54. }
  55. }