This method is extremely useful if you have a database/list of monetary amounts that contain their currency code. 'Currencies.parse' will create a
Moneyinstance of the correct currency based on the currency code embedded in the monetary amount.
An exception will be thrown if the monetary amount does not include a currency code.
Before you can use
Currencies.parseyou need to ensure that all of the imported currencies are included in Common Currencies or you have registered any additional currencies
If you try to create a
Moneyinstance for an unregistered
UknownCurrencyExceptionwill be thrown.
Money usdAmount = Currencies.parse(r'$USD10.25', 'SCCC0.0');
Money jpyAmount = Currencies.parse('JPY100', 'CCC0');