-
Notifications
You must be signed in to change notification settings - Fork 232
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
[Policy API] support one-time fee after a buffer/duration #632
Comments
That's easy with the current Policy. Two Rules. One for less-than-duration and one for more-than-duration. |
I'm not sure I follow. Based on the examples, I thought for a one-time fee the variables would be
Where does time come in? Should the rule_units = days with min = user entered buffer/duration? |
So the semantics of having a fee on Rule types other than In this case, let's assume a 20-minute buffer. Rule 1: Now that I think about it, I don't think you need a rule for the first $BUFFER minutes if the fee for less than that is 0. |
Yeah, I think having a rule_type = rate is tripping me up. Why can't we just apply a rate_amount and rate_recurrence to all the rules instead of having a separate "rate" rule? |
The solution you outlined above could then also be applied to my other issue #631 pretty easily. |
thank you @Karcass |
Yes, that is what I'm suggesting. |
Note that the main distinction between this ticket and #631 is the use of {
"name": "Buffered One-Time Fee Example",
"description": "First two days free, then one-time $4",
"policy_id": "2801cd0a-7827-4114-9718-b9e5af29e9a1",
"start_date": 1558389669540,
"publish_date": 1558389669540,
"end_date": null,
"prev_policies": null,
"provider_ids": [],
"rate_recurrence": "once",
"currency": "USD",
"rules": [
{
"name": "$4 at the start of 2nd day",
"rule_id": "9cd1768c-ab9e-484c-93f8-72a7078aa7b9",
"rule_type": "time",
"rule_units": "days",
"geographies": ["0c77c813-bece-4e8a-84fd-f99af777d198"],
"statuses": { "available": [], "non_operational": [] },
"vehicle_types": ["bicycle", "scooter"],
"maximum": 2,
"rate_amount": 400
}
]
}``` |
Is your feature request related to a problem? Please describe.
Cities would like to implement a fee if a parked vehicle isn't moved after for example 2 days. This is a one time fee but there's a buffer/duration before it applies.
Describe the solution you'd like
I'm not sure. We could add a new field for this buffer/duration before the rate is applicable?
Is this a breaking change
No, I don't think so as this concept doesn't currently exist.
Impacted Spec
For which spec is this feature being requested?
policy
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: