Exemplo n.º 1
0
        /// <summary>
        /// Returns userIdExistsResponse for the PartnerService Request...
        /// </summary>
        /// <param name="userIdExistsRequest">userIdExistsRequest</param>
        /// <returns>userIdExistsResponse</returns>
        public async Task <UserIdExistsResponse> GetUserIdExistsAsync(UserIdExistsRequest userIdExistsRequest)
        {
            userIdExistsRequest.ThrowIfNull(nameof(userIdExistsRequest));

            var userIdExistsResponse = await PartnerServiceProxyFactory.UseService(service => service.getUserIdExistsAsync(userIdExistsRequest.ToUserIdExistsRequest1Service()));

            return(userIdExistsResponse.getUserIdExistsResponse.ToDomain());
        }
Exemplo n.º 2
0
        public UserIdExistsResponse GetUserIdExists(UserIdExistsRequest userIdExistsRequest)
        {
            Task <UserIdExistsResponse> task = Task.Run(() => this.GetUserIdExistsAsync(userIdExistsRequest));

            task.Wait();

            return(task.Result);
        }
Exemplo n.º 3
0
        public static string GetUserId(string operatorId, IPartnerServiceIntegration _partnerIntegration)
        {
            string userId = string.Empty;;

            if (!string.IsNullOrEmpty(operatorId))
            {
                UserIdExistsRequest localIdRequest = new UserIdExistsRequest();
                localIdRequest.OperatorId = operatorId;
                //localIdRequest.MainofficeId = decimal.Parse(mainOfficeId);//moved to integraion layer

                MoneyGram.PartnerService.DomainModel.Header header = new MoneyGram.PartnerService.DomainModel.Header();
                MoneyGram.PartnerService.DomainModel.ProcessingInstruction processingInstruction = new MoneyGram.PartnerService.DomainModel.ProcessingInstruction();
                processingInstruction.Action = "GetUserIdExists";
                processingInstruction.RollbackTransaction = false;
                header.ProcessingInstruction = processingInstruction;
                localIdRequest.header        = header;

                userId = _partnerIntegration.GetUserIdExists(localIdRequest).UserId;
            }
            return(string.IsNullOrEmpty(userId) ? "-" : userId);
        }
Exemplo n.º 4
0
 public Task <UserIdExistsResponse> GetUserIdExistsAsync(UserIdExistsRequest userIdExistsRequest)
 {
     return(_partnerService.GetUserIdExistsAsync(userIdExistsRequest));
 }
Exemplo n.º 5
0
 public virtual UserIdExistsResponse GetUserIdExists(UserIdExistsRequest userIdExistsRequest)
 {
     return(_partnerService.GetUserIdExists(userIdExistsRequest));
 }
Exemplo n.º 6
0
 public UserIdExistsResponse GetUserIdExists(UserIdExistsRequest userIdExistsRequest)
 {
     userIdExistsRequest.MainofficeId = Convert.ToDecimal(AuthIntegration.GetMainOfficeId());
     return(_partnerServiceRepository.GetUserIdExists(userIdExistsRequest));
 }