google_currency icon indicating copy to clipboard operation
google_currency copied to clipboard

Issue while converting from Indonesian currency to British Pound

Open sachin87 opened this issue 11 years ago • 3 comments

I tried using google currency converter its giving me error while converting currency from Indonesian rupee(IDR) to British pound(GBP).

subunit_to_unit = Money.new(1, "GBP").currency.subunit_to_unit
=> 100
Money.new(0*subunit_to_unit, 'IDR').exchange_to("GBP")
*** Money::Bank::UnknownRate Exception: Money::Bank::UnknownRate

Thanks for help

sachin87 avatar Jul 15 '15 11:07 sachin87

This library uses Google Finance Converter under the hood.

Looks like Google does not return an exchange rate for IDR and GBP. https://www.google.com/finance/converter

yinquanteo avatar Jul 16 '15 08:07 yinquanteo

can i get a list of currencies that are convertible from one current currency. Example: in the above case if IDR cannot be converted to GBP so i need list of currencies out of Money::Currency.all, i.e. all currencies except GBP?

sachin87 avatar Jul 16 '15 09:07 sachin87

Unfortunately that's at the discretion of the underlying service. You could figure it out and then write a patch.

semmons99 avatar Jul 16 '15 15:07 semmons99