EARS: When a seller sends a create request with selections from one or more offers, the system shall check each selection and create one order from them, or reject the request.
Story: As a customer, I want a trip I chose as a whole to be ordered as a whole, so that I never hold half of it.
Acceptance criteria:
-
ONE-402.1: When a create request is accepted, the system shall create one order item for each item selected from each offer and none for the items left out.
-
ONE-402.2: When an order is created from offers priced in one currency, the system shall make the order's total price the sum of the prices of the selected items.
-
ONE-402.3: If any offer named in a create request has expired at the instant of the request, then the system shall reject the whole request and create no order.
-
ONE-402.4: If a create request selects no item from any offer, then the system shall reject it.
-
ONE-402.5: When an order is created, the system shall be able to state its total price in a single currency.
Each selection is checked as orderItemsFor says. What happens when
one is rejected depends on the reading of the sources
(MultiOfferHandling, pickItems). The order's total is the sum
of its item prices when they share a currency
(Rules.OneOrder.Change.orderPrice), since the guide no longer stores a
total on the order.