Use Case
A TO offers shared bikes of different types. The TO only accepts bookings for specific assetTypes but not individual assets.
A user wants to book two bikes of the same bike type.
In v1.5 the desired bike type can be specified but not the quantitiy. The assetType in /planning/offers is an array but the provided assetTypes are meant as a set of alternatives (OR) and not as a set of a collection (AND).
Using multiple calls to /planning/offers will not work: Assume there is only one bike of the desired bike type left. If this use case is handled by multiple calls to /planning/offers, one probably gets back the same option for both of them. Of which only one is bookable but this will not be clear to the MP before actually booking them.
Additional context
This use case is probably only relevant in bike sharing systems. Here different types of bikes in the same system are very common and are often significant and priced differently. For e.g. car sharing systems this use case doesn't seem to have any practical relevance.
Describe alternatives you've considered
- The
nrOfTravelers could be used as quantity. But that seems to be rather ambigous if more than one assetType is given.
- If the TO supports a two-phase-commit the MP could try to book the assets one by one. If all requested assets can be booked succesfully then the MP could commit all bookings. If one booking fails than all bookings are canceled.
Possible Implementation
- Support multiple
planningRequest objects when calling /planning/offers. I.e. replace the planningRequest object with an array of planningRequests and indicate whether these are alternatives or one composition.
- Extend the array of
assetTypes to include the quantity that is requested for each assetType
Use Case
A TO offers shared bikes of different types. The TO only accepts bookings for specific
assetTypesbut not individual assets.A user wants to book two bikes of the same bike type.
In v1.5 the desired bike type can be specified but not the quantitiy. The assetType in
/planning/offersis an array but the provided assetTypes are meant as a set of alternatives (OR) and not as a set of a collection (AND).Using multiple calls to
/planning/offerswill not work: Assume there is only one bike of the desired bike type left. If this use case is handled by multiple calls to/planning/offers, one probably gets back the same option for both of them. Of which only one is bookable but this will not be clear to the MP before actually booking them.Additional context
This use case is probably only relevant in bike sharing systems. Here different types of bikes in the same system are very common and are often significant and priced differently. For e.g. car sharing systems this use case doesn't seem to have any practical relevance.
Describe alternatives you've considered
nrOfTravelerscould be used as quantity. But that seems to be rather ambigous if more than oneassetTypeis given.Possible Implementation
planningRequestobjects when calling/planning/offers. I.e. replace theplanningRequestobject with an array ofplanningRequestsand indicate whether these are alternatives or one composition.assetTypesto include the quantity that is requested for eachassetType