testing harness gets more Nexus API

This commit is contained in:
MS 2021-04-29 17:03:05 +02:00
parent cf0260fa7f
commit 98014f4b64
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F

View File

@ -849,6 +849,31 @@ export namespace LibeufinNexusApi {
);
}
export async function getPaymentInitiations(
libeufinNexusService: LibeufinNexusService,
accountName: string,
username: string = "admin",
password: string = "test",
): Promise<void> {
const baseUrl = libeufinNexusService.baseUrl;
let url = new URL(
`/bank-accounts/${accountName}/payment-initiations`,
baseUrl,
);
let response = await axios.get(
url.href,
{
auth: {
username: username,
password: password,
},
},
);
console.log(`Payment initiations of: ${accountName}`,
JSON.stringify(response.data, null, 2));
}
export async function getAccountTransactions(
libeufinNexusService: LibeufinNexusService,
accountName: string,