ShipmentInterface.php 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  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 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.
  12. * @api
  13. * @since 100.0.2
  14. */
  15. interface ShipmentInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  16. {
  17. /**#@+
  18. * Constants for keys of data array. Identical to the name of the getter in snake case
  19. */
  20. /*
  21. * Entity ID.
  22. */
  23. const ENTITY_ID = 'entity_id';
  24. /*
  25. * Store ID.
  26. */
  27. const STORE_ID = 'store_id';
  28. /*
  29. * Total weight.
  30. */
  31. const TOTAL_WEIGHT = 'total_weight';
  32. /*
  33. * Total quantity.
  34. */
  35. const TOTAL_QTY = 'total_qty';
  36. /*
  37. * Email sent flag.
  38. */
  39. const EMAIL_SENT = 'email_sent';
  40. /*
  41. * Order ID.
  42. */
  43. const ORDER_ID = 'order_id';
  44. /*
  45. * Customer ID.
  46. */
  47. const CUSTOMER_ID = 'customer_id';
  48. /*
  49. * Shipping address ID.
  50. */
  51. const SHIPPING_ADDRESS_ID = 'shipping_address_id';
  52. /*
  53. * Billing address ID.
  54. */
  55. const BILLING_ADDRESS_ID = 'billing_address_id';
  56. /*
  57. * Shipment status.
  58. */
  59. const SHIPMENT_STATUS = 'shipment_status';
  60. /*
  61. * Increment ID.
  62. */
  63. const INCREMENT_ID = 'increment_id';
  64. /*
  65. * Created-at timestamp.
  66. */
  67. const CREATED_AT = 'created_at';
  68. /*
  69. * Updated-at timestamp.
  70. */
  71. const UPDATED_AT = 'updated_at';
  72. /*
  73. * Packages.
  74. */
  75. const PACKAGES = 'packages';
  76. /*
  77. * Shipping label.
  78. */
  79. const SHIPPING_LABEL = 'shipping_label';
  80. /*
  81. * Items.
  82. */
  83. const ITEMS = 'items';
  84. /*
  85. * Tracks.
  86. */
  87. const TRACKS = 'tracks';
  88. /*
  89. * Comments.
  90. */
  91. const COMMENTS = 'comments';
  92. /**
  93. * Gets the billing address ID for the shipment.
  94. *
  95. * @return int|null Billing address ID.
  96. */
  97. public function getBillingAddressId();
  98. /**
  99. * Gets the created-at timestamp for the shipment.
  100. *
  101. * @return string|null Created-at timestamp.
  102. */
  103. public function getCreatedAt();
  104. /**
  105. * Sets the created-at timestamp for the shipment.
  106. *
  107. * @param string $createdAt timestamp
  108. * @return $this
  109. */
  110. public function setCreatedAt($createdAt);
  111. /**
  112. * Gets the customer ID for the shipment.
  113. *
  114. * @return int|null Customer ID.
  115. */
  116. public function getCustomerId();
  117. /**
  118. * Gets the email-sent flag value for the shipment.
  119. *
  120. * @return int|null Email-sent flag value.
  121. */
  122. public function getEmailSent();
  123. /**
  124. * Gets the ID for the shipment.
  125. *
  126. * @return int|null Shipment ID.
  127. */
  128. public function getEntityId();
  129. /**
  130. * Sets entity ID.
  131. *
  132. * @param int $entityId
  133. * @return $this
  134. */
  135. public function setEntityId($entityId);
  136. /**
  137. * Gets the increment ID for the shipment.
  138. *
  139. * @return string|null Increment ID.
  140. */
  141. public function getIncrementId();
  142. /**
  143. * Gets the order ID for the shipment.
  144. *
  145. * @return int Order ID.
  146. */
  147. public function getOrderId();
  148. /**
  149. * Gets any packages for the shipment.
  150. *
  151. * @return \Magento\Sales\Api\Data\ShipmentPackageInterface[]|null Array of packages, if any. Otherwise, null.
  152. */
  153. public function getPackages();
  154. /**
  155. * Sets any packages for the shipment.
  156. *
  157. * @param \Magento\Sales\Api\Data\ShipmentPackageInterface[] $packages
  158. * @return $this
  159. */
  160. public function setPackages(array $packages = null);
  161. /**
  162. * Gets the shipment status.
  163. *
  164. * @return int|null Shipment status.
  165. */
  166. public function getShipmentStatus();
  167. /**
  168. * Gets the shipping address ID for the shipment.
  169. *
  170. * @return int|null Shipping address ID.
  171. */
  172. public function getShippingAddressId();
  173. /**
  174. * Gets the shipping label for the shipment.
  175. *
  176. * @return string|null Shipping label.
  177. */
  178. public function getShippingLabel();
  179. /**
  180. * Gets the store ID for the shipment.
  181. *
  182. * @return int|null Store ID.
  183. */
  184. public function getStoreId();
  185. /**
  186. * Gets the total quantity for the shipment.
  187. *
  188. * @return float|null Total quantity.
  189. */
  190. public function getTotalQty();
  191. /**
  192. * Gets the total weight for the shipment.
  193. *
  194. * @return float|null Total weight.
  195. */
  196. public function getTotalWeight();
  197. /**
  198. * Gets the updated-at timestamp for the shipment.
  199. *
  200. * @return string|null Updated-at timestamp.
  201. */
  202. public function getUpdatedAt();
  203. /**
  204. * Gets the items for the shipment.
  205. *
  206. * @return \Magento\Sales\Api\Data\ShipmentItemInterface[] Array of items.
  207. */
  208. public function getItems();
  209. /**
  210. * Sets the items for the shipment.
  211. *
  212. * @param \Magento\Sales\Api\Data\ShipmentItemInterface[] $items
  213. * @return $this
  214. */
  215. public function setItems($items);
  216. /**
  217. * Gets the tracks for the shipment.
  218. *
  219. * @return \Magento\Sales\Api\Data\ShipmentTrackInterface[] Array of tracks.
  220. */
  221. public function getTracks();
  222. /**
  223. * Sets the tracks for the shipment.
  224. *
  225. * @param \Magento\Sales\Api\Data\ShipmentTrackInterface[] $tracks
  226. * @return $this
  227. */
  228. public function setTracks($tracks);
  229. /**
  230. * Gets the comments for the shipment.
  231. *
  232. * @return \Magento\Sales\Api\Data\ShipmentCommentInterface[] Array of comments.
  233. */
  234. public function getComments();
  235. /**
  236. * Sets the comments for the shipment.
  237. *
  238. * @param \Magento\Sales\Api\Data\ShipmentCommentInterface[] $comments
  239. * @return $this
  240. */
  241. public function setComments($comments = null);
  242. /**
  243. * Sets the store ID for the shipment.
  244. *
  245. * @param int $id
  246. * @return $this
  247. */
  248. public function setStoreId($id);
  249. /**
  250. * Sets the total weight for the shipment.
  251. *
  252. * @param float $totalWeight
  253. * @return $this
  254. */
  255. public function setTotalWeight($totalWeight);
  256. /**
  257. * Sets the total quantity for the shipment.
  258. *
  259. * @param float $qty
  260. * @return $this
  261. */
  262. public function setTotalQty($qty);
  263. /**
  264. * Sets the email-sent flag value for the shipment.
  265. *
  266. * @param int $emailSent
  267. * @return $this
  268. */
  269. public function setEmailSent($emailSent);
  270. /**
  271. * Sets the order ID for the shipment.
  272. *
  273. * @param int $id
  274. * @return $this
  275. */
  276. public function setOrderId($id);
  277. /**
  278. * Sets the customer ID for the shipment.
  279. *
  280. * @param int $id
  281. * @return $this
  282. */
  283. public function setCustomerId($id);
  284. /**
  285. * Sets the shipping address ID for the shipment.
  286. *
  287. * @param int $id
  288. * @return $this
  289. */
  290. public function setShippingAddressId($id);
  291. /**
  292. * Sets the billing address ID for the shipment.
  293. *
  294. * @param int $id
  295. * @return $this
  296. */
  297. public function setBillingAddressId($id);
  298. /**
  299. * Sets the shipment status.
  300. *
  301. * @param int $shipmentStatus
  302. * @return $this
  303. */
  304. public function setShipmentStatus($shipmentStatus);
  305. /**
  306. * Sets the increment ID for the shipment.
  307. *
  308. * @param string $id
  309. * @return $this
  310. */
  311. public function setIncrementId($id);
  312. /**
  313. * Sets the shipping label for the shipment.
  314. *
  315. * @param string $shippingLabel
  316. * @return $this
  317. */
  318. public function setShippingLabel($shippingLabel);
  319. /**
  320. * Sets the updated-at timestamp for the shipment.
  321. *
  322. * @param string $timestamp
  323. * @return $this
  324. */
  325. public function setUpdatedAt($timestamp);
  326. /**
  327. * Retrieve existing extension attributes object or create a new one.
  328. *
  329. * @return \Magento\Sales\Api\Data\ShipmentExtensionInterface|null
  330. */
  331. public function getExtensionAttributes();
  332. /**
  333. * Set an extension attributes object.
  334. *
  335. * @param \Magento\Sales\Api\Data\ShipmentExtensionInterface $extensionAttributes
  336. * @return $this
  337. */
  338. public function setExtensionAttributes(\Magento\Sales\Api\Data\ShipmentExtensionInterface $extensionAttributes);
  339. }