Day 7: Cancellation
Objective for Day 7
Implement customer requested cancellation
Rationale
With the steps from the previous days in place, customer requested cancellation should be straightforward to implement.
Step 1: Implement cancellation within the OrderStore
Implement the method CustomerCancelOrderItems within the OrderStore implementation created on Day 5.
Simply check that the Order clientId and uuid match a record in your database, and then set the status of each OrderItem referenced by orderItemIds to CustomerCancelled. Note that this must also touch the underlying Order such that it appears as updated in the RPDE feed.
public override bool CustomerCancelOrderItems(OrderIdComponents orderId, SellerIdComponents sellerId, OrderIdTemplate orderIdTemplate, List<OrderIdComponents> orderItemIds)
{
}Note that the OrderStore handles customer requested cancellation, rather than the OpportunityStore.
Step 2: Run Test Suite
The customer-requested-cancellation feature within the openactive-integration-tests test suite should pass.
Run this test in isolation as follows:
Last updated
Was this helpful?