public static Accounts getAccountsWithOptions() { string mn = "getAccounts()"; Console.WriteLine(fqcn + " :: " + mn); string accountSummaryURL = LoginApp.localURLVer1 + "accounts/investmentPlan/investmentOptions/"; List <string> headers = new List <string>(); string usersessionid = LoginApp.usession; string cbrandsessionid = LoginApp.cbsession; headers.Add("Authorization:{userSession= " + usersessionid + ",cobSession=" + cbrandsessionid + "}"); string jsonResponse = HTTP.doGet(accountSummaryURL, headers);//headers-authorization headers i.e-member external sesionid,cobrand external session id Type acc = typeof(Accounts); Accounts accounts = (Accounts)GSONParser.handleJson(jsonResponse, acc); //string type = ""; //for (int i = 0; i < accounts.account.Count; i++) //{ // type = accounts.account[i].AccountType; // if (type == "IRA") // { // string holdingURL = LoginApp.localURLVer1 + "holdings/v1/"; // jsonResponse = HTTP.doGet(holdingURL, headers);//headers-authorization headers i.e-member external sesionid,cobrand external session id // Type holding = typeof(Holdings); // Holdings holdings = (Holdings)GSONParser.handleJson(jsonResponse, holding); // Console.WriteLine(holdings.ToString()); // } //} return(accounts); }
public static ProviderAccount getProviderAccount(String providerAccountId) { String getRefreshStatusURL = LoginApp.localURLVer1 + "providers/providerAccounts/" + providerAccountId.ToString(); List <string> headers = new List <string>(); string usersessionid = LoginApp.usession; string cbrandsessionid = LoginApp.cbsession; headers.Add("Authorization:{userSession= " + usersessionid + ",cobSession=" + cbrandsessionid + "}"); String jsonResponse = HTTP.doGet(getRefreshStatusURL, headers); // Console.WriteLine(jsonResponse); ProviderAccount providerAccount = (ProviderAccount)GSONParser.handleJson(jsonResponse, typeof(ProviderAccount)); return(providerAccount); }
public static Providers getProviderLoginForm(String providerId) { //Console.WriteLine(fqcn + " :: " + mn); String getSiteURL = LoginApp.localURLVer1 + "providers/" + providerId; List <string> headers = new List <string>(); string usersessionid = LoginApp.usession; string cbrandsessionid = LoginApp.cbsession; headers.Add("Authorization:{userSession= " + usersessionid + ",cobSession=" + cbrandsessionid + "}"); String jsonResponse = HTTP.doGet(getSiteURL, headers); Providers providers = (Providers)GSONParser.handleJson(jsonResponse, typeof(Providers)); Console.WriteLine(providers.toString()); return(providers); }
public static RefreshStatus getRefreshStatus(String providerAccountId) { //String mn = "getRefreshStatus( " + providerAccountId.ToString() + " )"; //Console.WriteLine(fqcn + " :: " + mn); String getRefreshStatusURL = LoginApp.localURLVer1 + "refresh/" + providerAccountId.ToString(); List <string> headers = new List <string>(); string usersessionid = LoginApp.usession; string cbrandsessionid = LoginApp.cbsession; headers.Add("Authorization:{userSession= " + usersessionid + ",cobSession=" + cbrandsessionid + "}"); String jsonResponse = HTTP.doGet(getRefreshStatusURL, headers); // Console.WriteLine(jsonResponse); RefreshStatus refreshStatus = (RefreshStatus)GSONParser.handleJson(jsonResponse, typeof(RefreshStatus)); Console.WriteLine(refreshStatus.toString()); return(refreshStatus); }
public static Accounts getAccounts() { string mn = "getAccounts()"; Console.WriteLine(fqcn + " :: " + mn); string accountSummaryURL = LoginApp.localURLVer1 + "accounts/"; List <string> headers = new List <string>(); string usersessionid = LoginApp.usession; string cbrandsessionid = LoginApp.cbsession; headers.Add("Authorization:{userSession= " + usersessionid + ",cobSession=" + cbrandsessionid + "}"); string jsonResponse = HTTP.doGet(accountSummaryURL, headers);//headers-authorization headers i.e-member external sesionid,cobrand external session id Type acc = typeof(Accounts); Accounts accounts = (Accounts)GSONParser.handleJson(jsonResponse, acc); return(accounts); }
public static void searchProvider(String searchString) { String mn = "searchSite(searchString " + searchString + " )"; Console.WriteLine(fqcn + " :: " + mn); String searchProviderURL = LoginApp.localURLVer1 + "providers?name=" + searchString; List <string> headers = new List <string>(); string usersessionid = LoginApp.usession; string cbrandsessionid = LoginApp.cbsession; headers.Add("Authorization:{userSession= " + usersessionid + ",cobSession=" + cbrandsessionid + "}"); String jsonResponse = HTTP.doGet(searchProviderURL, headers); Providers providers = (Providers)GSONParser.handleJson(jsonResponse, typeof(Providers)); Console.WriteLine("------------------------------------------------"); Console.WriteLine(" Id Provider Name Login Url"); Console.WriteLine("------------------------------------------------"); for (int i = 0; i < providers.provider.Length; i++)//deserialized json response for showing tabular format . { Console.WriteLine(providers.provider[i].id + " " + ">>" + " " + providers.provider[i].name + " " + ">>" + " " + providers.provider[i].loginUrl); } Console.WriteLine("--------------------------------------------------"); //Console.Write(providers.toString()); }