ShipmentItemInterface.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Sales\Api\Data;
  7. /**
  8. * Shipment item interface.
  9. *
  10. * A shipment is a delivery package that contains products. A shipment document accompanies the shipment. This
  11. * document lists the products and their quantities in the delivery package. A product is an item in a shipment.
  12. * @api
  13. * @since 100.0.2
  14. */
  15. interface ShipmentItemInterface extends
  16. \Magento\Sales\Api\Data\LineItemInterface,
  17. \Magento\Framework\Api\ExtensibleDataInterface
  18. {
  19. /**#@+
  20. * Constants for keys of data array. Identical to the name of the getter in snake case
  21. */
  22. /*
  23. * Entity ID.
  24. */
  25. const ENTITY_ID = 'entity_id';
  26. /*
  27. * Parent ID.
  28. */
  29. const PARENT_ID = 'parent_id';
  30. /*
  31. * Row total.
  32. */
  33. const ROW_TOTAL = 'row_total';
  34. /*
  35. * Price.
  36. */
  37. const PRICE = 'price';
  38. /*
  39. * Weight.
  40. */
  41. const WEIGHT = 'weight';
  42. /*
  43. * Quantity.
  44. */
  45. const QTY = 'qty';
  46. /*
  47. * Product ID.
  48. */
  49. const PRODUCT_ID = 'product_id';
  50. /*
  51. * Order item ID.
  52. */
  53. const ORDER_ITEM_ID = 'order_item_id';
  54. /*
  55. * Additional data.
  56. */
  57. const ADDITIONAL_DATA = 'additional_data';
  58. /*
  59. * Description.
  60. */
  61. const DESCRIPTION = 'description';
  62. /*
  63. * Name.
  64. */
  65. const NAME = 'name';
  66. /*
  67. * SKU.
  68. */
  69. const SKU = 'sku';
  70. /**
  71. * Gets the additional data for the shipment item.
  72. *
  73. * @return string|null Additional data.
  74. */
  75. public function getAdditionalData();
  76. /**
  77. * Gets the description for the shipment item.
  78. *
  79. * @return string|null Description.
  80. */
  81. public function getDescription();
  82. /**
  83. * Gets the ID for the shipment item.
  84. *
  85. * @return int|null Shipment item ID.
  86. */
  87. public function getEntityId();
  88. /**
  89. * Sets entity ID.
  90. *
  91. * @param int $entityId
  92. * @return $this
  93. */
  94. public function setEntityId($entityId);
  95. /**
  96. * Gets the name for the shipment item.
  97. *
  98. * @return string|null Name.
  99. */
  100. public function getName();
  101. /**
  102. * Gets the parent ID for the shipment item.
  103. *
  104. * @return int|null Parent ID.
  105. */
  106. public function getParentId();
  107. /**
  108. * Gets the price for the shipment item.
  109. *
  110. * @return float|null Price.
  111. */
  112. public function getPrice();
  113. /**
  114. * Gets the product ID for the shipment item.
  115. *
  116. * @return int|null Product ID.
  117. */
  118. public function getProductId();
  119. /**
  120. * Gets the row total for the shipment item.
  121. *
  122. * @return float|null Row total.
  123. */
  124. public function getRowTotal();
  125. /**
  126. * Gets the SKU for the shipment item.
  127. *
  128. * @return string|null SKU.
  129. */
  130. public function getSku();
  131. /**
  132. * Gets the weight for the shipment item.
  133. *
  134. * @return float|null Weight.
  135. */
  136. public function getWeight();
  137. /**
  138. * Sets the parent ID for the shipment item.
  139. *
  140. * @param int $id
  141. * @return $this
  142. */
  143. public function setParentId($id);
  144. /**
  145. * Sets the row total for the shipment item.
  146. *
  147. * @param float $amount
  148. * @return $this
  149. */
  150. public function setRowTotal($amount);
  151. /**
  152. * Sets the price for the shipment item.
  153. *
  154. * @param float $price
  155. * @return $this
  156. */
  157. public function setPrice($price);
  158. /**
  159. * Sets the weight for the shipment item.
  160. *
  161. * @param float $weight
  162. * @return $this
  163. */
  164. public function setWeight($weight);
  165. /**
  166. * Sets the product ID for the shipment item.
  167. *
  168. * @param int $id
  169. * @return $this
  170. */
  171. public function setProductId($id);
  172. /**
  173. * Sets the additional data for the shipment item.
  174. *
  175. * @param string $additionalData
  176. * @return $this
  177. */
  178. public function setAdditionalData($additionalData);
  179. /**
  180. * Sets the description for the shipment item.
  181. *
  182. * @param string $description
  183. * @return $this
  184. */
  185. public function setDescription($description);
  186. /**
  187. * Sets the name for the shipment item.
  188. *
  189. * @param string $name
  190. * @return $this
  191. */
  192. public function setName($name);
  193. /**
  194. * Sets the SKU for the shipment item.
  195. *
  196. * @param string $sku
  197. * @return $this
  198. */
  199. public function setSku($sku);
  200. /**
  201. * Retrieve existing extension attributes object or create a new one.
  202. *
  203. * @return \Magento\Sales\Api\Data\ShipmentItemExtensionInterface|null
  204. */
  205. public function getExtensionAttributes();
  206. /**
  207. * Set an extension attributes object.
  208. *
  209. * @param \Magento\Sales\Api\Data\ShipmentItemExtensionInterface $extensionAttributes
  210. * @return $this
  211. */
  212. public function setExtensionAttributes(\Magento\Sales\Api\Data\ShipmentItemExtensionInterface $extensionAttributes);
  213. }