Skip to content

Commit

Permalink
Merge branch 'add-taxi-mode' into feature/neil/add-scheduled-trip-sta…
Browse files Browse the repository at this point in the history
…rt-time
  • Loading branch information
avatarneil committed Sep 11, 2020
2 parents 1eb549a + caff510 commit 96cebd6
Show file tree
Hide file tree
Showing 4 changed files with 170 additions and 44 deletions.
31 changes: 16 additions & 15 deletions agency/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,21 +365,22 @@ The reservation method enum describes the different ways in which a passenger ca
| payment_methods | `{ [string]: number }` | Optional | Breakdown of different payment methods used for a trip, e.g. cash, card |

## Trip
| Field | Type | Required/Optional | Field Description |
|------------------------|---------------|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| trip_id | UUID | Required | UUID for the trip this payload pertains to |
| provider_id | UUID | Required | Provider which managed this trip |
| reservation_method | Enum | Required | Way the customer created their reservation, see [reservation-method](#reservation-method) |
| reservation_time | Timestamp | Required | Time the customer *requested* a reservation |
| reservation_type | Enum | Required | Type of reservation, see [reservation-type](#reservation-type) |
| quoted_trip_start_time | Timestamp | Required | Time the trip was estimated or scheduled to start, that was provided to the passenger |
| dispatch_time | Timestamp | Conditionally Required | Time the vehicle was dispatched to the customer (required if trip was dispatched) |
| trip_start_time | Timestamp | Conditionally Required | Time the trip started (required if trip started) |
| trip_end_time | Timestamp | Conditionally Required | Time the trip ended (required if trip was completed) |
| distance | Float | Conditionally Required | Total distance of the trip in meters (required if trip was completed) |
| cancellation_reason | string | Conditionally Required | The reason why a *driver* cancelled a reservation. (required if a driver cancelled a trip, and a `driver_cancellation` event_type was part of the trip) |
| fare | [Fare](#fare) | Conditionally Required | Fare for the trip (required if trip was completed) |
| accessibility_options | Enum[] | Optional | The **union** of any accessibility options requested, and used. E.g. if the passenger requests a vehicle with `wheelchair_accessible`, but doesn’t utilize the features during the trip, the trip payload will include `accessibility_options: ['wheelchair_accessible']`. See [accessibility-options][accessibility-options] |
| Field | Type | Required/Optional | Field Description |
|-------------------------------|--------------------------------|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| trip_id | UUID | Required | UUID for the trip this payload pertains to |
| provider_id | UUID | Required | Provider which managed this trip |
| reservation_method | Enum | Required | Way the customer created their reservation, see [reservation-method](#reservation-method) |
| reservation_time | Timestamp | Required | Time the customer *requested* a reservation |
| reservation_type | Enum | Required | Type of reservation, see [reservation-type](#reservation-type) |
| quoted_trip_start_time | Timestamp | Required | Time the trip was estimated or scheduled to start, that was provided to the passenger |
| requested_trip_start_location | `{ lat: number, lng: number }` | Conditionally Required | Location where the customer requested the trip to start (required if this is within jurisdictional boundaries) |
| dispatch_time | Timestamp | Conditionally Required | Time the vehicle was dispatched to the customer (required if trip was dispatched) |
| trip_start_time | Timestamp | Conditionally Required | Time the trip started (required if trip started) |
| trip_end_time | Timestamp | Conditionally Required | Time the trip ended (required if trip was completed) |
| distance | Float | Conditionally Required | Total distance of the trip in meters (required if trip was completed) |
| cancellation_reason | string | Conditionally Required | The reason why a *driver* cancelled a reservation. (required if a driver cancelled a trip, and a `driver_cancellation` event_type was part of the trip) |
| fare | [Fare](#fare) | Conditionally Required | Fare for the trip (required if trip was completed) |
| accessibility_options | Enum[] | Optional | The **union** of any accessibility options requested, and used. E.g. if the passenger requests a vehicle with `wheelchair_accessible`, but doesn’t utilize the features during the trip, the trip payload will include `accessibility_options: ['wheelchair_accessible']`. See [accessibility-options][accessibility-options] |

**Endpoint:** `/trips`
**Method:** `POST`
Expand Down
Loading

0 comments on commit 96cebd6

Please sign in to comment.