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

Add pricing plans to vehicle types #335

Merged
merged 7 commits into from Sep 2, 2021
Merged

Add pricing plans to vehicle types #335

merged 7 commits into from Sep 2, 2021

Conversation

mplsmitch
Copy link
Contributor

What problem does your proposal solve? Please begin with the relevant issue number. If there is no existing issue, please also describe alternative solutions you have considered.

When system_pricing_plans.json was extended in v2.2 the pricing_plan_id field was added to free_bike_status.json to associate pricing plans with vehicles. The thinking was that doing this at the individual vehicle level would allow dynamic pricing based on the vehicle's location.
This poses a challenge for station based systems in that they would be forced to publish the optional free_bike_status end point in order to surface pricing information. It also limits vehicles to a single pricing plan.

What is the proposal?

This proposal adds a pricing_plans array to vehicle_types.json that contains the plan IDs of all applicable pricing plans for that vehicle type. It also adds a field that defines a default pricing plan to be used by trip planners in calculating the cost of the a single trip.

The ability to define pricing plans at the individual vehicle level is preserved, which would allow pricing to be set based on vehicle location or other factors. Any pricing plan assigned to individual vehicles in free_bike_status.json supersedes the default plan defined in vehicle_types.json.

Additional discussion of this can be found in issue #318

Is this a breaking change?

  • Yes
  • No
  • Unsure

Which files are affected by this change?

gbfs.md:

  • vehicle_types.json

Adds pricing_plans and default_pricng_plan to vehicle types
@mplsmitch mplsmitch mentioned this pull request Jul 7, 2021
3 tasks
gbfs.md Outdated
@@ -395,7 +395,8 @@ Field Name | REQUIRED | Type | Defines
\- `propulsion_type` | Yes | Enum | The primary propulsion type of the vehicle. <br /><br />Current valid values are:<br /><ul><li>`human` _(Pedal or foot propulsion)_</li><li>`electric_assist` _(Provides power only alongside human propulsion)_</li><li>`electric` _(Contains throttle mode with a battery-powered motor)_</li><li>`combustion` _(Contains throttle mode with a gas engine-powered motor)_</li></ul> This field was inspired by, but differs from the propulsion types field described in the [Open Mobility Foundation Mobility Data Specification](https://github.com/openmobilityfoundation/mobility-data-specification/blob/master/provider/README.md#propulsion-types).
\- `max_range_meters` | Conditionally REQUIRED | Non-negative float | If the vehicle has a motor (as indicated by having a value other than `human` in the `propulsion_type` field), this field is REQUIRED. This represents the furthest distance in meters that the vehicle can travel without recharging or refueling when it has the maximum amount of energy potential (for example, a full battery or full tank of gas).
\- `name` | OPTIONAL | String | The public name of this vehicle type.

\- `default_pricing_plan`| Conditionally REQUIRED | ID | REQUIRED if `system_pricing_plans` and `vehicle_types.json` are defined. A `plan_id` as defined in `system_pricing_plans.json` that identifies a default pricing plan for this vehicle to be used by trip planning applications for purposes of calculating the cost of a single trip using this vehicle type. This default pricing plan is superseded by `pricing_plan_id` when it is defined in `free_bike_status.json`.
\- `pricing_plans` | OPTIONAL | Array | Array of all pricing plan IDs as defined in `system_pricing_plans.json` that are applied to this vehicle type. <br /><br />This array SHOULD be published when there are multiple pricing plans defined in `system_prcing_plans.json` that apply to a single vehicle type.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo, should by system_pricing_plans.json

@heidiguenin heidiguenin added proposal:nonbreaking v2.3 Candidate change for v2.3 (minor release) labels Aug 16, 2021
@mplsmitch
Copy link
Contributor Author

I hereby call a vote on this proposal.

Voting will be open for 10 full calendar days until 11:59PM UTC on September 1st, 2021.

Please vote for or against the proposal, and include the organization for which you are voting in your comment.

Please note if you can commit to implementing the proposal.

@kanagy
Copy link

kanagy commented Aug 23, 2021

Google Maps supports this and would like to implement it for docked systems where currently using free_bike_status is unnecessary. It would be nice to have some guidance in the spec to prefer setting default_pricing_plan first for all producers and then override it in free_bike_status if needed.

Nit: For consistency with other fields, would it make sense to rename to default_pricing_plan_id and pricing_plan_ids?

@testower
Copy link
Contributor

testower commented Aug 24, 2021

Entur supports this proposal and will implement it in our aggregation service

@richtaylor-ito
Copy link
Contributor

Ito World supports this proposal.

@nbdh
Copy link
Contributor

nbdh commented Aug 26, 2021

Nextbike supports this proposal, though we will probably keep publishing free_bikes_status and define the pricing_plan_id there.

@viestat
Copy link
Contributor

viestat commented Aug 27, 2021

Dott approves this proposal, however I would argue that default_pricing_plan should be optional instead of conditionally required. We will keep on defining on a vehicle level using free_bikes_status.

@evansiroky
Copy link
Contributor

evansiroky commented Aug 30, 2021

IBI Group supports this proposal, although we agree with @kanagy's suggestion to rename vehicle_types.json#default_pricing_plan to vehicle_types.json#default_pricing_plan_id and vehicle_types.json#pricing_plans to vehicle_types.json#pricing_plan_ids to try to follow a naming convention that shows which fields have IDs as values.

@ncancelliere
Copy link

Spin supports this proposal. We likely will not immediately implement it.

@ezmckinn
Copy link
Contributor

ezmckinn commented Sep 1, 2021

Superpedestrian supports this proposal. We don't currently have plans to add this to vehicle_types.json, and we will continue publishing pricing_plan_id within free_bike_status.json.

@josee-sabourin
Copy link
Contributor

Voting is now closed, and it passes!

Votes in favour:
Google Maps (consumer)
Entur (consumer)
Ito World (producer)
Nextbike (producer)
Dott (producer)
IBI Group (consumer)
Spin (producer)
Superpedestrian (producer)

There we no votes against.

Regarding @kanagy's and @evansiroky's comments: we will make those semantic changes when we merge into a v2.3-RC.

Mitch Vars added 5 commits September 2, 2021 13:46
Updates field name default_pricing_plan to default_pricing_plan_id, clarifies definition giving preference to defining default_pricing_plan_id
Add V2.3-RC  label and clarify use of pricing_plan_id
@mplsmitch mplsmitch merged commit 044ed57 into master Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gbfs.md proposal:nonbreaking v2.3 Candidate change for v2.3 (minor release) Vote Passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet