ShipmentTrackInterface.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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. use Magento\Framework\Api\ExtensibleDataInterface;
  8. /**
  9. * Shipment track interface.
  10. *
  11. * A shipment is a delivery package that contains products. A shipment document accompanies the shipment. This
  12. * document lists the products and their quantities in the delivery package. Merchants and customers can track
  13. * shipments.
  14. * @api
  15. * @since 100.0.2
  16. */
  17. interface ShipmentTrackInterface extends TrackInterface, 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. * Weight.
  32. */
  33. const WEIGHT = 'weight';
  34. /*
  35. * Quantity.
  36. */
  37. const QTY = 'qty';
  38. /*
  39. * Order ID.
  40. */
  41. const ORDER_ID = 'order_id';
  42. /*
  43. * Track number.
  44. */
  45. const TRACK_NUMBER = 'track_number';
  46. /*
  47. * Description.
  48. */
  49. const DESCRIPTION = 'description';
  50. /*
  51. * Title.
  52. */
  53. const TITLE = 'title';
  54. /*
  55. * Carrier code.
  56. */
  57. const CARRIER_CODE = 'carrier_code';
  58. /*
  59. * Created-at timestamp.
  60. */
  61. const CREATED_AT = 'created_at';
  62. /*
  63. * Updated-at timestamp.
  64. */
  65. const UPDATED_AT = 'updated_at';
  66. /**
  67. * Sets the order_id for the shipment package.
  68. *
  69. * @param int $id
  70. * @return $this
  71. */
  72. public function setOrderId($id);
  73. /**
  74. * Gets the order_id for the shipment package.
  75. *
  76. * @return int
  77. */
  78. public function getOrderId();
  79. /**
  80. * Gets the created-at timestamp for the shipment package.
  81. *
  82. * @return string|null Created-at timestamp.
  83. */
  84. public function getCreatedAt();
  85. /**
  86. * Sets the created-at timestamp for the shipment package.
  87. *
  88. * @param string $createdAt timestamp
  89. * @return $this
  90. */
  91. public function setCreatedAt($createdAt);
  92. /**
  93. * Gets the ID for the shipment package.
  94. *
  95. * @return int|null Shipment package ID.
  96. */
  97. public function getEntityId();
  98. /**
  99. * Sets entity ID.
  100. *
  101. * @param int $entityId
  102. * @return $this
  103. */
  104. public function setEntityId($entityId);
  105. /**
  106. * Gets the parent ID for the shipment package.
  107. *
  108. * @return int Parent ID.
  109. */
  110. public function getParentId();
  111. /**
  112. * Gets the updated-at timestamp for the shipment package.
  113. *
  114. * @return string|null Updated-at timestamp.
  115. */
  116. public function getUpdatedAt();
  117. /**
  118. * Sets the updated-at timestamp for the shipment package.
  119. *
  120. * @param string $timestamp
  121. * @return $this
  122. */
  123. public function setUpdatedAt($timestamp);
  124. /**
  125. * Sets the parent ID for the shipment package.
  126. *
  127. * @param int $id
  128. * @return $this
  129. */
  130. public function setParentId($id);
  131. /**
  132. * Sets the weight for the shipment package.
  133. *
  134. * @param float $weight
  135. * @return $this
  136. */
  137. public function setWeight($weight);
  138. /**
  139. * Gets the weight for the shipment package.
  140. *
  141. * @return float Weight.
  142. */
  143. public function getWeight();
  144. /**
  145. * Sets the quantity for the shipment package.
  146. *
  147. * @param float $qty
  148. * @return $this
  149. */
  150. public function setQty($qty);
  151. /**
  152. * Gets the quantity for the shipment package.
  153. *
  154. * @return float Quantity.
  155. */
  156. public function getQty();
  157. /**
  158. * Sets the description for the shipment package.
  159. *
  160. * @param string $description
  161. * @return $this
  162. */
  163. public function setDescription($description);
  164. /**
  165. * Gets the description for the shipment package.
  166. *
  167. * @return string Description.
  168. */
  169. public function getDescription();
  170. /**
  171. * Retrieve existing extension attributes object or create a new one.
  172. *
  173. * @return \Magento\Sales\Api\Data\ShipmentTrackExtensionInterface|null
  174. */
  175. public function getExtensionAttributes();
  176. /**
  177. * Set an extension attributes object.
  178. *
  179. * @param \Magento\Sales\Api\Data\ShipmentTrackExtensionInterface $extensionAttributes
  180. * @return $this
  181. */
  182. public function setExtensionAttributes(
  183. \Magento\Sales\Api\Data\ShipmentTrackExtensionInterface $extensionAttributes
  184. );
  185. }