ExchangeRateInterface.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Directory\Api\Data;
  7. /**
  8. * Exchange Rate interface.
  9. *
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface ExchangeRateInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  14. {
  15. /**
  16. * Get the currency code associated with the exchange rate.
  17. *
  18. * @return string
  19. */
  20. public function getCurrencyTo();
  21. /**
  22. * Set the currency code associated with the exchange rate.
  23. *
  24. * @param string $code
  25. * @return $this
  26. */
  27. public function setCurrencyTo($code);
  28. /**
  29. * Get the exchange rate for the associated currency and the store's base currency.
  30. *
  31. * @return float
  32. */
  33. public function getRate();
  34. /**
  35. * Set the exchange rate for the associated currency and the store's base currency.
  36. *
  37. * @param float $rate
  38. * @return $this
  39. */
  40. public function setRate($rate);
  41. /**
  42. * Retrieve existing extension attributes object or create a new one.
  43. *
  44. * @return \Magento\Directory\Api\Data\ExchangeRateExtensionInterface|null
  45. */
  46. public function getExtensionAttributes();
  47. /**
  48. * Set an extension attributes object.
  49. *
  50. * @param \Magento\Directory\Api\Data\ExchangeRateExtensionInterface $extensionAttributes
  51. * @return $this
  52. */
  53. public function setExtensionAttributes(
  54. \Magento\Directory\Api\Data\ExchangeRateExtensionInterface $extensionAttributes
  55. );
  56. }