@@ -14,7 +14,7 @@ Customers.prototype.createCustomer = function (ocustomer, callback) {
14
14
15
15
options . action = 'addclient' ;
16
16
17
- options . responsetype = " json" ;
17
+ options . responsetype = ' json' ;
18
18
19
19
var createOptions = {
20
20
client : this ,
@@ -24,6 +24,60 @@ Customers.prototype.createCustomer = function (ocustomer, callback) {
24
24
utils . modem ( createOptions , callback ) ;
25
25
} ;
26
26
27
+ Customers . prototype . createContact = function ( ocontact , callback ) {
28
+ var self = this ;
29
+ var options = { } ;
30
+
31
+ _ . extend ( options , ocontact ) ;
32
+
33
+ options . action = 'addcontact' ;
34
+
35
+ options . responsetype = 'json' ;
36
+
37
+ var createOptions = {
38
+ client : this ,
39
+ body : options
40
+ } ;
41
+
42
+ utils . modem ( createOptions , callback ) ;
43
+ } ;
44
+
45
+ Customers . prototype . deleteContact = function ( contactid , callback ) {
46
+ var self = this ;
47
+ var options = { } ;
48
+
49
+ options . action = 'deletecontact' ;
50
+ options . contactid = contactid ;
51
+
52
+ options . responsetype = 'json' ;
53
+
54
+ var deleteOptions = {
55
+ client : this ,
56
+ body : options
57
+ } ;
58
+
59
+ utils . modem ( deleteOptions , callback ) ;
60
+ } ;
61
+
62
+ Customers . prototype . updateContact = function ( contactid , ocontact , callback ) {
63
+ var self = this ;
64
+ var options = { } ;
65
+
66
+ _ . extend ( options , ocontact ) ;
67
+
68
+ options . action = 'updatecontact' ;
69
+
70
+ options . responsetype = 'json' ;
71
+ options . contactid = contactid ;
72
+
73
+ var updateOptions = {
74
+ client : this ,
75
+ body : options
76
+ } ;
77
+
78
+ utils . modem ( updateOptions , callback ) ;
79
+ } ;
80
+
27
81
Customers . prototype . updateCustomer = function ( clientid , ocustomer , callback ) {
28
82
var self = this ;
29
83
var options = { } ;
@@ -32,7 +86,7 @@ Customers.prototype.updateCustomer = function (clientid, ocustomer, callback) {
32
86
33
87
options . action = 'updateclient' ;
34
88
35
- options . responsetype = " json" ;
89
+ options . responsetype = ' json' ;
36
90
options . clientid = clientid ;
37
91
38
92
var createOptions = {
@@ -51,7 +105,7 @@ Customers.prototype.updateCustomerDomain = function (domainid, opts, callback) {
51
105
52
106
options . action = 'updateclientdomain' ;
53
107
54
- options . responsetype = " json" ;
108
+ options . responsetype = ' json' ;
55
109
options . domainid = domainid ;
56
110
57
111
var createOptions = {
@@ -77,7 +131,7 @@ Customers.prototype.getContacts = function (userid, opts, callback) {
77
131
78
132
options . action = 'getcontacts' ;
79
133
options . userid = userid ;
80
- options . responsetype = " json" ;
134
+ options . responsetype = ' json' ;
81
135
82
136
var createOptions = {
83
137
client : this ,
@@ -103,7 +157,7 @@ Customers.prototype.getCustomer = function (clientid, opts, callback) {
103
157
options . action = 'getclientsdetails' ;
104
158
options . clientid = clientid ;
105
159
options . stats = true ;
106
- options . responsetype = " json" ;
160
+ options . responsetype = ' json' ;
107
161
108
162
var createOptions = {
109
163
client : this ,
@@ -129,7 +183,7 @@ Customers.prototype.getCustomerByEmail = function (email, opts, callback) {
129
183
options . action = 'getclientsdetails' ;
130
184
options . email = email ;
131
185
options . stats = true ;
132
- options . responsetype = " json" ;
186
+ options . responsetype = ' json' ;
133
187
134
188
var createOptions = {
135
189
client : this ,
@@ -154,7 +208,7 @@ Customers.prototype.deleteCustomer = function (clientid, opts, callback) {
154
208
155
209
options . action = 'deleteclient' ;
156
210
options . clientid = clientid ;
157
- options . responsetype = " json" ;
211
+ options . responsetype = ' json' ;
158
212
159
213
var createOptions = {
160
214
client : this ,
@@ -186,7 +240,7 @@ Customers.prototype.getCustomerProducts = function (clientid, serviceid, opts, c
186
240
options . serviceid = serviceid ;
187
241
}
188
242
189
- options . responsetype = " json" ;
243
+ options . responsetype = ' json' ;
190
244
191
245
var createOptions = {
192
246
client : this ,
@@ -205,7 +259,7 @@ Customers.prototype.updateCustomerProduct = function (serviceid, oservice, callb
205
259
206
260
options . action = 'updateclientproduct' ;
207
261
options . serviceid = serviceid ;
208
- options . responsetype = " json" ;
262
+ options . responsetype = ' json' ;
209
263
210
264
var createOptions = {
211
265
client : this ,
@@ -231,7 +285,7 @@ Customers.prototype.sendEmail = function (id, email, opts, callback) {
231
285
options . action = 'sendemail' ;
232
286
options . id = id ;
233
287
options . messagename = email ;
234
- options . responsetype = " json" ;
288
+ options . responsetype = ' json' ;
235
289
236
290
237
291
var createOptions = {
@@ -260,7 +314,7 @@ Customers.prototype.getCustomerDomains = function (clientid, domainid, opts, cal
260
314
if ( domainid !== undefined ) {
261
315
options . domainid = domainid ;
262
316
}
263
- options . responsetype = " json" ;
317
+ options . responsetype = ' json' ;
264
318
265
319
var createOptions = {
266
320
client : this ,
@@ -285,7 +339,7 @@ Customers.prototype.getCustomerEmails = function (clientid, opts, callback) {
285
339
286
340
options . action = 'getemails' ;
287
341
options . clientid = clientid ;
288
- options . responsetype = " json" ;
342
+ options . responsetype = ' json' ;
289
343
290
344
var createOptions = {
291
345
client : this ,
@@ -310,7 +364,7 @@ Customers.prototype.getCustomerInvoices = function (clientid, opts, callback) {
310
364
311
365
options . action = 'getinvoices' ;
312
366
options . userid = clientid ;
313
- options . responsetype = " json" ;
367
+ options . responsetype = ' json' ;
314
368
315
369
var createOptions = {
316
370
client : this ,
@@ -335,7 +389,7 @@ Customers.prototype.getCustomerOrders = function (clientid, opts, callback) {
335
389
336
390
options . action = 'getorders' ;
337
391
options . userid = clientid ;
338
- options . responsetype = " json" ;
392
+ options . responsetype = ' json' ;
339
393
340
394
var createOptions = {
341
395
client : this ,
@@ -363,7 +417,7 @@ Customers.prototype.getTickets = function (clientid, status, opts, callback) {
363
417
if ( status ) {
364
418
options . status = status ;
365
419
}
366
- options . responsetype = " json" ;
420
+ options . responsetype = ' json' ;
367
421
368
422
var createOptions = {
369
423
client : this ,
@@ -389,7 +443,7 @@ Customers.prototype.validateLogin = function (email, password, opts, callback) {
389
443
options . action = 'validatelogin' ;
390
444
options . email = email ;
391
445
options . password2 = password ;
392
- options . responsetype = " json" ;
446
+ options . responsetype = ' json' ;
393
447
394
448
var createOptions = {
395
449
client : this ,
0 commit comments