Currencies.parse
Last updated
Was this helpful?
Last updated
Was this helpful?
This method is extremely useful if you have a database/list of monetary amounts that contain their currency ISO code. 'Currencies.parse' will create a Money
instance 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 known currency code.
Before you can use Currencies.parse
you need to ensure that all of the imported currencies are included in or you have any additional currencies
If you try to create a Money
instance for an unregistered Currency
an UknownCurrencyException
will be thrown.