curb-data-specification
curb-data-specification copied to clipboard
Currency field for Rate
Is your feature request related to a problem? Please describe.
We have data in non-USD countries
Describe the solution you'd like
An optional field for currency that takes ISO currency code
Is this a breaking change
- No, not breaking
Impacted Spec
-
Curbs
Describe alternatives you've considered
Might be better in a higher-level object.
Discussion needed if people think this is urgent enough to including in the 1.0.1 patch release as a new rate_currency
field, maybe at the Policy object level.
The rate
object is defined as
cents (or the smallest denomination of local currency)
So it seems this is possible but I agree using ISO 4217 would be much clearer.
Using agreed-upon currency codes for the "local currency" seems to be the most straight forward
The 'Rate' object seems like the right place, as this is where the rate in cents field is.
In MDS we specify a currency
field e.g. in the cost of Trips, and description of the ISO 4217 code here.
Recommend adding an optional (empty means USD, like in MDS) currency
field here to the Rate object. Actually seems like an oversight that we didn't do this at launch. May also want to add it to the Curb Event object?
There is a currency field described at the top level of responses here: https://github.com/openmobilityfoundation/curb-data-specification/blob/1.0.0/general-information.md#rest-endpoints
Have not thought through how that intersects with every part of CDS to see whether that solves this use case or whether it's needed lower down as well.
I think @jiffyclub is right, currency
in meant to be returned with every single CDS endpoint.
Maybe what's needed here is better linking to this documentation so it can be more easily findable.