Skip to content

Commit d9ffa25

Browse files
authored
Merge pull request #533 from lacuna-tech/fix/add-geography-schema-to-policy
Fix: add geography schema to policy
2 parents a56f66b + dcd6287 commit d9ffa25

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

policy/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Policies will be returned in order of effective date (see schema below), with pa
9494

9595
Endpoint: `/geographies/{id}`
9696
Method: `GET`
97-
`data` Payload: `{ geographies: [] }`, an array of GeoJSON `Feature` objects.
97+
`data` Payload: `{ geographies: [] }`, an array of GeoJSON `Feature` objects that follow the schema [outlined here](#geography).
9898

9999
##### Query Parameters
100100

@@ -236,7 +236,20 @@ An individual `Rule` object is defined by the following fields:
236236
| `mph` | Miles per hour |
237237
| `kph` | Kilometers per hour |
238238

239+
### Geography
240+
241+
| Name | Type | Required / Optional | Description |
242+
| ---------------- | --------- | --- | ----------------------------------------------------------------------------------- |
243+
| `name` | String | Required | Name of geography |
244+
| `description` | String | Optional | Detailed description of geography |
245+
| `geography_id` | UUID | Required | Unique ID of geography |
246+
| `geography_json` | UUID | Required | The GeoJSON that defines the geographical coordinates.
247+
| `effective_date` | [timestamp][ts] | Optional | `start_date` for first published policy that uses this geo. Server should set this when policies are published. This may be used on the client to distinguish between “logical” geographies that have the same name. E.g. if a policy publishes a geography on 5/1/2020, and then another policy is published which references that same geography is published on 4/1/2020, the effective_date will be set to 4/1/2020.
248+
| `publish_date` | [timestamp][ts] | Required | Timestamp that the policy was published, i.e. made immutable |
249+
| `prev_geographies` | UUID[] | Optional | Unique IDs of prior geographies replaced by this one |
250+
239251
### Rate Recurrences
252+
240253
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.
241254

242255
| Name | Description |

0 commit comments

Comments
 (0)