public OrderCreatedEvent createOrder(CreateOrderEvent createOrderEvent) {
Order order = Order.fromOrderDetails(createOrderEvent.getDetails());
order = orderRepository.save(order);
return new OrderCreatedEvent(order.getKey(), order.toOrderDetails());
}
@Override
public AllOrdersEvent requestAllOrders(RequestAllOrdersEvent requestAllCurrentOrdersEvent) {
List<OrderDetails> generatedDetails = new ArrayList<OrderDetails>();