public static string GetComputerName(string agentId, string posId, IPartnerServiceIntegration _partnerIntegration) { var request = new AgentsDeviceNamesRequest(); decimal agent = decimal.Parse(agentId); decimal pos = decimal.Parse(posId); if (string.IsNullOrEmpty(agentId) || string.IsNullOrEmpty(posId)) { return(string.Empty); } MoneyGram.PartnerService.DomainModel.Header header = new MoneyGram.PartnerService.DomainModel.Header(); MoneyGram.PartnerService.DomainModel.ProcessingInstruction processingInstruction = new MoneyGram.PartnerService.DomainModel.ProcessingInstruction(); processingInstruction.Action = "GetAgentsDeviceNames"; processingInstruction.RollbackTransaction = false; header.ProcessingInstruction = processingInstruction; request.header = header; var poslist = new List <MoneyGram.PartnerService.DomainModel.AgentPosDevice>(); poslist.Add(new MoneyGram.PartnerService.DomainModel.AgentPosDevice() { AgentId = agent, PosNumber = pos, PosNumberFieldSpecified = true }); request.AgentPosDeviceList = poslist; var resp = _partnerIntegration.GetAgentsDeviceNames(request); if (resp.AgentPosDeviceListResult == null) { return("-"); } return(resp.AgentPosDeviceListResult.Find(x => x.Name != string.Empty).Name); }
/// <summary> /// Returns agentsDeviceNamesResponse for the PartnerService Request... /// </summary> /// <param name="agentsDeviceNamesRequest">agentsDeviceNamesRequest</param> /// <returns>agentsDeviceNamesResponse</returns> public async Task <AgentsDeviceNamesResponse> GetAgentsDeviceNamesAsync(AgentsDeviceNamesRequest agentsDeviceNamesRequest) { agentsDeviceNamesRequest.ThrowIfNull(nameof(agentsDeviceNamesRequest)); var deviceNamesResponse = await PartnerServiceProxyFactory.UseService(service => service.getAgentsDeviceNamesAsync(agentsDeviceNamesRequest.ToAgentsDeviceNamesRequest1Service())); return(deviceNamesResponse.getAgentsDeviceNamesResponse.ToDomain()); }
public AgentsDeviceNamesResponse GetAgentsDeviceNames(AgentsDeviceNamesRequest agentsDeviceNamesRequest) { Task <AgentsDeviceNamesResponse> task = Task.Run(() => this.GetAgentsDeviceNamesAsync(agentsDeviceNamesRequest)); task.Wait(); return(task.Result); }
public virtual AgentsDeviceNamesResponse GetAgentsDeviceNames(AgentsDeviceNamesRequest agentsDeviceNamesRequest) { return(_partnerService.GetAgentsDeviceNames(agentsDeviceNamesRequest)); }
public Task <AgentsDeviceNamesResponse> GetAgentsDeviceNamesAsync(AgentsDeviceNamesRequest agentsDeviceNamesRequest) { return(_partnerService.GetAgentsDeviceNamesAsync(agentsDeviceNamesRequest)); }
public AgentsDeviceNamesResponse GetAgentsDeviceNames(AgentsDeviceNamesRequest agentsDeviceNamesRequest) { return(_partnerServiceRepository.GetAgentsDeviceNames(agentsDeviceNamesRequest)); }