-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModuleConfig.cfc
49 lines (41 loc) · 1.26 KB
/
ModuleConfig.cfc
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
component {
// Module Properties
this.title = "cfPlaid";
this.author = "Michael Born <[email protected]>";
this.webURL = "https://www.ortussolutions.com";
this.description = "Handle Plaid API connections";
// Model Namespace
this.modelNamespace = "cfPlaid";
// CF Mapping
this.cfmapping = "cfPlaid";
// Dependencies
this.dependencies = [ "hyper" ];
/**
* Configure Module
*/
function configure(){
variables.settings = {
api_url : getSystemSetting(
"PLAID_URL",
"https://sandbox.plaid.com"
),
// You can retrieve this from https://dashboard.plaid.com/team/keys
api_client_id : getSystemSetting( "PLAID_CLIENT_ID", "none" ),
// You can retrieve this from https://dashboard.plaid.com/team/keys
api_client_secret : getSystemSetting( "PLAID_CLIENT_SECRET", "none_defined" )
};
binder
.mapDirectory( "cfPlaid.models.endpoints" )
.asSingleton();
binder.map( "PlaidClient@cfPlaid" )
.to( "hyper.models.HyperBuilder" )
.asSingleton()
.initWith(
baseUrl = settings.api_url,
headers = {
"PLAID-CLIENT-ID" : settings.api_client_id
, "PLAID-SECRET" : settings.api_client_secret
}
);
}
}