public AgentPasswordResponse GetAgentPassword(AgentPasswordRequest AgentPasswordRequest) { Task <AgentPasswordResponse> task = Task.Run(() => this.GetAgentPasswordAsync(AgentPasswordRequest)); task.Wait(); return(task.Result); }
/// <summary> /// Returns AgentPasswordResponse for the PartnerService Request... /// </summary> /// <param name="agentPasswordRequest">agentPasswordRequest</param> /// <returns>AgentPasswordResponse</returns> public async Task <AgentPasswordResponse> GetAgentPasswordAsync(AgentPasswordRequest agentPasswordRequest) { agentPasswordRequest.ThrowIfNull(nameof(agentPasswordRequest)); var agentPasswordResponse = await PartnerServiceProxyFactory.UseService(service => service.getAgentPasswordAsync(agentPasswordRequest.ToService())); return(agentPasswordResponse.getAgentPasswordResponse.ToDomain()); }
public override AgentPasswordResponse GetAgentPassword(AgentPasswordRequest agentPasswordRequest) { AgentPasswordResponse agentPasswordResponse; var agentPasswordKeyFormatted = string.Format(CacheKeys.AGENTPASSWORDKEY, agentPasswordRequest.AgentId, agentPasswordRequest.PosNumber); var cachedResult = _cacheManager.Contains <CachedObjectResponseContainer <AgentPasswordResponse> >(agentPasswordKeyFormatted, CacheRegion.Global); if (cachedResult.Exists) { agentPasswordResponse = cachedResult.CachedObj.DataObject; } else { // Fetch payload and process agentPasswordResponse = base.GetAgentPassword(agentPasswordRequest); var agentPasswordCacheContainer = CacheAheadHelper.PopulateCacheMetadata <AgentPasswordResponse>(agentPasswordResponse, CachePolicies.FullWeek); // Cache it _cacheManager.Save(agentPasswordKeyFormatted, agentPasswordCacheContainer, CacheRegion.Global, CachePolicies.FullWeek); } return(agentPasswordResponse); }
private string GetAgentPassword(string agentId, string posNumber) { var agentPasswordRequest = new AgentPasswordRequest { AgentId = decimal.Parse(agentId), AgentIdSpecified = true, PosNumber = decimal.Parse(posNumber), PosNumberSpecified = true }; var agentPasswordRequestHeader = new Header(); var agentPasswordProcessingInstruction = new ProcessingInstruction { Action = "GetAgentPassword", RollbackTransaction = false }; agentPasswordRequestHeader.ProcessingInstruction = agentPasswordProcessingInstruction; agentPasswordRequest.header = agentPasswordRequestHeader; var getAgentPasswordResp = partnerServiceIntegration.GetAgentPassword(agentPasswordRequest); return(getAgentPasswordResp.AgentPassword); }
public virtual AgentPasswordResponse GetAgentPassword(AgentPasswordRequest AgentPasswordRequest) { return(_partnerService.GetAgentPassword(AgentPasswordRequest)); }
public Task <AgentPasswordResponse> GetAgentPasswordAsync(AgentPasswordRequest AgentPasswordRequest) { return(_partnerService.GetAgentPasswordAsync(AgentPasswordRequest)); }
public AgentPasswordResponse GetAgentPassword(AgentPasswordRequest agentPasswordRequest) { return(_partnerServiceRepository.GetAgentPassword(agentPasswordRequest)); }