PriceInterface.php 949 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Pricing\Price;
  7. use Magento\Framework\Pricing\Amount\AmountInterface;
  8. /**
  9. * Catalog price interface
  10. *
  11. * @api
  12. * @since 100.0.2
  13. */
  14. interface PriceInterface
  15. {
  16. /**
  17. * Get price type code
  18. *
  19. * @return string
  20. */
  21. public function getPriceCode();
  22. /**
  23. * Get price value
  24. *
  25. * @return float
  26. */
  27. public function getValue();
  28. /**
  29. * Get Price Amount object
  30. *
  31. * @return AmountInterface
  32. */
  33. public function getAmount();
  34. /**
  35. * Get Custom Amount object
  36. * (specify adjustment code to exclude)
  37. *
  38. * @param float $amount
  39. * @param null|bool|string|array $exclude
  40. * @param null|array $context
  41. * @return AmountInterface
  42. */
  43. public function getCustomAmount($amount = null, $exclude = null, $context = []);
  44. }