Exemplo n.º 1
0
        public async Task Consume(ConsumeContext <IOffice365AddresValidationRequest> context)
        {
            var isAddressValid = await _addressValidationService.IsAddressValidAsync(new AddressValidationModel
            {
                AddressLine1 = context.Message.AddressLine1,
                AddressLine2 = context.Message.AddressLine2,
                City         = context.Message.City,
                State        = context.Message.State,
                Country      = context.Message.Country,
                PostalCode   = context.Message.PostalCode,
                PhoneNumber  = context.Message.PhoneNumber
            });

            await context.RespondAsync(new Office365AddresValidationResponse
            {
                IsAddressValid = isAddressValid
            });
        }