Exemple #1
0
        public async Task ConfirmOffer(ConfirmOfferDto confirmOfferDto)
        {
            var proposalModelserialized = JsonConvert.SerializeObject(confirmOfferDto);

            var buffer      = Encoding.UTF8.GetBytes(proposalModelserialized);
            var byteContent = new ByteArrayContent(buffer);

            byteContent.Headers.Add("X-Authorization", _configuration.AuthorizationKey);
            byteContent.Headers.ContentType = new MediaTypeHeaderValue("application/json");

            var response = await _client.PostAsync(BidMyTripConfirmProposalUrl, byteContent).ConfigureAwait(false);
        }
Exemple #2
0
        public async Task <ActionResult> ConfirmOffer(string proposalId, string offerId)
        {
            var confirmOfferDto = new ConfirmOfferDto
            {
                ProposalId = proposalId,
                OfferId    = offerId
            };

            await _offerService.ConfirmOffer(confirmOfferDto);

            return(RedirectToAction("Proposals", "Customer"));
        }