Skip to content

Commit 2280114

Browse files
committed
Added approval flow
1 parent 9f7fe0d commit 2280114

File tree

3 files changed

+28
-10
lines changed

3 files changed

+28
-10
lines changed

EditorsDraft/edit.html

+17-1
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,25 @@
594594
- The <a>Booking System</a> must ensure that the `Order`s in the <a>Orders feed</a> represent the current state of `OrderItem`s within the system, for the properties included in the feed.
595595
- The <a>Broker</a> uses these `Order`s to process refunds and send update notifications to the <a>Customer</a>.
596596

597+
598+
### Booking flow with approval
599+
600+
If the `Order` is returned at step **vii** above with an `orderStatus` of `OrderAppovalPending`, the user is notified that the `Order` is awaiting approval, and the remaining steps are completed when the item is retrieved from the <a>Orders feed</a> with an `OrderConfirmed` state.
601+
602+
If approval is not given, the <a>Booking System</a> MUST make the `Order` available in a `deleted` state in the <a>Orders feed</a> and the <a>Broker</a> MUST notify the user that their booking was not approved, and any payment authorisation MUST be withdrawn.
603+
604+
A <a>Broker</a> MAY cancel an `Order` before it has been approved by using the Order Deletion endpoint.
605+
606+
607+
<figure>
608+
<img src="sequencediagramwithapproval.png" alt="Sequence diagram with approval">
609+
<figcaption>Sequence diagram showing API interactions, with approval step</figcaption>
610+
</figure>
611+
612+
597613
### Single state Orders
598614

599-
The `Order` is created in a successful state, although their `OrderItem`s may be cancelled by either the <a>Customer</a> or the <a>Seller</a>, the `Order` itself within the <a>Booking System</a> will not exist in the any other state. The `orderStatus` property of the `Order` MUST NOT be used and is reserved for future evolution of the specification.
615+
The `Order` is created in an `OrderConfirmed` state (via `OrderAppovalPending` if approval is used), and although their `OrderItem`s may be cancelled by either the <a>Customer</a> or the <a>Seller</a>, the `Order` itself within the <a>Booking System</a> will not exist in the any other state. The `orderStatus` property of the `Order` MUST NOT be used and is reserved for future evolution of the specification.
600616

601617

602618
### Payment Capture Rollback

0 commit comments

Comments
 (0)