Package.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Model\Shipment;
  6. use Magento\Framework\DataObject;
  7. /**
  8. * Temando Package Entity
  9. *
  10. * This model contains the data used in the shipping module, not necessarily all
  11. * data available in its webservice representation.
  12. *
  13. * @package Temando\Shipping\Model
  14. * @author Rhodri Davies <rhodri.davies@temando.com>
  15. * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  16. * @link https://www.temando.com
  17. */
  18. class Package extends DataObject implements PackageInterface
  19. {
  20. /**
  21. * @return string
  22. */
  23. public function getPackageId()
  24. {
  25. return $this->getData(self::PACKAGE_ID);
  26. }
  27. /**
  28. * @return string
  29. */
  30. public function getTrackingReference()
  31. {
  32. return $this->getData(self::TRACKING_REFERENCE);
  33. }
  34. /**
  35. * @return string
  36. */
  37. public function getTrackingUrl()
  38. {
  39. return $this->getData(self::TRACKING_URL);
  40. }
  41. /**
  42. * @return float
  43. */
  44. public function getWeight()
  45. {
  46. return $this->getData(self::WEIGHT);
  47. }
  48. /**
  49. * @return float
  50. */
  51. public function getWidth()
  52. {
  53. return $this->getData(self::WIDTH);
  54. }
  55. /**
  56. * @return float
  57. */
  58. public function getLength()
  59. {
  60. return $this->getData(self::LENGTH);
  61. }
  62. /**
  63. * @return float
  64. */
  65. public function getHeight()
  66. {
  67. return $this->getData(self::HEIGHT);
  68. }
  69. /**
  70. * @return PackageItemInterface[]
  71. */
  72. public function getItems()
  73. {
  74. return $this->getData(self::ITEMS);
  75. }
  76. }