-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathModuleConfig.cfc
37 lines (33 loc) · 1.14 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
component {
this.title = "MailGun API";
this.author = "Matthew J. Clemente";
this.webURL = "https://github.com/mjclemente/mailgun.cfc";
this.description = "A wrapper for the MailGun API";
function configure(){
settings = {
secretApiKey = '', // Required
publicApiKey = '', // Required
domain = '', // Default value in init
baseUrl = 'https://api.mailgun.net/v3', // Default value in init
forceTestMode = false, // Default value in init
httpTimeout = 60, // Default value in init
includeRaw = true, // Default value in init,
webhookSigningKey = '' // Default value in init
};
}
function onLoad() {
binder.map( "mailgun@mailguncfc" )
.to( "#moduleMapping#.mailgun" )
.asSingleton()
.initWith(
secretApiKey = settings.secretApiKey,
publicApiKey = settings.publicApiKey,
domain = settings.domain,
baseUrl = settings.baseUrl,
forceTestMode = settings.forceTestMode,
httpTimeout = settings.httpTimeout,
includeRaw = settings.includeRaw,
webhookSigningKey = settings.webhookSigningKey
);
}
}