This repository was archived by the owner on Jan 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples.js
More file actions
49 lines (43 loc) · 1.5 KB
/
examples.js
File metadata and controls
49 lines (43 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
var azlo = require('azlo-node')('API_KEY');
/**
* @summary List All Accounts
* @param queryParams (Object)
* @param queryParams.Unmask: (Boolean) Unmasks the account number
*/
function listAccounts() {
var queryParams = {
unmask: true
};
azlo.accounts.list(queryParams, function (error, response) {
if (error) {
console.error(error);
} else {
console.log(repsonse);
}
});
}
/**
* @summary List All Transactions
* @param accountId (String) The account id for which to pull the transaction list
* @param queryParams (Object)
* @param queryParams.start (Number) The starting point for pagination (default = 0)
* @param queryParams.limit (Number) The page size for pagination (default = 25)
* @param queryParams.amountTo (Number) The maximum amount for filtering by amount (required if amountFrom present)
* @param queryParams.amountFrom (Number) The minimum amount for filtering by amount (required if amountTo present)
* @param queryParams.postedDateTo (Date: '2018-06-25') The end date for filtering by date (required if postedDateFrom present)
* @param queryParams.postedDateFrom (Date: '2018-01-23') The start date for filtering by date (required if postedDateTo present)
*/
function listTransactions() {
var accountId = 'ACCOUNT_ID';
var queryParams = {
start: 5,
limit: 100
};
azlo.tranactions.list(accountId, queryParams, function (error, response) {
if (error) {
console.error(error);
} else {
console.log(response);
}
});
}