feat(BankAccount and BankTransaction): now supporting the full retrieval process

This commit is contained in:
2022-08-23 16:56:59 +02:00
parent d7ba62e767
commit 7637fca672
11 changed files with 6396 additions and 10001 deletions

View File

@ -30,6 +30,28 @@ tap.test('should create a valid request', async (toolsArg) => {
console.log(await tinkuser.getProviderConsents());
});
tap.test('allow tink link to be used', async (toolsArg) => {
await toolsArg.delayFor(60000);
});
tap.test('get provider consents', async () => {
const tinkuser: tink.TinkUser = await tinkTestAccount.getTinkUser('user_1234_abc');
const providerConsents = await tinkuser.getProviderConsents();
console.log(providerConsents);
});
tap.test('get bankaccounts', async (toolsArg) => {
const tinkuser: tink.TinkUser = await tinkTestAccount.getTinkUser('user_1234_abc');
const bankAccounts = await tinkuser.getAllBankAccounts();
console.log(bankAccounts);
for (const bankAccount of bankAccounts) {
const transactions = await bankAccount.getTransactions();
console.log(transactions);
await toolsArg.delayFor(10000);
}
});
tap.test('should delete existing users', async () => {
expect(tinkTestAccount).toBeInstanceOf(tink.TinkAccount);
const tinkUser = new tink.TinkUser(tinkTestAccount, null, 'user_1234_abc');