Closed josh-p-thompson closed 6 months ago
Adding a new field called maximum_fee
seems like a good way to solve this and fill the current gap.
We will be talking about this at next week's Working Group meeting for inclusion in a forthcoming CDS 1.0.1 patch release, so please attend if you can.
Seems valuable to add this sooner than later for cities using CDS for their SMART grant work. Could go into this patch release, though would like to see if anyone objects and would rather see this in a minor release like 1.1.0.
This will be going into a patch release 1.0.1 soon. Leave comments here. Feel free to make a PR to speed it along.
If anyone wants to do a PR for this, that would be welcome and you and your org will be recognized in the acknowledgements for 1.0.1. Otherwise the OMF staff will make a PR soon.
Current PR #135 add this new field:
Name | Type | Required/Optional | Description |
---|---|---|---|
maximum_fee |
Integer | Optional | The maximum amount a user of a curb can pay for a particular parking event. |
Look ok to you @josh-p-thompson ?
@schnuerle I no longer work at Populus and it's been long enough that I don't remember the exact use case. Probably best to confirm with someone from there - Matt Davis? @jiffyclub
Closed with #135
Is your feature request related to a problem? Please describe.
We cannot accurately represent rates that have a maximum fee amount under the current Policy.Rate spec.
Describe the solution you'd like
We would like to to add a new field to
Rate
calledmaximum_fee
that represents the maximum amount a user of a curb can pay for a particular parking event.Is this a breaking change
A breaking change would require consumers or implementors of an API to modify their code for it to continue to function (ex: renaming of a required field or the change in data type of an existing field). A non-breaking change would allow existing code to continue to function (ex: addition of an optional field or the creation of a new optional endpoint).
Impacted Spec
For which spec is this feature being requested?
Curbs
Describe alternatives you've considered
Example: "$1 per hour with a maximum fee of $7.50".
We can't represent this rate in
"rate_unit": "hour"
because the rateend_duration
needs to be7.5
butstart_duration
/end_duration
must be an integer.We can't represent this rate in
"rate_unit": "minute"
because "$1 per hour" would translate to "$.0166666 per minute" orrate=1.67
butrate
must be an integer. We would also lose precision.Allowing floats for durations or defining
increment_duration
differently (see: #113) would allow us to translate this rate accurately, but themax
would become implicit and potentially more complicated if rates/durations do not divide evenly. Therefore, we prefer an explicitmaximum_fee
value in the rate.Additional context