Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Representing maximum fee in Rate #116

Closed
josh-p-thompson opened this issue Mar 21, 2023 · 8 comments · Fixed by #135
Closed

Representing maximum fee in Rate #116

josh-p-thompson opened this issue Mar 21, 2023 · 8 comments · Fixed by #135
Assignees
Labels
Curbs API minor update A change that is minor and should require little discussion, or is a maintenance/readme/typo update. schema Implications for the OpenAPI Schema
Milestone

Comments

@josh-p-thompson
Copy link

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 called maximum_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).

  • No, not breaking

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 rate end_duration needs to be 7.5 but start_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" or rate=1.67 but rate 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 the max would become implicit and potentially more complicated if rates/durations do not divide evenly. Therefore, we prefer an explicit maximum_fee value in the rate.

Additional context

@schnuerle schnuerle added this to the Next Release milestone Mar 23, 2023
@schnuerle
Copy link
Member

Adding a new field called maximum_fee seems like a good way to solve this and fill the current gap.

@jlarsonOmahaNE jlarsonOmahaNE modified the milestones: Next Release, 1.0.1 May 30, 2023
@schnuerle
Copy link
Member

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.

@schnuerle
Copy link
Member

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.

@schnuerle
Copy link
Member

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.

@schnuerle
Copy link
Member

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.

@schnuerle schnuerle added minor update A change that is minor and should require little discussion, or is a maintenance/readme/typo update. schema Implications for the OpenAPI Schema labels Mar 9, 2024
@schnuerle schnuerle linked a pull request Mar 11, 2024 that will close this issue
@schnuerle
Copy link
Member

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 ?

@josh-p-thompson
Copy link
Author

@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

@schnuerle
Copy link
Member

Closed with #135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Curbs API minor update A change that is minor and should require little discussion, or is a maintenance/readme/typo update. schema Implications for the OpenAPI Schema
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants