public async Task <OrderPlaced> Handle(PlaceOrderCommand command)
        {
            var(clientId, offer) = CreateDomainModelFrom(command);
            var currentOffer = await _calculatePrices.For(clientId, SalesChannel.OnlineSales, offer.ProductAmounts, offer.Currency);

            if (!offer.Equals(currentOffer))
            {
                throw new DomainException();
            }
            var order = Order.FromOffer(offer);
            await _orders.Save(order);

            return(CreateEventFrom(clientId, order));
        }
 private static (ClientId, Offer) CreateDomainModelFrom(PlaceOrderCommand command) => (