PackageItem.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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 Item 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 PackageItem extends DataObject implements PackageItemInterface
  19. {
  20. /**
  21. * @return int
  22. */
  23. public function getProductId()
  24. {
  25. return $this->getData(PackageItemInterface::PRODUCT_ID);
  26. }
  27. /**
  28. * @return int
  29. */
  30. public function getQty()
  31. {
  32. return $this->getData(PackageItemInterface::QTY);
  33. }
  34. /**
  35. * @return string
  36. */
  37. public function getSku()
  38. {
  39. return $this->getData(PackageItemInterface::SKU);
  40. }
  41. /**
  42. * @return string
  43. */
  44. public function getName()
  45. {
  46. return $this->getData(PackageItemInterface::NAME);
  47. }
  48. /**
  49. * @return string
  50. */
  51. public function getDescription()
  52. {
  53. return $this->getData(PackageItemInterface::DESCRIPTION);
  54. }
  55. /**
  56. * @return string
  57. */
  58. public function getCategoryName()
  59. {
  60. return $this->getData(PackageItemInterface::CATEGORY_NAME);
  61. }
  62. /**
  63. * @return string
  64. */
  65. public function getDimensionsUom()
  66. {
  67. return $this->getData(PackageItemInterface::DIMENSIONS_UOM);
  68. }
  69. /**
  70. * @return float
  71. */
  72. public function getLength()
  73. {
  74. return $this->getData(PackageItemInterface::LENGTH);
  75. }
  76. /**
  77. * @return float
  78. */
  79. public function getWidth()
  80. {
  81. return $this->getData(PackageItemInterface::WIDTH);
  82. }
  83. /**
  84. * @return float
  85. */
  86. public function getHeight()
  87. {
  88. return $this->getData(PackageItemInterface::HEIGHT);
  89. }
  90. /**
  91. * @return string
  92. */
  93. public function getWeightUom()
  94. {
  95. return $this->getData(PackageItemInterface::WEIGHT_UOM);
  96. }
  97. /**
  98. * @return float
  99. */
  100. public function getWeight()
  101. {
  102. return $this->getData(PackageItemInterface::WEIGHT);
  103. }
  104. /**
  105. * @return string
  106. */
  107. public function getCurrency()
  108. {
  109. return $this->getData(PackageItemInterface::CURRENCY);
  110. }
  111. /**
  112. * @return float
  113. */
  114. public function getAmount()
  115. {
  116. return $this->getData(PackageItemInterface::AMOUNT);
  117. }
  118. /**
  119. * @return bool
  120. */
  121. public function isFragile()
  122. {
  123. return $this->getData(PackageItemInterface::IS_FRAGILE);
  124. }
  125. /**
  126. * @return bool
  127. */
  128. public function isVirtual()
  129. {
  130. return $this->getData(PackageItemInterface::IS_VIRTUAL);
  131. }
  132. /**
  133. * @return bool
  134. */
  135. public function isPrePackaged()
  136. {
  137. return $this->getData(PackageItemInterface::IS_PREPACKAGED);
  138. }
  139. /**
  140. * @return bool
  141. */
  142. public function canRotateVertically()
  143. {
  144. return $this->getData(PackageItemInterface::CAN_ROTATE_VERTICAL);
  145. }
  146. /**
  147. * @return string
  148. */
  149. public function getCountryOfOrigin()
  150. {
  151. return $this->getData(PackageItemInterface::COUNTRY_OF_ORIGIN);
  152. }
  153. /**
  154. * @return string
  155. */
  156. public function getCountryOfManufacture()
  157. {
  158. return $this->getData(PackageItemInterface::COUNTRY_OF_MANUFACTURE);
  159. }
  160. /**
  161. * @return string
  162. */
  163. public function getEccn()
  164. {
  165. return $this->getData(PackageItemInterface::ECCN);
  166. }
  167. /**
  168. * @return string
  169. */
  170. public function getScheduleBinfo()
  171. {
  172. return $this->getData(PackageItemInterface::SCHEDULE_B_INFO);
  173. }
  174. /**
  175. * @return string
  176. */
  177. public function getHsCode()
  178. {
  179. return $this->getData(PackageItemInterface::HS_CODE);
  180. }
  181. /**
  182. * @return string
  183. */
  184. public function getMonetaryValue()
  185. {
  186. return $this->getData(PackageItemInterface::MONETARY_VALUE);
  187. }
  188. }