InvoiceItemInterface.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  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. * Invoice item interface.
  10. *
  11. * An invoice is a record of the receipt of payment for an order. An invoice item is a purchased item in an invoice.
  12. * @api
  13. * @since 100.0.2
  14. */
  15. interface InvoiceItemInterface extends ExtensibleDataInterface, LineItemInterface
  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. * Parent ID.
  26. */
  27. const PARENT_ID = 'parent_id';
  28. /*
  29. * Base price.
  30. */
  31. const BASE_PRICE = 'base_price';
  32. /*
  33. * Tax amount.
  34. */
  35. const TAX_AMOUNT = 'tax_amount';
  36. /*
  37. * Base row total.
  38. */
  39. const BASE_ROW_TOTAL = 'base_row_total';
  40. /*
  41. * Discount amount.
  42. */
  43. const DISCOUNT_AMOUNT = 'discount_amount';
  44. /*
  45. * Row total.
  46. */
  47. const ROW_TOTAL = 'row_total';
  48. /*
  49. * Base discount amount.
  50. */
  51. const BASE_DISCOUNT_AMOUNT = 'base_discount_amount';
  52. /*
  53. * Price including tax.
  54. */
  55. const PRICE_INCL_TAX = 'price_incl_tax';
  56. /*
  57. * Base tax amount.
  58. */
  59. const BASE_TAX_AMOUNT = 'base_tax_amount';
  60. /*
  61. * Base price including tax.
  62. */
  63. const BASE_PRICE_INCL_TAX = 'base_price_incl_tax';
  64. /*
  65. * Quantity.
  66. */
  67. const QTY = 'qty';
  68. /*
  69. * Base cost.
  70. */
  71. const BASE_COST = 'base_cost';
  72. /*
  73. * Price.
  74. */
  75. const PRICE = 'price';
  76. /*
  77. * Base row total including tax.
  78. */
  79. const BASE_ROW_TOTAL_INCL_TAX = 'base_row_total_incl_tax';
  80. /*
  81. * Row total including tax.
  82. */
  83. const ROW_TOTAL_INCL_TAX = 'row_total_incl_tax';
  84. /*
  85. * Product ID.
  86. */
  87. const PRODUCT_ID = 'product_id';
  88. /*
  89. * Order item ID.
  90. */
  91. const ORDER_ITEM_ID = 'order_item_id';
  92. /*
  93. * Additional data.
  94. */
  95. const ADDITIONAL_DATA = 'additional_data';
  96. /*
  97. * Description.
  98. */
  99. const DESCRIPTION = 'description';
  100. /*
  101. * SKU.
  102. */
  103. const SKU = 'sku';
  104. /*
  105. * Name.
  106. */
  107. const NAME = 'name';
  108. /*
  109. * Discount tax compensation amount.
  110. */
  111. const DISCOUNT_TAX_COMPENSATION_AMOUNT = 'discount_tax_compensation_amount';
  112. /*
  113. * Base discount tax compensation amount.
  114. */
  115. const BASE_DISCOUNT_TAX_COMPENSATION_AMOUNT = 'base_discount_tax_compensation_amount';
  116. /**
  117. * Invoice
  118. */
  119. const INVOICE = 'invoice';
  120. /**
  121. * Gets the additional data for the invoice item.
  122. *
  123. * @return string|null Additional data.
  124. */
  125. public function getAdditionalData();
  126. /**
  127. * Gets the base cost for the invoice item.
  128. *
  129. * @return float|null Base cost.
  130. */
  131. public function getBaseCost();
  132. /**
  133. * Gets the base discount amount for the invoice item.
  134. *
  135. * @return float|null Base discount amount.
  136. */
  137. public function getBaseDiscountAmount();
  138. /**
  139. * Gets the base discount tax compensation amount for the invoice item.
  140. *
  141. * @return float|null Base discount tax compensation amount.
  142. */
  143. public function getBaseDiscountTaxCompensationAmount();
  144. /**
  145. * Gets the base price for the invoice item.
  146. *
  147. * @return float|null Base price.
  148. */
  149. public function getBasePrice();
  150. /**
  151. * Gets the base price including tax for the invoice item.
  152. *
  153. * @return float|null Base price including tax.
  154. */
  155. public function getBasePriceInclTax();
  156. /**
  157. * Gets the base row total for the invoice item.
  158. *
  159. * @return float|null Base row total.
  160. */
  161. public function getBaseRowTotal();
  162. /**
  163. * Gets the base row total including tax for the invoice item.
  164. *
  165. * @return float|null Base row total including tax.
  166. */
  167. public function getBaseRowTotalInclTax();
  168. /**
  169. * Gets the base tax amount for the invoice item.
  170. *
  171. * @return float|null Base tax amount.
  172. */
  173. public function getBaseTaxAmount();
  174. /**
  175. * Gets the description for the invoice item.
  176. *
  177. * @return string|null Description.
  178. */
  179. public function getDescription();
  180. /**
  181. * Gets the discount amount for the invoice item.
  182. *
  183. * @return float|null Discount amount.
  184. */
  185. public function getDiscountAmount();
  186. /**
  187. * Gets the ID for the invoice item.
  188. *
  189. * @return int|null Invoice item ID.
  190. */
  191. public function getEntityId();
  192. /**
  193. * Sets entity ID.
  194. *
  195. * @param int $entityId
  196. * @return $this
  197. */
  198. public function setEntityId($entityId);
  199. /**
  200. * Gets the discount tax compensation amount for the invoice item.
  201. *
  202. * @return float|null Discount tax compensation amount.
  203. */
  204. public function getDiscountTaxCompensationAmount();
  205. /**
  206. * Gets the name for the invoice item.
  207. *
  208. * @return string|null Name.
  209. */
  210. public function getName();
  211. /**
  212. * Gets the parent ID for the invoice item.
  213. *
  214. * @return int|null Parent ID.
  215. */
  216. public function getParentId();
  217. /**
  218. * Gets the price for the invoice item.
  219. *
  220. * @return float|null Price.
  221. */
  222. public function getPrice();
  223. /**
  224. * Gets the price including tax for the invoice item.
  225. *
  226. * @return float|null Price including tax.
  227. */
  228. public function getPriceInclTax();
  229. /**
  230. * Gets the product ID for the invoice item.
  231. *
  232. * @return int|null Product ID.
  233. */
  234. public function getProductId();
  235. /**
  236. * Gets the row total for the invoice item.
  237. *
  238. * @return float|null Row total.
  239. */
  240. public function getRowTotal();
  241. /**
  242. * Gets the row total including tax for the invoice item.
  243. *
  244. * @return float|null Row total including tax.
  245. */
  246. public function getRowTotalInclTax();
  247. /**
  248. * Gets the SKU for the invoice item.
  249. *
  250. * @return string SKU.
  251. */
  252. public function getSku();
  253. /**
  254. * Gets the tax amount for the invoice item.
  255. *
  256. * @return float|null Tax amount.
  257. */
  258. public function getTaxAmount();
  259. /**
  260. * Sets the parent ID for the invoice item.
  261. *
  262. * @param int $id
  263. * @return $this
  264. */
  265. public function setParentId($id);
  266. /**
  267. * Sets the base price for the invoice item.
  268. *
  269. * @param float $price
  270. * @return $this
  271. */
  272. public function setBasePrice($price);
  273. /**
  274. * Sets the tax amount for the invoice item.
  275. *
  276. * @param float $amount
  277. * @return $this
  278. */
  279. public function setTaxAmount($amount);
  280. /**
  281. * Sets the base row total for the invoice item.
  282. *
  283. * @param float $amount
  284. * @return $this
  285. */
  286. public function setBaseRowTotal($amount);
  287. /**
  288. * Sets the discount amount for the invoice item.
  289. *
  290. * @param float $amount
  291. * @return $this
  292. */
  293. public function setDiscountAmount($amount);
  294. /**
  295. * Sets the row total for the invoice item.
  296. *
  297. * @param float $amount
  298. * @return $this
  299. */
  300. public function setRowTotal($amount);
  301. /**
  302. * Sets the base discount amount for the invoice item.
  303. *
  304. * @param float $amount
  305. * @return $this
  306. */
  307. public function setBaseDiscountAmount($amount);
  308. /**
  309. * Sets the price including tax for the invoice item.
  310. *
  311. * @param float $amount
  312. * @return $this
  313. */
  314. public function setPriceInclTax($amount);
  315. /**
  316. * Sets the base tax amount for the invoice item.
  317. *
  318. * @param float $amount
  319. * @return $this
  320. */
  321. public function setBaseTaxAmount($amount);
  322. /**
  323. * Sets the base price including tax for the invoice item.
  324. *
  325. * @param float $amount
  326. * @return $this
  327. */
  328. public function setBasePriceInclTax($amount);
  329. /**
  330. * Sets the base cost for the invoice item.
  331. *
  332. * @param float $baseCost
  333. * @return $this
  334. */
  335. public function setBaseCost($baseCost);
  336. /**
  337. * Sets the price for the invoice item.
  338. *
  339. * @param float $price
  340. * @return $this
  341. */
  342. public function setPrice($price);
  343. /**
  344. * Sets the base row total including tax for the invoice item.
  345. *
  346. * @param float $amount
  347. * @return $this
  348. */
  349. public function setBaseRowTotalInclTax($amount);
  350. /**
  351. * Sets the row total including tax for the invoice item.
  352. *
  353. * @param float $amount
  354. * @return $this
  355. */
  356. public function setRowTotalInclTax($amount);
  357. /**
  358. * Sets the product ID for the invoice item.
  359. *
  360. * @param int $id
  361. * @return $this
  362. */
  363. public function setProductId($id);
  364. /**
  365. * Sets the additional data for the invoice item.
  366. *
  367. * @param string $additionalData
  368. * @return $this
  369. */
  370. public function setAdditionalData($additionalData);
  371. /**
  372. * Sets the description for the invoice item.
  373. *
  374. * @param string $description
  375. * @return $this
  376. */
  377. public function setDescription($description);
  378. /**
  379. * Sets the SKU for the invoice item.
  380. *
  381. * @param string $sku
  382. * @return $this
  383. */
  384. public function setSku($sku);
  385. /**
  386. * Sets the name for the invoice item.
  387. *
  388. * @param string $name
  389. * @return $this
  390. */
  391. public function setName($name);
  392. /**
  393. * Sets the discount tax compensation amount for the invoice item.
  394. *
  395. * @param float $amount
  396. * @return $this
  397. */
  398. public function setDiscountTaxCompensationAmount($amount);
  399. /**
  400. * Sets the base discount tax compensation amount for the invoice item.
  401. *
  402. * @param float $amount
  403. * @return $this
  404. */
  405. public function setBaseDiscountTaxCompensationAmount($amount);
  406. /**
  407. * Retrieve existing extension attributes object or create a new one.
  408. *
  409. * @return \Magento\Sales\Api\Data\InvoiceItemExtensionInterface|null
  410. */
  411. public function getExtensionAttributes();
  412. /**
  413. * Set an extension attributes object.
  414. *
  415. * @param \Magento\Sales\Api\Data\InvoiceItemExtensionInterface $extensionAttributes
  416. * @return $this
  417. */
  418. public function setExtensionAttributes(\Magento\Sales\Api\Data\InvoiceItemExtensionInterface $extensionAttributes);
  419. }