CreditmemoItemInterface.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667
  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. * Credit memo item interface.
  9. *
  10. * After a customer places and pays for an order and an invoice has been issued, the merchant can create a credit memo
  11. * to refund all or part of the amount paid for any returned or undelivered items. The memo restores funds to the
  12. * customer account so that the customer can make future purchases. A credit memo item is an invoiced item for which
  13. * a merchant creates a credit memo.
  14. * @api
  15. * @since 100.0.2
  16. */
  17. interface CreditmemoItemInterface extends \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. * Credit memo item ID.
  24. */
  25. const ENTITY_ID = 'entity_id';
  26. /*
  27. * Parent ID.
  28. */
  29. const PARENT_ID = 'parent_id';
  30. /*
  31. * Base price.
  32. */
  33. const BASE_PRICE = 'base_price';
  34. /*
  35. * Tax amount.
  36. */
  37. const TAX_AMOUNT = 'tax_amount';
  38. /*
  39. * Base row total.
  40. */
  41. const BASE_ROW_TOTAL = 'base_row_total';
  42. /*
  43. * Base row total.
  44. */
  45. const DISCOUNT_AMOUNT = 'discount_amount';
  46. /*
  47. * Row total.
  48. */
  49. const ROW_TOTAL = 'row_total';
  50. /*
  51. * Base discount amount.
  52. */
  53. const BASE_DISCOUNT_AMOUNT = 'base_discount_amount';
  54. /*
  55. * Price including tax.
  56. */
  57. const PRICE_INCL_TAX = 'price_incl_tax';
  58. /*
  59. * Base tax amount.
  60. */
  61. const BASE_TAX_AMOUNT = 'base_tax_amount';
  62. /*
  63. * Base price including tax.
  64. */
  65. const BASE_PRICE_INCL_TAX = 'base_price_incl_tax';
  66. /*
  67. * Quantity.
  68. */
  69. const QTY = 'qty';
  70. /*
  71. * Base cost.
  72. */
  73. const BASE_COST = 'base_cost';
  74. /*
  75. * Price.
  76. */
  77. const PRICE = 'price';
  78. /*
  79. * Base row total including tax.
  80. */
  81. const BASE_ROW_TOTAL_INCL_TAX = 'base_row_total_incl_tax';
  82. /*
  83. * Row total including tax.
  84. */
  85. const ROW_TOTAL_INCL_TAX = 'row_total_incl_tax';
  86. /*
  87. * Product ID.
  88. */
  89. const PRODUCT_ID = 'product_id';
  90. /*
  91. * Order item ID.
  92. */
  93. const ORDER_ITEM_ID = 'order_item_id';
  94. /*
  95. * Additional data.
  96. */
  97. const ADDITIONAL_DATA = 'additional_data';
  98. /*
  99. * Description.
  100. */
  101. const DESCRIPTION = 'description';
  102. /*
  103. * SKU.
  104. */
  105. const SKU = 'sku';
  106. /*
  107. * Name.
  108. */
  109. const NAME = 'name';
  110. /*
  111. * Discount tax compensation amount.
  112. */
  113. const DISCOUNT_TAX_COMPENSATION_AMOUNT = 'discount_tax_compensation_amount';
  114. /*
  115. * Base discount tax compensation amount.
  116. */
  117. const BASE_DISCOUNT_TAX_COMPENSATION_AMOUNT = 'base_discount_tax_compensation_amount';
  118. /*
  119. * WEEE tax disposition.
  120. */
  121. const WEEE_TAX_DISPOSITION = 'weee_tax_disposition';
  122. /*
  123. * WEEE tax row disposition.
  124. */
  125. const WEEE_TAX_ROW_DISPOSITION = 'weee_tax_row_disposition';
  126. /*
  127. * Base WEEE tax disposition.
  128. */
  129. const BASE_WEEE_TAX_DISPOSITION = 'base_weee_tax_disposition';
  130. /*
  131. * Base WEEE tax row disposition.
  132. */
  133. const BASE_WEEE_TAX_ROW_DISPOSITION = 'base_weee_tax_row_disposition';
  134. /*
  135. * WEEE tax applied.
  136. */
  137. const WEEE_TAX_APPLIED = 'weee_tax_applied';
  138. /*
  139. * Base WEEE tax applied amount.
  140. */
  141. const BASE_WEEE_TAX_APPLIED_AMOUNT = 'base_weee_tax_applied_amount';
  142. /*
  143. * Base WEEE tax applied row amount.
  144. */
  145. const BASE_WEEE_TAX_APPLIED_ROW_AMNT = 'base_weee_tax_applied_row_amnt';
  146. /*
  147. * WEEE tax applied amount.
  148. */
  149. const WEEE_TAX_APPLIED_AMOUNT = 'weee_tax_applied_amount';
  150. /*
  151. * WEEE tax applied row amount.
  152. */
  153. const WEEE_TAX_APPLIED_ROW_AMOUNT = 'weee_tax_applied_row_amount';
  154. /**
  155. * Gets the additional data for a credit memo item.
  156. *
  157. * @return string|null Additional data.
  158. */
  159. public function getAdditionalData();
  160. /**
  161. * Gets the base cost for a credit memo item.
  162. *
  163. * @return float
  164. */
  165. public function getBaseCost();
  166. /**
  167. * Gets the base discount amount for a credit memo item.
  168. *
  169. * @return float|null
  170. */
  171. public function getBaseDiscountAmount();
  172. /**
  173. * Gets the base discount tax compensation amount for a credit memo item.
  174. *
  175. * @return float|null
  176. */
  177. public function getBaseDiscountTaxCompensationAmount();
  178. /**
  179. * Gets the base price for a credit memo item.
  180. *
  181. * @return float
  182. */
  183. public function getBasePrice();
  184. /**
  185. * Gets the base price including tax for a credit memo item.
  186. *
  187. * @return float|null Base price including tax.
  188. */
  189. public function getBasePriceInclTax();
  190. /**
  191. * Gets the base row total for a credit memo item.
  192. *
  193. * @return float|null Base row total.
  194. */
  195. public function getBaseRowTotal();
  196. /**
  197. * Gets the base row total including tax for a credit memo item.
  198. *
  199. * @return float|null Base row total including tax.
  200. */
  201. public function getBaseRowTotalInclTax();
  202. /**
  203. * Gets the base tax amount for a credit memo item.
  204. *
  205. * @return float|null Base tax amount.
  206. */
  207. public function getBaseTaxAmount();
  208. /**
  209. * Gets the base WEEE tax applied amount for a credit memo item.
  210. *
  211. * @return float|null Base WEEE tax applied amount.
  212. */
  213. public function getBaseWeeeTaxAppliedAmount();
  214. /**
  215. * Gets the base WEEE tax applied row amount for a credit memo item.
  216. *
  217. * @return float|null Base WEEE tax applied row amount.
  218. */
  219. public function getBaseWeeeTaxAppliedRowAmnt();
  220. /**
  221. * Gets the base WEEE tax disposition for a credit memo item.
  222. *
  223. * @return float|null Base WEEE tax disposition.
  224. */
  225. public function getBaseWeeeTaxDisposition();
  226. /**
  227. * Gets the base WEEE tax row disposition for a credit memo item.
  228. *
  229. * @return float|null Base WEEE tax row disposition.
  230. */
  231. public function getBaseWeeeTaxRowDisposition();
  232. /**
  233. * Gets the description for a credit memo item.
  234. *
  235. * @return string|null Description.
  236. */
  237. public function getDescription();
  238. /**
  239. * Gets the discount amount for a credit memo item.
  240. *
  241. * @return float|null Discount amount.
  242. */
  243. public function getDiscountAmount();
  244. /**
  245. * Gets the ID for a credit memo item.
  246. *
  247. * @return int Credit memo item ID.
  248. */
  249. public function getEntityId();
  250. /**
  251. * Sets entity ID.
  252. *
  253. * @param int $entityId
  254. * @return $this
  255. */
  256. public function setEntityId($entityId);
  257. /**
  258. * Gets the discount tax compensation amount for a credit memo item.
  259. *
  260. * @return float|null Discount tax compensation amount.
  261. */
  262. public function getDiscountTaxCompensationAmount();
  263. /**
  264. * Gets the name for a credit memo item.
  265. *
  266. * @return string|null Name.
  267. */
  268. public function getName();
  269. /**
  270. * Gets the order item ID for a credit memo item.
  271. *
  272. * @return int Order item ID.
  273. */
  274. public function getOrderItemId();
  275. /**
  276. * Gets the parent ID for a credit memo item.
  277. *
  278. * @return int|null Parent ID.
  279. */
  280. public function getParentId();
  281. /**
  282. * Gets the price for a credit memo item.
  283. *
  284. * @return float|null Price.
  285. */
  286. public function getPrice();
  287. /**
  288. * Gets the price including tax for a credit memo item.
  289. *
  290. * @return float|null Price including tax.
  291. */
  292. public function getPriceInclTax();
  293. /**
  294. * Gets the product ID for a credit memo item.
  295. *
  296. * @return int|null Product ID.
  297. */
  298. public function getProductId();
  299. /**
  300. * Gets the quantity for a credit memo item.
  301. *
  302. * @return float Quantity.
  303. */
  304. public function getQty();
  305. /**
  306. * Gets the row total for a credit memo item.
  307. *
  308. * @return float|null Row total.
  309. */
  310. public function getRowTotal();
  311. /**
  312. * Gets the row total including tax for a credit memo item.
  313. *
  314. * @return float|null Row total including tax.
  315. */
  316. public function getRowTotalInclTax();
  317. /**
  318. * Gets the SKU for a credit memo item.
  319. *
  320. * @return string|null SKU.
  321. */
  322. public function getSku();
  323. /**
  324. * Gets the tax amount for a credit memo item.
  325. *
  326. * @return float|null Tax amount.
  327. */
  328. public function getTaxAmount();
  329. /**
  330. * Gets the WEEE tax applied for a credit memo item.
  331. *
  332. * @return string|null WEEE tax applied.
  333. */
  334. public function getWeeeTaxApplied();
  335. /**
  336. * Gets the WEEE tax applied amount for a credit memo item.
  337. *
  338. * @return float|null WEEE tax applied amount.
  339. */
  340. public function getWeeeTaxAppliedAmount();
  341. /**
  342. * Gets the WEEE tax applied row amount for a credit memo item.
  343. *
  344. * @return float|null WEEE tax applied row amount.
  345. */
  346. public function getWeeeTaxAppliedRowAmount();
  347. /**
  348. * Gets the WEEE tax disposition for a credit memo item.
  349. *
  350. * @return float|null WEEE tax disposition.
  351. */
  352. public function getWeeeTaxDisposition();
  353. /**
  354. * Gets the WEEE tax row disposition for a credit memo item.
  355. *
  356. * @return float|null WEEE tax row disposition.
  357. */
  358. public function getWeeeTaxRowDisposition();
  359. /**
  360. * Sets the parent ID for a credit memo item.
  361. *
  362. * @param int $id
  363. * @return $this
  364. */
  365. public function setParentId($id);
  366. /**
  367. * Sets the base price for a credit memo item.
  368. *
  369. * @param float $price
  370. * @return $this
  371. */
  372. public function setBasePrice($price);
  373. /**
  374. * Sets the tax amount for a credit memo item.
  375. *
  376. * @param float $amount
  377. * @return $this
  378. */
  379. public function setTaxAmount($amount);
  380. /**
  381. * Sets the base row total for a credit memo item.
  382. *
  383. * @param float $amount
  384. * @return $this
  385. */
  386. public function setBaseRowTotal($amount);
  387. /**
  388. * Sets the discount amount for a credit memo item.
  389. *
  390. * @param float $amount
  391. * @return $this
  392. */
  393. public function setDiscountAmount($amount);
  394. /**
  395. * Sets the row total for a credit memo item.
  396. *
  397. * @param float $amount
  398. * @return $this
  399. */
  400. public function setRowTotal($amount);
  401. /**
  402. * Sets the base discount amount for a credit memo item.
  403. *
  404. * @param float $amount
  405. * @return $this
  406. */
  407. public function setBaseDiscountAmount($amount);
  408. /**
  409. * Sets the price including tax for a credit memo item.
  410. *
  411. * @param float $amount
  412. * @return $this
  413. */
  414. public function setPriceInclTax($amount);
  415. /**
  416. * Sets the base tax amount for a credit memo item.
  417. *
  418. * @param float $amount
  419. * @return $this
  420. */
  421. public function setBaseTaxAmount($amount);
  422. /**
  423. * Sets the base price including tax for a credit memo item.
  424. *
  425. * @param float $amount
  426. * @return $this
  427. */
  428. public function setBasePriceInclTax($amount);
  429. /**
  430. * Sets the quantity for a credit memo item.
  431. *
  432. * @param float $qty
  433. * @return $this
  434. */
  435. public function setQty($qty);
  436. /**
  437. * Sets the base cost for a credit memo item.
  438. *
  439. * @param float $baseCost
  440. * @return $this
  441. */
  442. public function setBaseCost($baseCost);
  443. /**
  444. * Sets the price for a credit memo item.
  445. *
  446. * @param float $price
  447. * @return $this
  448. */
  449. public function setPrice($price);
  450. /**
  451. * Sets the base row total including tax for a credit memo item.
  452. *
  453. * @param float $amount
  454. * @return $this
  455. */
  456. public function setBaseRowTotalInclTax($amount);
  457. /**
  458. * Sets the row total including tax for a credit memo item.
  459. *
  460. * @param float $amount
  461. * @return $this
  462. */
  463. public function setRowTotalInclTax($amount);
  464. /**
  465. * Sets the product ID for a credit memo item.
  466. *
  467. * @param int $id
  468. * @return $this
  469. */
  470. public function setProductId($id);
  471. /**
  472. * Sets the order item ID for a credit memo item.
  473. *
  474. * @param int $id
  475. * @return $this
  476. */
  477. public function setOrderItemId($id);
  478. /**
  479. * Sets the additional data for a credit memo item.
  480. *
  481. * @param string $additionalData
  482. * @return $this
  483. */
  484. public function setAdditionalData($additionalData);
  485. /**
  486. * Sets the description for a credit memo item.
  487. *
  488. * @param string $description
  489. * @return $this
  490. */
  491. public function setDescription($description);
  492. /**
  493. * Sets the SKU for a credit memo item.
  494. *
  495. * @param string $sku
  496. * @return $this
  497. */
  498. public function setSku($sku);
  499. /**
  500. * Sets the name for a credit memo item.
  501. *
  502. * @param string $name
  503. * @return $this
  504. */
  505. public function setName($name);
  506. /**
  507. * Sets the discount tax compensation amount for a credit memo item.
  508. *
  509. * @param float $amount
  510. * @return $this
  511. */
  512. public function setDiscountTaxCompensationAmount($amount);
  513. /**
  514. * Sets the base discount tax compensation amount for a credit memo item.
  515. *
  516. * @param float $amount
  517. * @return $this
  518. */
  519. public function setBaseDiscountTaxCompensationAmount($amount);
  520. /**
  521. * Sets the WEEE tax disposition for a credit memo item.
  522. *
  523. * @param float $weeeTaxDisposition
  524. * @return $this
  525. */
  526. public function setWeeeTaxDisposition($weeeTaxDisposition);
  527. /**
  528. * Sets the WEEE tax row disposition for a credit memo item.
  529. *
  530. * @param float $weeeTaxRowDisposition
  531. * @return $this
  532. */
  533. public function setWeeeTaxRowDisposition($weeeTaxRowDisposition);
  534. /**
  535. * Sets the base WEEE tax disposition for a credit memo item.
  536. *
  537. * @param float $baseWeeeTaxDisposition
  538. * @return $this
  539. */
  540. public function setBaseWeeeTaxDisposition($baseWeeeTaxDisposition);
  541. /**
  542. * Sets the base WEEE tax row disposition for a credit memo item.
  543. *
  544. * @param float $baseWeeeTaxRowDisposition
  545. * @return $this
  546. */
  547. public function setBaseWeeeTaxRowDisposition($baseWeeeTaxRowDisposition);
  548. /**
  549. * Sets the WEEE tax applied for a credit memo item.
  550. *
  551. * @param string $weeeTaxApplied
  552. * @return $this
  553. */
  554. public function setWeeeTaxApplied($weeeTaxApplied);
  555. /**
  556. * Sets the base WEEE tax applied amount for a credit memo item.
  557. *
  558. * @param float $amount
  559. * @return $this
  560. */
  561. public function setBaseWeeeTaxAppliedAmount($amount);
  562. /**
  563. * Sets the base WEEE tax applied row amount for a credit memo item.
  564. *
  565. * @param float $amnt
  566. * @return $this
  567. */
  568. public function setBaseWeeeTaxAppliedRowAmnt($amnt);
  569. /**
  570. * Sets the WEEE tax applied amount for a credit memo item.
  571. *
  572. * @param float $amount
  573. * @return $this
  574. */
  575. public function setWeeeTaxAppliedAmount($amount);
  576. /**
  577. * Sets the WEEE tax applied row amount for a credit memo item.
  578. *
  579. * @param float $amount
  580. * @return $this
  581. */
  582. public function setWeeeTaxAppliedRowAmount($amount);
  583. /**
  584. * Retrieve existing extension attributes object or create a new one.
  585. *
  586. * @return \Magento\Sales\Api\Data\CreditmemoItemExtensionInterface|null
  587. */
  588. public function getExtensionAttributes();
  589. /**
  590. * Set an extension attributes object.
  591. *
  592. * @param \Magento\Sales\Api\Data\CreditmemoItemExtensionInterface $extensionAttributes
  593. * @return $this
  594. */
  595. public function setExtensionAttributes(
  596. \Magento\Sales\Api\Data\CreditmemoItemExtensionInterface $extensionAttributes
  597. );
  598. }