-
Notifications
You must be signed in to change notification settings - Fork 640
Closed
Description
I have requirements to exchange money based on exchange rates on specific dates.
This is working fine currently by using manual converting code, rather than the Exchange rate stores.
What I'm thinking is if this is something that could/should be brought into Money gem?
I'm happy to implement it and raise a PR, but wanted to check first if its likely to be accepted.
I'm thinking that the interface should be extended, for the Store interface
def add_rate(iso_from, iso_to, rate, date: nil); end # Or normal default date = nil defaults
def get_rate(iso_from, iso_to, date: nil); end
And a Money class update
def exchange_to(other_currency, date: nil, &rounding_method)
Of corce lots of other changes will be needed as well, but raising this to get feedback on if the idea is even doable!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels