BasePriceInterface.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. * Price interface.
  9. * @api
  10. * @since 102.0.0
  11. */
  12. interface BasePriceInterface 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. /**#@-*/
  21. /**
  22. * Set price.
  23. *
  24. * @param float $price
  25. * @return $this
  26. * @since 102.0.0
  27. */
  28. public function setPrice($price);
  29. /**
  30. * Get price.
  31. *
  32. * @return float
  33. * @since 102.0.0
  34. */
  35. public function getPrice();
  36. /**
  37. * Set store id.
  38. *
  39. * @param int $storeId
  40. * @return $this
  41. * @since 102.0.0
  42. */
  43. public function setStoreId($storeId);
  44. /**
  45. * Get store id.
  46. *
  47. * @return int
  48. * @since 102.0.0
  49. */
  50. public function getStoreId();
  51. /**
  52. * Set SKU.
  53. *
  54. * @param string $sku
  55. * @return $this
  56. * @since 102.0.0
  57. */
  58. public function setSku($sku);
  59. /**
  60. * Get SKU.
  61. *
  62. * @return string
  63. * @since 102.0.0
  64. */
  65. public function getSku();
  66. /**
  67. * Retrieve existing extension attributes object or create a new one.
  68. *
  69. * @return \Magento\Catalog\Api\Data\BasePriceExtensionInterface|null
  70. * @since 102.0.0
  71. */
  72. public function getExtensionAttributes();
  73. /**
  74. * Set an extension attributes object.
  75. *
  76. * @param \Magento\Catalog\Api\Data\BasePriceExtensionInterface $extensionAttributes
  77. * @return $this
  78. * @since 102.0.0
  79. */
  80. public function setExtensionAttributes(
  81. \Magento\Catalog\Api\Data\BasePriceExtensionInterface $extensionAttributes
  82. );
  83. }