You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> * The `agency` API must respond as if version `0.3` was requested.
220
220
> * The `policy` API must respond as if version `0.4` was requested.
221
221
222
-
If an unsupported or invalid version is requested, the API must respond with a status of `406 Not Acceptable`. If this occurs, a client can explicitly negotiate available versions.
223
-
224
-
A client negotiates available versions using the `OPTIONS` method to an MDS endpoint. For example, to check if `trips` supports either version `0.2` or `0.3` with a preference for `0.2`, the client would issue the following request:
- Idle-time and disabled-time limitations (e.g. "5 days idle while rentable, 12 hours idle while unrentable, per device")
33
+
- Trip fees and subsidies (e.g. "A 25 cent fee applied when a trip ends downtown")
33
34
34
35
The machine-readable format allows Providers to obtain policies and compute compliance where it can be determined entirely by data obtained internally.
35
36
@@ -183,6 +184,7 @@ An individual `Policy` object is defined by the following fields:
183
184
|`policy_id`| UUID | Required | Unique ID of policy |
184
185
|`provider_ids`| UUID[]| Optional | Providers for whom this policy is applicable; empty arrays and `null`/absent implies all Providers |
185
186
|`description`| String | Required | Description of policy |
187
+
|`currency`| String | Optional | An ISO 4217 Alphabetic Currency Code representing the [currency](../provider#costs--currencies) of all Rules of [type](#rule-types)`rate`.|
186
188
|`start_date`|[timestamp][ts]| Required | Beginning date/time of policy enforcement |
187
189
|`end_date`|[timestamp][ts]| Optional | End date/time of policy enforcement |
188
190
|`published_date`|[timestamp][ts]| Required | Timestamp that the policy was published |
@@ -205,6 +207,8 @@ An individual `Rule` object is defined by the following fields:
|`maximum`| integer | Optional | Maximum value, if applicable (default unlimited) |
210
+
|`rate_amount`| integer | Optional | The amount of a rate applied when this rule applies, if applicable (default zero). A positive integer rate amount represents a fee, while a negative integer represents a subsidy. Rate amounts are given in the `currency` defined in the [Policy](#policy). |
211
+
|`rate_recurrence`| enum | Optional | Recurrence of the rate (see [Rate Recurrences](#rate-recurrences)) |
208
212
|`start_time`| ISO 8601 time `hh:mm:ss`| Optional | Beginning time-of-day when the rule is in effect (default 00:00:00). |
209
213
|`end_time`| ISO 8601 time `hh:mm:ss`| Optional | Ending time-of-day when the rule is in effect (default 23:59:59). |
210
214
|`days`| day[]| Optional | Days `["sun", "mon", "tue", "wed", "thu", "fri", "sat"]` when the rule is in effect (default all) |
@@ -218,6 +222,7 @@ An individual `Rule` object is defined by the following fields:
218
222
|`count`| Fleet counts based on regions. Rule `max`/`min` refers to number of devices. |
219
223
|`time`| Individual limitations on time spent in one or more vehicle-states. Rule `max`/`min` refers to increments of time in [Rule Units](#rule-units). |
220
224
|`speed`| Global or local speed limits. Rule `max`/`min` refers to speed in [Rule Units](#rule-units). |
225
+
|`rate`|**[Beta feature](/general-information.md#beta-features):** Yes (as of 1.0.0). Fees or subsidies based on regions and time spent in one or more vehicle-states. Rule `rate_amount` refers to the rate charged according to the [Rate Recurrence](#rate_recurrence). Agencies and Providers must agree on terms of use prior to utilizing the `rate` rule type. |
221
226
|`user`| Information for users, e.g. about helmet laws. Generally can't be enforced via events and telemetry. |
222
227
223
228
### Rule Units
@@ -227,6 +232,7 @@ An individual `Rule` object is defined by the following fields:
227
232
|`seconds`| Seconds |
228
233
|`minutes`| Minutes |
229
234
|`hours`| Hours |
235
+
|`days`| Days |
230
236
|`mph`| Miles per hour |
231
237
|`kph`| Kilometers per hour |
232
238
@@ -242,6 +248,15 @@ An individual `Rule` object is defined by the following fields:
242
248
|`publish_date`|[timestamp][ts]| Required | Timestamp that the policy was published, i.e. made immutable |
243
249
|`prev_geographies`| UUID[]| Optional | Unique IDs of prior geographies replaced by this one |
244
250
251
+
### Rate Recurrences
252
+
253
+
Rate recurrences specify when a rate is applied – either once, or periodically according to a `time_unit` specified using [Rule Units](#rule-units). A `time_unit` refers to a unit of time as measured in local time for the juristiction – a day begins at midnight local time, an hour begins at the top of the hour, etc.
254
+
255
+
| Name | Description |
256
+
| --------- | ------------------- |
257
+
|`once`| Rate is applied once to vehicles entering a matching status from a non-matching status. |
258
+
|`each_time_unit`| During each `time_unit`, rate is applied once to vehicles entering or remaining in a matching status. Requires a `time_unit` to be specified using `rule_units`. |
259
+
|`per_complete_time_unit`| Rate is applied once per complete `time_unit` that vehicles remain in a matching status. Requires a `time_unit` to be specified using `rule_units`. |
This policy sets a Right-of-Way fee that is charged once a day for vehicles deployed in a given area. It charges a 25 cents per day for vehicles deployed downtown, and 5 cents per day for vehicles deployed in a historically underserved neighborhood. In the case where a vehicle is deployed twice in both areas in the same day, the higher fee would apply (because it appears first in the rules).
0 commit comments