This repository has been archived by the owner on May 31, 2022. It is now read-only.
/
scenario.js
70 lines (65 loc) · 1.67 KB
/
scenario.js
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// refreshesLeft
// -------------------------------
// 0 returns result immediately
// -1 will refresh forever, and should time out on the UI
// n will causes n refreshes to happen before returning result
// refreshesSet
// -------------------------------
// Used to repopulate refresh count after returning an error
// errorType (http://developer.yodlee.com/FAQs/Error_Codes)
// -------------------------------
// 0 - Success
// 409 - UnavailableSite
// 406 - VisitSite
// 505 - UnsupportedSite
// 416 - AlreadyLoggedIn
// 423 - AccountNotFound
// 402 - InvalidLogin
// 421 - UnsupportedSiteLanguage
// 520 - Failed MFA
// mfaTypes array
// -------------------------------
// null array - mfa bank flow, but not enabled for user
// non-null array - mfa questions asked in order
//
// t - token mfa
// i - image mfa
// q - question and answer mfa
//
// example array: ['t','i','q']shea
module.exports = function Scenario() {
this.contentServiceId = 0;
this.isMfa = true;
this.mfaTimeout = false;
this.mfaPass = true;
this.mfaTypes = ['q'];
this.refreshesSet = 1;
this.refreshesLeft = 1;
this.errorType = 0;
this.accounts = [
{
routingNumber: '222222226',
accountNumber: '5031123001',
accountType: 'CHECKING',
accountHolder: 'John Wayne',
accountName: 'Your Account #1',
balance: '1000'
},
{
routingNumber: '222222226',
accountNumber: '5031123020',
accountType: 'SAVINGS',
accountHolder: 'Harrison Barnes',
accountName: 'Your Account #2',
balance: '2000'
},
{
routingNumber: null,
accountNumber: '***12345',
accountType: 'CHECKING',
accountHolder: 'Shawn Johnson',
accountName: 'Incomplete Account #1',
balance: '55'
}
];
}