EARS: When a customer accepts an offer, the system shall create an order with one order item for each offer item and one service for each passenger and flight segment of that item.
Story: As an airline, I want each accepted offer item to become one order item with a service for every passenger and segment, so that each service can be delivered and accounted for on its own.
Acceptance criteria:
-
ONE-001.1: When an offer is accepted, the system shall create exactly one order item for each offer item.
-
ONE-001.2: When an order item is created, the system shall give it one service for each passenger and flight segment of its offer item.
-
ONE-001.3: When an order is created, the system shall give its order items distinct references.
-
ONE-001.4: When an order is created, the system shall mark it opened.
-
ONE-001.5: If a customer accepts an offer at or after its expiry instant, then the system shall reject it as expired.
The checks before creating the order are the same as in the airline's rules: expiry first, then an empty offer, then items priced in another currency.