コード例 #1
0
ファイル: YodleeTests.cs プロジェクト: vijayamazon/ezbob
        public async void TestSiteAccountsRequest()
        {
            IContainer container = InitContainer(typeof(YodleeService));

            YodleeService yodleeService = container.GetInstance <YodleeService>();

            YCobrandLoginRequest cobrandLoginRequest = new YCobrandLoginRequest().SetCobrandUserName(CoBrandUserName)
                                                       .SetCobrandPassword(CoBrandPassword);

            YCobrandLoginResponse yCobrandLoginResponse = await yodleeService.LoginCobrand(cobrandLoginRequest);

            YUserLoginRequest userLoginRequest = new YUserLoginRequest()
                                                 .SetCobrandSessionToken(yCobrandLoginResponse.cobrandConversationCredentials.sessionToken)
                                                 .SetUserName(UserName)
                                                 .SetUserPassword(UserPassword);

            YUserLoginResponse yUserLoginResponse = await yodleeService.LoginUser(userLoginRequest);

            YSiteAccountsRequest siteAccountsRequest = new YSiteAccountsRequest()
                                                       .SetCobrandSessionToken(yCobrandLoginResponse.cobrandConversationCredentials.sessionToken)
                                                       .SetUserSessionToken(yUserLoginResponse.userContext.conversationCredentials.sessionToken);

            YSiteAccountsResponse ySiteAccountsResponse = await yodleeService.GetSiteAccounts(siteAccountsRequest);

            Assert.AreEqual(ySiteAccountsResponse.AccountInfos.Count, 4);
        }
コード例 #2
0
ファイル: YodleeTests.cs プロジェクト: vijayamazon/ezbob
        public async void TestFastLink()
        {
            IContainer container = InitContainer(typeof(YodleeService));

            YodleeService yodleeService = container.GetInstance <YodleeService>();

            YCobrandLoginRequest cobrandLoginRequest = new YCobrandLoginRequest().SetCobrandUserName(CoBrandUserName)
                                                       .SetCobrandPassword(CoBrandPassword);

            YCobrandLoginResponse yCobrandLoginResponse = await yodleeService.LoginCobrand(cobrandLoginRequest);

            YUserLoginRequest userLoginRequest = new YUserLoginRequest()
                                                 .SetCobrandSessionToken(yCobrandLoginResponse.cobrandConversationCredentials.sessionToken)
                                                 .SetUserName(UserName)
                                                 .SetUserPassword(UserPassword);

            YUserLoginResponse yUserLoginResponse = await yodleeService.LoginUser(userLoginRequest);

            YGetFastLinkTokenRequest getFastLinkTokenRequest = new YGetFastLinkTokenRequest()
                                                               .SetCobrandSessionToken(yCobrandLoginResponse.cobrandConversationCredentials.sessionToken)
                                                               .SetUserSessionToken(yUserLoginResponse.userContext.conversationCredentials.sessionToken);

            var yGetFastLinkTokenResponse = await yodleeService.GetFastLinkToken(getFastLinkTokenRequest);

            YFastLinkRequest yFastLinkRequest = new YFastLinkRequest()
                                                .SetFastLinkToken(yGetFastLinkTokenResponse.FastLinkToken)
                                                .SetUserSessionToken(yUserLoginResponse.userContext.conversationCredentials.sessionToken)
                                                .SetOptionalFastLinkSite(16441);

            string formHtml = yFastLinkRequest.GetFormHtml;

            string json = await yodleeService.MakeFastLink(yFastLinkRequest);

            int kk = 0;
        }
コード例 #3
0
ファイル: YodleeTests.cs プロジェクト: vijayamazon/ezbob
        public async void TestTransactionRequest()
        {
            IContainer container = InitContainer(typeof(YodleeService));

            YodleeService yodleeService = container.GetInstance <YodleeService>();

            YCobrandLoginRequest cobrandLoginRequest = new YCobrandLoginRequest().SetCobrandUserName(CoBrandUserName)
                                                       .SetCobrandPassword(CoBrandPassword);

            YCobrandLoginResponse yCobrandLoginResponse = await yodleeService.LoginCobrand(cobrandLoginRequest);

            YUserLoginRequest userLoginRequest = new YUserLoginRequest()
                                                 .SetCobrandSessionToken(yCobrandLoginResponse.cobrandConversationCredentials.sessionToken)
                                                 .SetUserName(UserName)
                                                 .SetUserPassword(UserPassword);

            YUserLoginResponse yUserLoginResponse = await yodleeService.LoginUser(userLoginRequest);

            YTransactionsSearchRequest transactionsSearchRequest = new YTransactionsSearchRequest()
                                                                   .SetCoBrandToken(yCobrandLoginResponse.cobrandConversationCredentials.sessionToken)
                                                                   .SetUserSessionToken(yUserLoginResponse.userContext.conversationCredentials.sessionToken)
                                                                   .SetContainerType(EContainerType.bank)
                                                                   .SetPageSize(1, 10);

            YTransactionsSearchResponse t = await yodleeService.GetTransactions2(transactionsSearchRequest);

            YTransactionsSearchResponse tt = yodleeService.GetTransactions3(transactionsSearchRequest);

            YTransactionsSearchResponse transactions = yodleeService.GetTransactions(transactionsSearchRequest).First();

            Assert.AreEqual(transactions.searchResult.Transactions.Count, 10);
        }