openactive / open-booking-api

Repository for the Open Booking API specification
Other
2 stars 3 forks source link

Clarify lease status in case of OrderQuote failure #205

Open nickevansuk opened 3 years ago

nickevansuk commented 3 years ago

Make behaviour clear if OrderItem in OrderQuote cannot be leased - to answer the question "should a lease be created with only some OrderItems included if not all can be leased?"

Spec should be clarified to make clear that if the lease property is provided, it applies to only those OrderItems in the OrderQuote that do not have an error associated. Also that the lease property must only be included if a lease is created successfully for the non-erroneous subset of the items, so that the Broker is informed.

Also include that it is required that the lease be created for the subset of valid items in the above scenario. This allows for the 'shopping basket' behaviour, where the user might build up a number of OrderItems through repeated calls to C1 (if they are not logged in) or C2 (if they are logged in on the Broker), and may add an erroneous item to an already populated OrderQuote and then remove it after they see the resulting error.

nickevansuk commented 3 years ago

Note the above has been revised to propose that leasing a subset of non-erroneous items is the expected and required behaviour.

This allows: