SpecialPriceInterface.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Catalog\Api\Data;
  7. /**
  8. * Product Special Price Interface is used to encapsulate data that can be processed by efficient price API.
  9. * @api
  10. * @since 102.0.0
  11. */
  12. interface SpecialPriceInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  13. {
  14. /**#@+
  15. * Constants
  16. */
  17. const PRICE = 'price';
  18. const STORE_ID = 'store_id';
  19. const SKU = 'sku';
  20. const PRICE_FROM = 'price_from';
  21. const PRICE_TO = 'price_to';
  22. /**#@-*/
  23. /**
  24. * Set product special price value.
  25. *
  26. * @param float $price
  27. * @return $this
  28. * @since 102.0.0
  29. */
  30. public function setPrice($price);
  31. /**
  32. * Get product special price value.
  33. *
  34. * @return float
  35. * @since 102.0.0
  36. */
  37. public function getPrice();
  38. /**
  39. * Set ID of store, that contains special price value.
  40. *
  41. * @param int $storeId
  42. * @return $this
  43. * @since 102.0.0
  44. */
  45. public function setStoreId($storeId);
  46. /**
  47. * Get ID of store, that contains special price value.
  48. *
  49. * @return int
  50. * @since 102.0.0
  51. */
  52. public function getStoreId();
  53. /**
  54. * Set SKU of product, that contains special price value.
  55. *
  56. * @param string $sku
  57. * @return $this
  58. * @since 102.0.0
  59. */
  60. public function setSku($sku);
  61. /**
  62. * Get SKU of product, that contains special price value.
  63. *
  64. * @return string
  65. * @since 102.0.0
  66. */
  67. public function getSku();
  68. /**
  69. * Set start date for special price in Y-m-d H:i:s format.
  70. *
  71. * @param string $datetime
  72. * @return $this
  73. * @since 102.0.0
  74. */
  75. public function setPriceFrom($datetime);
  76. /**
  77. * Get start date for special price in Y-m-d H:i:s format.
  78. *
  79. * @return string
  80. * @since 102.0.0
  81. */
  82. public function getPriceFrom();
  83. /**
  84. * Set end date for special price in Y-m-d H:i:s format.
  85. *
  86. * @param string $datetime
  87. * @return $this
  88. * @since 102.0.0
  89. */
  90. public function setPriceTo($datetime);
  91. /**
  92. * Get end date for special price in Y-m-d H:i:s format.
  93. *
  94. * @return string
  95. * @since 102.0.0
  96. */
  97. public function getPriceTo();
  98. /**
  99. * Retrieve existing extension attributes object.
  100. * If extension attributes do not exist return null.
  101. *
  102. * @return \Magento\Catalog\Api\Data\SpecialPriceExtensionInterface|null
  103. * @since 102.0.0
  104. */
  105. public function getExtensionAttributes();
  106. /**
  107. * Set an extension attributes object.
  108. *
  109. * @param \Magento\Catalog\Api\Data\SpecialPriceExtensionInterface $extensionAttributes
  110. * @return $this
  111. * @since 102.0.0
  112. */
  113. public function setExtensionAttributes(
  114. \Magento\Catalog\Api\Data\SpecialPriceExtensionInterface $extensionAttributes
  115. );
  116. }