curb-data-specification icon indicating copy to clipboard operation
curb-data-specification copied to clipboard

Currency field for Rate

Open InrixParking opened this issue 1 year ago • 6 comments

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.

InrixParking avatar May 31 '23 00:05 InrixParking

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.

schnuerle avatar Jun 28 '23 20:06 schnuerle

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.

mplsmitch avatar May 24 '24 20:05 mplsmitch

Using agreed-upon currency codes for the "local currency" seems to be the most straight forward

andrewdgh avatar May 28 '24 03:05 andrewdgh

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?

schnuerle avatar May 28 '24 14:05 schnuerle

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.

jiffyclub avatar Sep 24 '24 16:09 jiffyclub

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.

schnuerle avatar Sep 24 '24 16:09 schnuerle