RubyMoney / google_currency

Ruby Money::Bank interface for the Google Currency exchange data
http://rubymoney.github.com/google_currency
MIT License
182 stars 90 forks source link

Issue while converting from Indonesian currency to British Pound #41

Closed sachin87 closed 9 years ago

sachin87 commented 9 years ago

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

yinquanteo commented 9 years ago

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

sachin87 commented 9 years ago

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?

semmons99 commented 9 years ago

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