QuoteDetailsItemInterface.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Tax\Api\Data;
  7. /**
  8. * Quote details item interface.
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface QuoteDetailsItemInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  13. {
  14. /**
  15. * Get code (sku or shipping code)
  16. *
  17. * @return string|null
  18. */
  19. public function getCode();
  20. /**
  21. * Set code (sku or shipping code)
  22. *
  23. * @param string $code
  24. * @return $this
  25. */
  26. public function setCode($code);
  27. /**
  28. * Get type (e.g., shipping, product, wee, gift wrapping, etc.)
  29. *
  30. * @return string|null
  31. */
  32. public function getType();
  33. /**
  34. * Set type (e.g., shipping, product, wee, gift wrapping, etc.)
  35. *
  36. * @param string $type
  37. * @return $this
  38. */
  39. public function setType($type);
  40. /**
  41. * Get tax class key
  42. *
  43. * @return \Magento\Tax\Api\Data\TaxClassKeyInterface
  44. */
  45. public function getTaxClassKey();
  46. /**
  47. * Set tax class key
  48. *
  49. * @param \Magento\Tax\Api\Data\TaxClassKeyInterface $taxClassKey
  50. * @return $this
  51. */
  52. public function setTaxClassKey(\Magento\Tax\Api\Data\TaxClassKeyInterface $taxClassKey = null);
  53. /**
  54. * Get unit price
  55. *
  56. * @return float
  57. */
  58. public function getUnitPrice();
  59. /**
  60. * Set unit price
  61. *
  62. * @param float $unitPrice
  63. * @return $this
  64. */
  65. public function setUnitPrice($unitPrice);
  66. /**
  67. * Get quantity
  68. *
  69. * @return float
  70. */
  71. public function getQuantity();
  72. /**
  73. * Set quantity
  74. *
  75. * @param float $quantity
  76. * @return $this
  77. */
  78. public function setQuantity($quantity);
  79. /**
  80. * Get indicate that if the tax is included in the unit price and row total
  81. *
  82. * @return bool
  83. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  84. */
  85. public function getIsTaxIncluded();
  86. /**
  87. * Set whether the tax is included in the unit price and row total
  88. *
  89. * @param bool $isTaxIncluded
  90. * @return $this
  91. */
  92. public function setIsTaxIncluded($isTaxIncluded);
  93. /**
  94. * Get short description
  95. *
  96. * @return string|null
  97. */
  98. public function getShortDescription();
  99. /**
  100. * Set short description
  101. *
  102. * @param string $shortDescription
  103. * @return $this
  104. */
  105. public function setShortDescription($shortDescription);
  106. /**
  107. * Get discount amount
  108. *
  109. * @return float
  110. */
  111. public function getDiscountAmount();
  112. /**
  113. * Set discount amount
  114. *
  115. * @param float $discountAmount
  116. * @return $this
  117. */
  118. public function setDiscountAmount($discountAmount);
  119. /**
  120. * Get parent code if this item is a child, null if this is a top level item.
  121. *
  122. * @return string|null
  123. */
  124. public function getParentCode();
  125. /**
  126. * Set parent code
  127. *
  128. * @param string $parentCode
  129. * @return $this
  130. */
  131. public function setParentCode($parentCode);
  132. /**
  133. * Get associated item code if this item is associated with another item, null otherwise
  134. *
  135. * @return int|null
  136. */
  137. public function getAssociatedItemCode();
  138. /**
  139. * Set associated item code
  140. *
  141. * @param int $associatedItemCode
  142. * @return $this
  143. */
  144. public function setAssociatedItemCode($associatedItemCode);
  145. /**
  146. * Get associated item tax class id
  147. *
  148. * @return int
  149. */
  150. public function getTaxClassId();
  151. /**
  152. * Set associated item tax class id
  153. *
  154. * @param int $taxClassId
  155. * @return $this
  156. */
  157. public function setTaxClassId($taxClassId);
  158. /**
  159. * Retrieve existing extension attributes object or create a new one.
  160. *
  161. * @return \Magento\Tax\Api\Data\QuoteDetailsItemExtensionInterface|null
  162. */
  163. public function getExtensionAttributes();
  164. /**
  165. * Set an extension attributes object.
  166. *
  167. * @param \Magento\Tax\Api\Data\QuoteDetailsItemExtensionInterface $extensionAttributes
  168. * @return $this
  169. */
  170. public function setExtensionAttributes(
  171. \Magento\Tax\Api\Data\QuoteDetailsItemExtensionInterface $extensionAttributes
  172. );
  173. }