TotalsItemInterface.php 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Quote\Api\Data;
  7. /**
  8. * Interface TotalsItemInterface
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface TotalsItemInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  13. {
  14. /**#@+
  15. * Constants defined for keys of array, makes typos less likely
  16. */
  17. /**
  18. * Item id.
  19. */
  20. const KEY_ITEM_ID = 'item_id';
  21. /**
  22. * Price.
  23. */
  24. const KEY_PRICE = 'price';
  25. /**
  26. * Base price.
  27. */
  28. const KEY_BASE_PRICE = 'base_price';
  29. /**
  30. * Quantity.
  31. */
  32. const KEY_QTY = 'qty';
  33. /**
  34. * Row total.
  35. */
  36. const KEY_ROW_TOTAL = 'row_total';
  37. /**
  38. * Base row total.
  39. */
  40. const KEY_BASE_ROW_TOTAL = 'base_row_total';
  41. /**
  42. * Row total with discount.
  43. */
  44. const KEY_ROW_TOTAL_WITH_DISCOUNT = 'row_total_with_discount';
  45. /**
  46. * Discount amount.
  47. */
  48. const KEY_DISCOUNT_AMOUNT = 'discount_amount';
  49. /**
  50. * Base discount amount.
  51. */
  52. const KEY_BASE_DISCOUNT_AMOUNT = 'base_discount_amount';
  53. /**
  54. * Discount percent.
  55. */
  56. const KEY_DISCOUNT_PERCENT = 'discount_percent';
  57. /**
  58. * Tax amount.
  59. */
  60. const KEY_TAX_AMOUNT = 'tax_amount';
  61. /**
  62. * Base tax amount.
  63. */
  64. const KEY_BASE_TAX_AMOUNT = 'base_tax_amount';
  65. /**
  66. * Tax percent.
  67. */
  68. const KEY_TAX_PERCENT = 'tax_percent';
  69. /**
  70. * Price including tax.
  71. */
  72. const KEY_PRICE_INCL_TAX = 'price_incl_tax';
  73. /**
  74. * Base price including tax.
  75. */
  76. const KEY_BASE_PRICE_INCL_TAX = 'base_price_incl_tax';
  77. /**
  78. * Row total including tax.
  79. */
  80. const KEY_ROW_TOTAL_INCL_TAX = 'row_total_incl_tax';
  81. /**
  82. * Base row total including tax.
  83. */
  84. const KEY_BASE_ROW_TOTAL_INCL_TAX = 'base_row_total_incl_tax';
  85. /**
  86. * Item options data.
  87. */
  88. const KEY_OPTIONS = 'options';
  89. /**
  90. * Item Weee Tax Applied Amount.
  91. */
  92. const KEY_WEEE_TAX_APPLIED_AMOUNT = 'weee_tax_applied_amount';
  93. /**
  94. * Item Weee Tax Applied Amount.
  95. */
  96. const KEY_WEEE_TAX_APPLIED = 'weee_tax_applied';
  97. /**
  98. * Item name.
  99. */
  100. const KEY_NAME = 'name';
  101. /**#@-*/
  102. /**
  103. * Set totals item id
  104. *
  105. * @param int $id
  106. * @return $this
  107. */
  108. public function setItemId($id);
  109. /**
  110. * Get totals item id
  111. *
  112. * @return int Item id
  113. */
  114. public function getItemId();
  115. /**
  116. * Returns the item price in quote currency.
  117. *
  118. * @return float Item price in quote currency.
  119. */
  120. public function getPrice();
  121. /**
  122. * Sets the item price in quote currency.
  123. *
  124. * @param float $price
  125. * @return $this
  126. */
  127. public function setPrice($price);
  128. /**
  129. * Returns the item price in base currency.
  130. *
  131. * @return float Item price in base currency.
  132. */
  133. public function getBasePrice();
  134. /**
  135. * Sets the item price in base currency.
  136. *
  137. * @param float $basePrice
  138. * @return $this
  139. */
  140. public function setBasePrice($basePrice);
  141. /**
  142. * Returns the item quantity.
  143. *
  144. * @return float Item quantity.
  145. */
  146. public function getQty();
  147. /**
  148. * Sets the item quantity.
  149. *
  150. * @param float $qty
  151. * @return $this
  152. */
  153. public function setQty($qty);
  154. /**
  155. * Returns the row total in quote currency.
  156. *
  157. * @return float Row total in quote currency.
  158. */
  159. public function getRowTotal();
  160. /**
  161. * Sets the row total in quote currency.
  162. *
  163. * @param float $rowTotal
  164. * @return $this
  165. */
  166. public function setRowTotal($rowTotal);
  167. /**
  168. * Returns the row total in base currency.
  169. *
  170. * @return float Row total in base currency.
  171. */
  172. public function getBaseRowTotal();
  173. /**
  174. * Sets the row total in base currency.
  175. *
  176. * @param float $baseRowTotal
  177. * @return $this
  178. */
  179. public function setBaseRowTotal($baseRowTotal);
  180. /**
  181. * Returns the row total with discount in quote currency.
  182. *
  183. * @return float|null Row total with discount in quote currency. Otherwise, null.
  184. */
  185. public function getRowTotalWithDiscount();
  186. /**
  187. * Sets the row total with discount in quote currency.
  188. *
  189. * @param float $rowTotalWithDiscount
  190. * @return $this
  191. */
  192. public function setRowTotalWithDiscount($rowTotalWithDiscount);
  193. /**
  194. * Returns the tax amount in quote currency.
  195. *
  196. * @return float|null Tax amount in quote currency. Otherwise, null.
  197. */
  198. public function getTaxAmount();
  199. /**
  200. * Sets the tax amount in quote currency.
  201. *
  202. * @param float $taxAmount
  203. * @return $this
  204. */
  205. public function setTaxAmount($taxAmount);
  206. /**
  207. * Returns the tax amount in base currency.
  208. *
  209. * @return float|null Tax amount in base currency. Otherwise, null.
  210. */
  211. public function getBaseTaxAmount();
  212. /**
  213. * Sets the tax amount in base currency.
  214. *
  215. * @param float $baseTaxAmount
  216. * @return $this
  217. */
  218. public function setBaseTaxAmount($baseTaxAmount);
  219. /**
  220. * Returns the tax percent.
  221. *
  222. * @return float|null Tax percent. Otherwise, null.
  223. */
  224. public function getTaxPercent();
  225. /**
  226. * Sets the tax percent.
  227. *
  228. * @param float $taxPercent
  229. * @return $this
  230. */
  231. public function setTaxPercent($taxPercent);
  232. /**
  233. * Returns the discount amount in quote currency.
  234. *
  235. * @return float|null Discount amount in quote currency. Otherwise, null.
  236. */
  237. public function getDiscountAmount();
  238. /**
  239. * Sets the discount amount in quote currency.
  240. *
  241. * @param float $discountAmount
  242. * @return $this
  243. */
  244. public function setDiscountAmount($discountAmount);
  245. /**
  246. * Returns the discount amount in base currency.
  247. *
  248. * @return float|null Discount amount in base currency. Otherwise, null.
  249. */
  250. public function getBaseDiscountAmount();
  251. /**
  252. * Sets the discount amount in base currency.
  253. *
  254. * @param float $baseDiscountAmount
  255. * @return $this
  256. */
  257. public function setBaseDiscountAmount($baseDiscountAmount);
  258. /**
  259. * Returns the discount percent.
  260. *
  261. * @return float|null Discount percent. Otherwise, null.
  262. */
  263. public function getDiscountPercent();
  264. /**
  265. * Sets the discount percent.
  266. *
  267. * @param float $discountPercent
  268. * @return $this
  269. */
  270. public function setDiscountPercent($discountPercent);
  271. /**
  272. * Returns the price including tax in quote currency.
  273. *
  274. * @return float|null Price including tax in quote currency. Otherwise, null.
  275. */
  276. public function getPriceInclTax();
  277. /**
  278. * Sets the price including tax in quote currency.
  279. *
  280. * @param float $priceInclTax
  281. * @return $this
  282. */
  283. public function setPriceInclTax($priceInclTax);
  284. /**
  285. * Returns the price including tax in base currency.
  286. *
  287. * @return float|null Price including tax in base currency. Otherwise, null.
  288. */
  289. public function getBasePriceInclTax();
  290. /**
  291. * Sets the price including tax in base currency.
  292. *
  293. * @param float $basePriceInclTax
  294. * @return $this
  295. */
  296. public function setBasePriceInclTax($basePriceInclTax);
  297. /**
  298. * Returns the row total including tax in quote currency.
  299. *
  300. * @return float|null Row total including tax in quote currency. Otherwise, null.
  301. */
  302. public function getRowTotalInclTax();
  303. /**
  304. * Sets the row total including tax in quote currency.
  305. *
  306. * @param float $rowTotalInclTax
  307. * @return $this
  308. */
  309. public function setRowTotalInclTax($rowTotalInclTax);
  310. /**
  311. * Returns the row total including tax in base currency.
  312. *
  313. * @return float|null Row total including tax in base currency. Otherwise, null.
  314. */
  315. public function getBaseRowTotalInclTax();
  316. /**
  317. * Sets the row total including tax in base currency.
  318. *
  319. * @param float $baseRowTotalInclTax
  320. * @return $this
  321. */
  322. public function setBaseRowTotalInclTax($baseRowTotalInclTax);
  323. /**
  324. * Returns the item options data.
  325. *
  326. * @return string Item price in quote currency.
  327. */
  328. public function getOptions();
  329. /**
  330. * Sets the item options data.
  331. *
  332. * @param string $options
  333. * @return $this
  334. */
  335. public function setOptions($options);
  336. /**
  337. * Returns the item weee tax applied amount in quote currency.
  338. *
  339. * @return float Item weee tax applied amount in quote currency.
  340. */
  341. public function getWeeeTaxAppliedAmount();
  342. /**
  343. * Sets the item weee tax applied amount in quote currency.
  344. *
  345. * @param float $weeeTaxAppliedAmount
  346. * @return $this
  347. */
  348. public function setWeeeTaxAppliedAmount($weeeTaxAppliedAmount);
  349. /**
  350. * Returns the item weee tax applied in quote currency.
  351. *
  352. * @return string Item weee tax applied in quote currency.
  353. */
  354. public function getWeeeTaxApplied();
  355. /**
  356. * Sets the item weee tax applied in quote currency.
  357. *
  358. * @param string $weeeTaxApplied
  359. * @return $this
  360. */
  361. public function setWeeeTaxApplied($weeeTaxApplied);
  362. /**
  363. * Retrieve existing extension attributes object or create a new one.
  364. *
  365. * @return \Magento\Quote\Api\Data\TotalsItemExtensionInterface|null
  366. */
  367. public function getExtensionAttributes();
  368. /**
  369. * Returns the product name.
  370. *
  371. * @return string|null Product name. Otherwise, null.
  372. */
  373. public function getName();
  374. /**
  375. * Sets the product name.
  376. *
  377. * @param string $name
  378. * @return $this
  379. */
  380. public function setName($name);
  381. /**
  382. * Set an extension attributes object.
  383. *
  384. * @param \Magento\Quote\Api\Data\TotalsItemExtensionInterface $extensionAttributes
  385. * @return $this
  386. */
  387. public function setExtensionAttributes(\Magento\Quote\Api\Data\TotalsItemExtensionInterface $extensionAttributes);
  388. }