LinkInterface.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Bundle\Api\Data;
  8. /**
  9. * Interface LinkInterface
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface LinkInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  14. {
  15. const PRICE_TYPE_FIXED = 0;
  16. const PRICE_TYPE_PERCENT = 1;
  17. /**
  18. * Get the identifier
  19. *
  20. * @return string|null
  21. */
  22. public function getId();
  23. /**
  24. * Set id
  25. *
  26. * @param string $id
  27. * @return $this
  28. */
  29. public function setId($id);
  30. /**
  31. * Get linked product sku
  32. *
  33. * @return string|null
  34. */
  35. public function getSku();
  36. /**
  37. * Set linked product sku
  38. *
  39. * @param string $sku
  40. * @return $this
  41. */
  42. public function setSku($sku);
  43. /**
  44. * Get option id
  45. *
  46. * @return int|null
  47. */
  48. public function getOptionId();
  49. /**
  50. * Set option id
  51. *
  52. * @param int $optionId
  53. * @return $this
  54. */
  55. public function setOptionId($optionId);
  56. /**
  57. * Get qty
  58. *
  59. * @return float|null
  60. */
  61. public function getQty();
  62. /**
  63. * Set qty
  64. *
  65. * @param float $qty
  66. * @return $this
  67. */
  68. public function setQty($qty);
  69. /**
  70. * Get position
  71. *
  72. * @return int|null
  73. */
  74. public function getPosition();
  75. /**
  76. * Set position
  77. *
  78. * @param int $position
  79. * @return $this
  80. */
  81. public function setPosition($position);
  82. /**
  83. * Get is default
  84. *
  85. * @return bool
  86. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  87. */
  88. public function getIsDefault();
  89. /**
  90. * Set is default
  91. *
  92. * @param bool $isDefault
  93. * @return $this
  94. */
  95. public function setIsDefault($isDefault);
  96. /**
  97. * Get price
  98. *
  99. * @return float
  100. */
  101. public function getPrice();
  102. /**
  103. * Set price
  104. *
  105. * @param float $price
  106. * @return $this
  107. */
  108. public function setPrice($price);
  109. /**
  110. * Get price type
  111. *
  112. * @return int
  113. */
  114. public function getPriceType();
  115. /**
  116. * Set price type
  117. *
  118. * @param int $priceType
  119. * @return $this
  120. */
  121. public function setPriceType($priceType);
  122. /**
  123. * Get whether quantity could be changed
  124. *
  125. * @return int|null
  126. */
  127. public function getCanChangeQuantity();
  128. /**
  129. * Set whether quantity could be changed
  130. *
  131. * @param int $canChangeQuantity
  132. * @return $this
  133. */
  134. public function setCanChangeQuantity($canChangeQuantity);
  135. /**
  136. * Retrieve existing extension attributes object or create a new one.
  137. *
  138. * @return \Magento\Bundle\Api\Data\LinkExtensionInterface|null
  139. */
  140. public function getExtensionAttributes();
  141. /**
  142. * Set an extension attributes object.
  143. *
  144. * @param \Magento\Bundle\Api\Data\LinkExtensionInterface $extensionAttributes
  145. * @return $this
  146. */
  147. public function setExtensionAttributes(\Magento\Bundle\Api\Data\LinkExtensionInterface $extensionAttributes);
  148. }