private List <AgentVm> GetAgents(LocationRequest locRequest) { var req = new AgentsRequest(); var header = new MoneyGram.PartnerService.DomainModel.Header(); var processInstruction = new MoneyGram.PartnerService.DomainModel.ProcessingInstruction(); req.header = header; req.header.ProcessingInstruction = processInstruction; req.AgentId = Convert.ToDecimal(locRequest.StoreNameNumberAgentId); req.header.ProcessingInstruction.Action = "GetAgents"; req.AgentIdSpecified = true; req.AgentName = locRequest.AgentName ?? string.Empty; req.City = locRequest.City ?? string.Empty; req.State = locRequest.State ?? string.Empty; req.StateCode = locRequest.StateCode ?? string.Empty; req.Country = locRequest.Country ?? string.Empty; req.ZipCode = locRequest.ZipCode ?? string.Empty; req.Phone = locRequest.Phone ?? string.Empty; req.HierarchyLevel = locRequest.HierarchyLevel; //req.HierarchyLevelSpecified = (locationReqVm.HierarchyLevelSpecified == null ? true : locationReqVm.HierarchyLevelSpecified); var contentAgentsResponse = _partnerIntegration.GetAgents(req); return(contentAgentsResponse.ToVm().Agents); }
public AgentsResponse GetAgents(AgentsRequest agentsRequest) { Task <AgentsResponse> task = Task.Run(() => this.GetAgentsAsync(agentsRequest)); task.Wait(); return(task.Result); }
/// <summary> /// Returns AgentsResponse for the PartnerService Request... /// </summary> /// <param name="agentsRequest">agentsRequest</param> /// <returns>AgentsResponse</returns> public async Task <AgentsResponse> GetAgentsAsync(AgentsRequest agentsRequest) { agentsRequest.ThrowIfNull(nameof(agentsRequest)); var agentsResponse = await PartnerServiceProxyFactory.UseService(service => service.getAgentsAsync(agentsRequest.ToAgentsRequest1Service())); return(agentsResponse.getAgentsResponse.ToDomain()); }
private void RequestAgentsForChatServers() { AgentsRequest req = new AgentsRequest(_sm.LocalUser.ServerJID); _sm.BeginSend(req.ToPacket, new AsyncCallback(AgentsCompleteCallback)); }
public virtual AgentsResponse GetAgents(AgentsRequest agentsRequest) { return(_partnerService.GetAgents(agentsRequest)); }
public Task <AgentsResponse> GetAgentsAsync(AgentsRequest agentsRequest) { return(_partnerService.GetAgentsAsync(agentsRequest)); }
public AgentsResponse GetAgents(AgentsRequest agentsRequest) { return(_partnerServiceRepository.GetAgents(agentsRequest)); }