feat(BankAccount and BankTransaction): now supporting the full retrieval process
This commit is contained in:
@ -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');
|
||||
|
Reference in New Issue
Block a user