EARS: When a seller asks to cancel an order, the system shall cancel it at once if no payment has been received for it, and otherwise only through a cancellation offer.
Story: As a seller, I want an unpaid order cancelled at once and a paid order cancelled through an offer, so that every cancellation that returns money is priced first.
Acceptance criteria:
-
ONE-203.1: When a seller asks to cancel an order for which no payment has been received, the system shall cancel and remove at once every service of the order that the delivery status table lets be removed.
-
ONE-203.2: When an order is cancelled at once, the system shall mark each of its items cancelled and the order closed.
-
ONE-203.3: If a seller asks to cancel an order for which any payment has been received, then the system shall cancel it only through a cancellation offer.
-
ONE-203.4: When an order with payments is cancelled through an offer, the system shall not make the amount due by the airline larger than the payments received for the order.
-
ONE-203.5: When an order with payments is cancelled through an offer, the system shall price the cancellation from the order items that still hold a live service.
The payments received are the pilot model's payments for the order
(Rules.OfferOrder.totalPaid). The offer is priced with
priceDifferential from the items that still hold a live service
(pricedItems). An item whose services a change transferred or
cancelled stays in the order with its price, and this keeps it from being
returned a second time. A service that the delivery status table does not let
be removed, such as one still REQUESTED, one UNABLE TO DELIVER or one already
DELIVERED, stays as it was (Delivery.endWith); while it is live, its
item is priced.