Ejemplo n.º 1
0
        public async Task <UpdateResponsesResponse> Handle(UpdateResponsesRequest request, CancellationToken cancellationToken)
        {
            var errorMessage = string.Empty;
            var response     = false;

            try
            {
                response = await _infoServiceWrapper.UpdateResponses(request.AccountId, request.ContactKey, request.ResponseCodes);
            }
            catch (Exception ex)
            {
                errorMessage = ex.Message;
            }
            return(await Task.FromResult(new UpdateResponsesResponse
            {
                IsServiceCallSuccess = string.IsNullOrEmpty(errorMessage) ? true : false,
                ErrorMessage = errorMessage,
                UpdateResponsesResult = response
            }));
        }