You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: EditorsDraft/examples.js
+9-27
Original file line number
Diff line number
Diff line change
@@ -95,7 +95,7 @@ function dataExampleRateLimitResponse(utils, content) {
95
95
96
96
// Line at top of Customer cancellation diagram isn't RPDE, as it's now coming from the store based on Order response and not RPDE - it should just be "store"
97
97
98
-
// Create a GitHub issue for 49:00 which includes pros and cons of latestCancellationBeforeStartDate vs better errors on cancellation noting "allowSimpleCancellation"
98
+
// Create a GitHub issue for 49:00 which includes pros and cons of latestCancellationBeforeStartDate vs better errors on cancellation noting "allowCustomerCancellationFullRefund"
99
99
100
100
101
101
// Make issue about minimal personal data capture
@@ -253,27 +253,9 @@ function dataExampleOrderFeedResponse(utils, content) {
The `OrderQuote` will return `approvalNote` within each `OrderItem` that requires approval which contains `name` and `description` properties.
9
+
10
+
<preclass="example" title="Example of OfferOverride">
11
+
"orderItemIntakeForm": [
12
+
[
13
+
{
14
+
"type": "PropertyValueSpecification",
15
+
"id": "https://example.com/height",
16
+
"name": "More information about you",
17
+
"description": "Have you played before? Are you a complete beginner or seasoned pro?",
18
+
"valueRequired": false
19
+
}
20
+
]
21
+
],
22
+
"approvalNote": {
23
+
"type": "PropertyValue",
24
+
"name": "More information about you",
25
+
"description": "Have you played before? Are you a complete beginner or seasoned pro?",
26
+
}
27
+
</pre>
28
+
29
+
## First-come-first-served approval
30
+
31
+
For the case where any `OrderItem`s in an `Order` require approval (`orderItemStatus` of `https://openactive.io/OrderApprovalPending`), the whole `Order` MUST be held in a pending state by the <a>Booking System</a>, with the <a>Broker</a> storing the `Order` with an internal status of `https://openactive.io/OrderApprovalPending`.
32
+
33
+
An `Order` pending approval MUST be approved or rejected atomically; partial approval is not supported in this version of the specification.
34
+
35
+
While the `Order` is in `orderItemStatus` of `https://openactive.io/OrderApprovalPending`:
36
+
- The `Order` MUST not be cancelled, and MAY only be deleted.
37
+
- All `OrderItem` MUST be leased, to ensure that they are not
38
+
39
+
For an `Order` that requires approval, the flow differs from the above as follows:
40
+
41
+
- `OrderQuote` is returned at **C1** and **C2** with any `OrderItem`s that require approval having with `orderItemStatus` of `https://openactive.io/OrderApprovalPending`. The <a>Customer</a> MAY then be prompted to supply an `orderApprovalRequestNote` to display to the seller, which can be included with the `Order` at **B**.
42
+
- `Order` is returned at **B** with any `OrderItem`s that require approval having an `orderItemStatus` of `https://openactive.io/OrderApprovalPending`. If this is the case, the <a>Customer</a> MUST be notified that the `Order` is awaiting approval.
43
+
- If approval is given, the <a>Booking System</a> updates the `Order` in the <a>Orders feed</a> setting all `OrderItem`s to an `https://openactive.io/OrderConfirmed` state. The <a>Broker</a> receives this update from the <a>Orders feed</a> and completes the remaining steps of **Capture Payment**, **Invoice Generation** and **Customer Notification** as in the original flow above.
44
+
- If approval is not given, the <a>Booking System</a> MUST make the `Order` available in an RPDE `deleted` state in the <a>Orders feed</a> and the <a>Broker</a> MUST notify the <a>Customer</a> that their booking was not approved, and any payment authorisation MUST be withdrawn.
45
+
46
+
A <a>Broker</a> MAY cancel an `Order` before it has been approved by using the Order Deletion endpoint.
47
+
48
+
<figure>
49
+
<imgsrc="sequencediagramwithapproval.png" alt="Sequence diagram with approval">
50
+
<figcaption>Sequence diagram showing API interactions, with approval step</figcaption>
0 commit comments