twilio 3.68.0 → 3.71.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/CHANGES.md +104 -0
  2. package/README.md +1 -1
  3. package/lib/jwt/AccessToken.d.ts +16 -0
  4. package/lib/jwt/AccessToken.js +20 -0
  5. package/lib/jwt/ClientCapability.d.ts +1 -1
  6. package/lib/rest/Media.d.ts +28 -0
  7. package/lib/rest/Media.js +64 -0
  8. package/lib/rest/Twilio.d.ts +2 -0
  9. package/lib/rest/Twilio.js +14 -0
  10. package/lib/rest/Verify.d.ts +2 -2
  11. package/lib/rest/Verify.js +3 -4
  12. package/lib/rest/api/v2010/account/call/siprec.d.ts +776 -0
  13. package/lib/rest/api/v2010/account/call/siprec.js +811 -0
  14. package/lib/rest/api/v2010/account/call.d.ts +8 -1
  15. package/lib/rest/api/v2010/account/call.js +29 -1
  16. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +6 -2
  17. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.js +5 -2
  18. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +6 -2
  19. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js +5 -2
  20. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +6 -2
  21. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js +5 -2
  22. package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +7 -3
  23. package/lib/rest/api/v2010/account/incomingPhoneNumber.js +7 -4
  24. package/lib/rest/conversations/v1/service/configuration/notification.d.ts +6 -0
  25. package/lib/rest/conversations/v1/service/configuration/notification.js +11 -1
  26. package/lib/rest/flexApi/v1/configuration.d.ts +2 -0
  27. package/lib/rest/flexApi/v1/configuration.js +2 -0
  28. package/lib/rest/frontlineApi/v1/user.d.ts +4 -0
  29. package/lib/rest/frontlineApi/v1/user.js +10 -1
  30. package/lib/rest/insights/v1/callSummaries.d.ts +27 -27
  31. package/lib/rest/insights/v1/callSummaries.js +36 -36
  32. package/lib/rest/media/V1.d.ts +28 -0
  33. package/lib/rest/media/V1.js +59 -0
  34. package/lib/rest/media/v1/mediaProcessor.d.ts +355 -0
  35. package/lib/rest/media/v1/mediaProcessor.js +702 -0
  36. package/lib/rest/media/v1/playerStreamer/playbackGrant.d.ts +162 -0
  37. package/lib/rest/media/v1/playerStreamer/playbackGrant.js +384 -0
  38. package/lib/rest/media/v1/playerStreamer.d.ts +366 -0
  39. package/lib/rest/media/v1/playerStreamer.js +729 -0
  40. package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +330 -0
  41. package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +655 -0
  42. package/lib/rest/messaging/v1/brandRegistration.d.ts +15 -2
  43. package/lib/rest/messaging/v1/brandRegistration.js +37 -1
  44. package/lib/rest/messaging/v1/service.d.ts +8 -0
  45. package/lib/rest/messaging/v1/service.js +14 -0
  46. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +133 -0
  47. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.js +268 -0
  48. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.d.ts +127 -0
  49. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.js +271 -0
  50. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +14 -0
  51. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +56 -0
  52. package/lib/rest/serverless/v1/service/build.d.ts +1 -1
  53. package/lib/rest/serverless/v1/service/environment.js +1 -1
  54. package/lib/rest/serverless/v1/service.d.ts +2 -0
  55. package/lib/rest/serverless/v1/service.js +3 -0
  56. package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +2 -0
  57. package/lib/rest/taskrouter/v1/workspace/task/reservation.js +4 -1
  58. package/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +2 -0
  59. package/lib/rest/taskrouter/v1/workspace/worker/reservation.js +4 -1
  60. package/lib/rest/taskrouter/v1/workspace/worker.d.ts +27 -2
  61. package/lib/rest/taskrouter/v1/workspace/worker.js +22 -7
  62. package/lib/rest/trunking/v1/trunk.d.ts +9 -1
  63. package/lib/rest/trunking/v1/trunk.js +13 -2
  64. package/lib/rest/verify/V2.d.ts +3 -3
  65. package/lib/rest/verify/V2.js +6 -8
  66. package/lib/rest/verify/v2/service/entity/factor.d.ts +4 -2
  67. package/lib/rest/verify/v2/service/entity/factor.js +8 -3
  68. package/lib/rest/verify/v2/service/entity/newFactor.d.ts +2 -2
  69. package/lib/rest/verify/v2/service/entity/newFactor.js +1 -1
  70. package/lib/rest/verify/v2/service/verification.d.ts +5 -1
  71. package/lib/rest/verify/v2/service/verification.js +7 -2
  72. package/lib/rest/verify/v2/service.d.ts +6 -0
  73. package/lib/rest/verify/v2/service.js +12 -2
  74. package/lib/rest/verify/v2/{verificationTemplate.d.ts → template.d.ts} +35 -37
  75. package/lib/rest/verify/v2/{verificationTemplate.js → template.js} +58 -64
  76. package/lib/rest/verify/v2/verificationAttempt.d.ts +1 -1
  77. package/lib/rest/video/v1/room.d.ts +4 -0
  78. package/lib/rest/video/v1/room.js +7 -1
  79. package/lib/rest/wireless/v1/ratePlan.d.ts +1 -1
  80. package/lib/rest/wireless/v1/ratePlan.js +3 -3
  81. package/lib/rest/wireless/v1/sim.d.ts +4 -4
  82. package/lib/rest/wireless/v1/sim.js +18 -24
  83. package/lib/twiml/VoiceResponse.d.ts +1296 -24
  84. package/lib/twiml/VoiceResponse.js +2170 -82
  85. package/package.json +2 -2
@@ -0,0 +1,811 @@
1
+ 'use strict';
2
+
3
+ /* jshint ignore:start */
4
+ /**
5
+ * This code was generated by
6
+ * \ / _ _ _| _ _
7
+ * | (_)\/(_)(_|\/| |(/_ v1.0.0
8
+ * / /
9
+ */
10
+ /* jshint ignore:end */
11
+
12
+ var Q = require('q'); /* jshint ignore:line */
13
+ var _ = require('lodash'); /* jshint ignore:line */
14
+ var util = require('util'); /* jshint ignore:line */
15
+ var Page = require('../../../../../base/Page'); /* jshint ignore:line */
16
+ var deserialize = require(
17
+ '../../../../../base/deserialize'); /* jshint ignore:line */
18
+ var values = require('../../../../../base/values'); /* jshint ignore:line */
19
+
20
+ var SiprecList;
21
+ var SiprecPage;
22
+ var SiprecInstance;
23
+ var SiprecContext;
24
+
25
+ /* jshint ignore:start */
26
+ /**
27
+ * Initialize the SiprecList
28
+ *
29
+ * @constructor Twilio.Api.V2010.AccountContext.CallContext.SiprecList
30
+ *
31
+ * @param {Twilio.Api.V2010} version - Version of the resource
32
+ * @param {string} accountSid - The SID of the Account that created this resource
33
+ * @param {string} callSid - The SID of the Call the resource is associated with
34
+ */
35
+ /* jshint ignore:end */
36
+ SiprecList = function SiprecList(version, accountSid, callSid) {
37
+ /* jshint ignore:start */
38
+ /**
39
+ * @function siprec
40
+ * @memberof Twilio.Api.V2010.AccountContext.CallContext#
41
+ *
42
+ * @param {string} sid - sid of instance
43
+ *
44
+ * @returns {Twilio.Api.V2010.AccountContext.CallContext.SiprecContext}
45
+ */
46
+ /* jshint ignore:end */
47
+ function SiprecListInstance(sid) {
48
+ return SiprecListInstance.get(sid);
49
+ }
50
+
51
+ SiprecListInstance._version = version;
52
+ // Path Solution
53
+ SiprecListInstance._solution = {accountSid: accountSid, callSid: callSid};
54
+ SiprecListInstance._uri = `/Accounts/${accountSid}/Calls/${callSid}/Siprec.json`;
55
+ /* jshint ignore:start */
56
+ /**
57
+ * create a SiprecInstance
58
+ *
59
+ * @function create
60
+ * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecList#
61
+ *
62
+ * @param {object} [opts] - Options for request
63
+ * @param {string} [opts.name] - The name of this resource
64
+ * @param {string} [opts.connectorName] -
65
+ * Unique name used when configuring the connector via Marketplace Add-on.
66
+ * @param {siprec.track} [opts.track] -
67
+ * One of `inbound_track`, `outbound_track`, `both_tracks`.
68
+ * @param {string} [opts.statusCallback] - Absolute URL of the status callback.
69
+ * @param {string} [opts.statusCallbackMethod] -
70
+ * The http method for the status_callback.
71
+ * @param {string} [opts.parameter1.name] - Parameter name
72
+ * @param {string} [opts.parameter1.value] - Parameter value
73
+ * @param {string} [opts.parameter2.name] - Parameter name
74
+ * @param {string} [opts.parameter2.value] - Parameter value
75
+ * @param {string} [opts.parameter3.name] - Parameter name
76
+ * @param {string} [opts.parameter3.value] - Parameter value
77
+ * @param {string} [opts.parameter4.name] - Parameter name
78
+ * @param {string} [opts.parameter4.value] - Parameter value
79
+ * @param {string} [opts.parameter5.name] - Parameter name
80
+ * @param {string} [opts.parameter5.value] - Parameter value
81
+ * @param {string} [opts.parameter6.name] - Parameter name
82
+ * @param {string} [opts.parameter6.value] - Parameter value
83
+ * @param {string} [opts.parameter7.name] - Parameter name
84
+ * @param {string} [opts.parameter7.value] - Parameter value
85
+ * @param {string} [opts.parameter8.name] - Parameter name
86
+ * @param {string} [opts.parameter8.value] - Parameter value
87
+ * @param {string} [opts.parameter9.name] - Parameter name
88
+ * @param {string} [opts.parameter9.value] - Parameter value
89
+ * @param {string} [opts.parameter10.name] - Parameter name
90
+ * @param {string} [opts.parameter10.value] - Parameter value
91
+ * @param {string} [opts.parameter11.name] - Parameter name
92
+ * @param {string} [opts.parameter11.value] - Parameter value
93
+ * @param {string} [opts.parameter12.name] - Parameter name
94
+ * @param {string} [opts.parameter12.value] - Parameter value
95
+ * @param {string} [opts.parameter13.name] - Parameter name
96
+ * @param {string} [opts.parameter13.value] - Parameter value
97
+ * @param {string} [opts.parameter14.name] - Parameter name
98
+ * @param {string} [opts.parameter14.value] - Parameter value
99
+ * @param {string} [opts.parameter15.name] - Parameter name
100
+ * @param {string} [opts.parameter15.value] - Parameter value
101
+ * @param {string} [opts.parameter16.name] - Parameter name
102
+ * @param {string} [opts.parameter16.value] - Parameter value
103
+ * @param {string} [opts.parameter17.name] - Parameter name
104
+ * @param {string} [opts.parameter17.value] - Parameter value
105
+ * @param {string} [opts.parameter18.name] - Parameter name
106
+ * @param {string} [opts.parameter18.value] - Parameter value
107
+ * @param {string} [opts.parameter19.name] - Parameter name
108
+ * @param {string} [opts.parameter19.value] - Parameter value
109
+ * @param {string} [opts.parameter20.name] - Parameter name
110
+ * @param {string} [opts.parameter20.value] - Parameter value
111
+ * @param {string} [opts.parameter21.name] - Parameter name
112
+ * @param {string} [opts.parameter21.value] - Parameter value
113
+ * @param {string} [opts.parameter22.name] - Parameter name
114
+ * @param {string} [opts.parameter22.value] - Parameter value
115
+ * @param {string} [opts.parameter23.name] - Parameter name
116
+ * @param {string} [opts.parameter23.value] - Parameter value
117
+ * @param {string} [opts.parameter24.name] - Parameter name
118
+ * @param {string} [opts.parameter24.value] - Parameter value
119
+ * @param {string} [opts.parameter25.name] - Parameter name
120
+ * @param {string} [opts.parameter25.value] - Parameter value
121
+ * @param {string} [opts.parameter26.name] - Parameter name
122
+ * @param {string} [opts.parameter26.value] - Parameter value
123
+ * @param {string} [opts.parameter27.name] - Parameter name
124
+ * @param {string} [opts.parameter27.value] - Parameter value
125
+ * @param {string} [opts.parameter28.name] - Parameter name
126
+ * @param {string} [opts.parameter28.value] - Parameter value
127
+ * @param {string} [opts.parameter29.name] - Parameter name
128
+ * @param {string} [opts.parameter29.value] - Parameter value
129
+ * @param {string} [opts.parameter30.name] - Parameter name
130
+ * @param {string} [opts.parameter30.value] - Parameter value
131
+ * @param {string} [opts.parameter31.name] - Parameter name
132
+ * @param {string} [opts.parameter31.value] - Parameter value
133
+ * @param {string} [opts.parameter32.name] - Parameter name
134
+ * @param {string} [opts.parameter32.value] - Parameter value
135
+ * @param {string} [opts.parameter33.name] - Parameter name
136
+ * @param {string} [opts.parameter33.value] - Parameter value
137
+ * @param {string} [opts.parameter34.name] - Parameter name
138
+ * @param {string} [opts.parameter34.value] - Parameter value
139
+ * @param {string} [opts.parameter35.name] - Parameter name
140
+ * @param {string} [opts.parameter35.value] - Parameter value
141
+ * @param {string} [opts.parameter36.name] - Parameter name
142
+ * @param {string} [opts.parameter36.value] - Parameter value
143
+ * @param {string} [opts.parameter37.name] - Parameter name
144
+ * @param {string} [opts.parameter37.value] - Parameter value
145
+ * @param {string} [opts.parameter38.name] - Parameter name
146
+ * @param {string} [opts.parameter38.value] - Parameter value
147
+ * @param {string} [opts.parameter39.name] - Parameter name
148
+ * @param {string} [opts.parameter39.value] - Parameter value
149
+ * @param {string} [opts.parameter40.name] - Parameter name
150
+ * @param {string} [opts.parameter40.value] - Parameter value
151
+ * @param {string} [opts.parameter41.name] - Parameter name
152
+ * @param {string} [opts.parameter41.value] - Parameter value
153
+ * @param {string} [opts.parameter42.name] - Parameter name
154
+ * @param {string} [opts.parameter42.value] - Parameter value
155
+ * @param {string} [opts.parameter43.name] - Parameter name
156
+ * @param {string} [opts.parameter43.value] - Parameter value
157
+ * @param {string} [opts.parameter44.name] - Parameter name
158
+ * @param {string} [opts.parameter44.value] - Parameter value
159
+ * @param {string} [opts.parameter45.name] - Parameter name
160
+ * @param {string} [opts.parameter45.value] - Parameter value
161
+ * @param {string} [opts.parameter46.name] - Parameter name
162
+ * @param {string} [opts.parameter46.value] - Parameter value
163
+ * @param {string} [opts.parameter47.name] - Parameter name
164
+ * @param {string} [opts.parameter47.value] - Parameter value
165
+ * @param {string} [opts.parameter48.name] - Parameter name
166
+ * @param {string} [opts.parameter48.value] - Parameter value
167
+ * @param {string} [opts.parameter49.name] - Parameter name
168
+ * @param {string} [opts.parameter49.value] - Parameter value
169
+ * @param {string} [opts.parameter50.name] - Parameter name
170
+ * @param {string} [opts.parameter50.value] - Parameter value
171
+ * @param {string} [opts.parameter51.name] - Parameter name
172
+ * @param {string} [opts.parameter51.value] - Parameter value
173
+ * @param {string} [opts.parameter52.name] - Parameter name
174
+ * @param {string} [opts.parameter52.value] - Parameter value
175
+ * @param {string} [opts.parameter53.name] - Parameter name
176
+ * @param {string} [opts.parameter53.value] - Parameter value
177
+ * @param {string} [opts.parameter54.name] - Parameter name
178
+ * @param {string} [opts.parameter54.value] - Parameter value
179
+ * @param {string} [opts.parameter55.name] - Parameter name
180
+ * @param {string} [opts.parameter55.value] - Parameter value
181
+ * @param {string} [opts.parameter56.name] - Parameter name
182
+ * @param {string} [opts.parameter56.value] - Parameter value
183
+ * @param {string} [opts.parameter57.name] - Parameter name
184
+ * @param {string} [opts.parameter57.value] - Parameter value
185
+ * @param {string} [opts.parameter58.name] - Parameter name
186
+ * @param {string} [opts.parameter58.value] - Parameter value
187
+ * @param {string} [opts.parameter59.name] - Parameter name
188
+ * @param {string} [opts.parameter59.value] - Parameter value
189
+ * @param {string} [opts.parameter60.name] - Parameter name
190
+ * @param {string} [opts.parameter60.value] - Parameter value
191
+ * @param {string} [opts.parameter61.name] - Parameter name
192
+ * @param {string} [opts.parameter61.value] - Parameter value
193
+ * @param {string} [opts.parameter62.name] - Parameter name
194
+ * @param {string} [opts.parameter62.value] - Parameter value
195
+ * @param {string} [opts.parameter63.name] - Parameter name
196
+ * @param {string} [opts.parameter63.value] - Parameter value
197
+ * @param {string} [opts.parameter64.name] - Parameter name
198
+ * @param {string} [opts.parameter64.value] - Parameter value
199
+ * @param {string} [opts.parameter65.name] - Parameter name
200
+ * @param {string} [opts.parameter65.value] - Parameter value
201
+ * @param {string} [opts.parameter66.name] - Parameter name
202
+ * @param {string} [opts.parameter66.value] - Parameter value
203
+ * @param {string} [opts.parameter67.name] - Parameter name
204
+ * @param {string} [opts.parameter67.value] - Parameter value
205
+ * @param {string} [opts.parameter68.name] - Parameter name
206
+ * @param {string} [opts.parameter68.value] - Parameter value
207
+ * @param {string} [opts.parameter69.name] - Parameter name
208
+ * @param {string} [opts.parameter69.value] - Parameter value
209
+ * @param {string} [opts.parameter70.name] - Parameter name
210
+ * @param {string} [opts.parameter70.value] - Parameter value
211
+ * @param {string} [opts.parameter71.name] - Parameter name
212
+ * @param {string} [opts.parameter71.value] - Parameter value
213
+ * @param {string} [opts.parameter72.name] - Parameter name
214
+ * @param {string} [opts.parameter72.value] - Parameter value
215
+ * @param {string} [opts.parameter73.name] - Parameter name
216
+ * @param {string} [opts.parameter73.value] - Parameter value
217
+ * @param {string} [opts.parameter74.name] - Parameter name
218
+ * @param {string} [opts.parameter74.value] - Parameter value
219
+ * @param {string} [opts.parameter75.name] - Parameter name
220
+ * @param {string} [opts.parameter75.value] - Parameter value
221
+ * @param {string} [opts.parameter76.name] - Parameter name
222
+ * @param {string} [opts.parameter76.value] - Parameter value
223
+ * @param {string} [opts.parameter77.name] - Parameter name
224
+ * @param {string} [opts.parameter77.value] - Parameter value
225
+ * @param {string} [opts.parameter78.name] - Parameter name
226
+ * @param {string} [opts.parameter78.value] - Parameter value
227
+ * @param {string} [opts.parameter79.name] - Parameter name
228
+ * @param {string} [opts.parameter79.value] - Parameter value
229
+ * @param {string} [opts.parameter80.name] - Parameter name
230
+ * @param {string} [opts.parameter80.value] - Parameter value
231
+ * @param {string} [opts.parameter81.name] - Parameter name
232
+ * @param {string} [opts.parameter81.value] - Parameter value
233
+ * @param {string} [opts.parameter82.name] - Parameter name
234
+ * @param {string} [opts.parameter82.value] - Parameter value
235
+ * @param {string} [opts.parameter83.name] - Parameter name
236
+ * @param {string} [opts.parameter83.value] - Parameter value
237
+ * @param {string} [opts.parameter84.name] - Parameter name
238
+ * @param {string} [opts.parameter84.value] - Parameter value
239
+ * @param {string} [opts.parameter85.name] - Parameter name
240
+ * @param {string} [opts.parameter85.value] - Parameter value
241
+ * @param {string} [opts.parameter86.name] - Parameter name
242
+ * @param {string} [opts.parameter86.value] - Parameter value
243
+ * @param {string} [opts.parameter87.name] - Parameter name
244
+ * @param {string} [opts.parameter87.value] - Parameter value
245
+ * @param {string} [opts.parameter88.name] - Parameter name
246
+ * @param {string} [opts.parameter88.value] - Parameter value
247
+ * @param {string} [opts.parameter89.name] - Parameter name
248
+ * @param {string} [opts.parameter89.value] - Parameter value
249
+ * @param {string} [opts.parameter90.name] - Parameter name
250
+ * @param {string} [opts.parameter90.value] - Parameter value
251
+ * @param {string} [opts.parameter91.name] - Parameter name
252
+ * @param {string} [opts.parameter91.value] - Parameter value
253
+ * @param {string} [opts.parameter92.name] - Parameter name
254
+ * @param {string} [opts.parameter92.value] - Parameter value
255
+ * @param {string} [opts.parameter93.name] - Parameter name
256
+ * @param {string} [opts.parameter93.value] - Parameter value
257
+ * @param {string} [opts.parameter94.name] - Parameter name
258
+ * @param {string} [opts.parameter94.value] - Parameter value
259
+ * @param {string} [opts.parameter95.name] - Parameter name
260
+ * @param {string} [opts.parameter95.value] - Parameter value
261
+ * @param {string} [opts.parameter96.name] - Parameter name
262
+ * @param {string} [opts.parameter96.value] - Parameter value
263
+ * @param {string} [opts.parameter97.name] - Parameter name
264
+ * @param {string} [opts.parameter97.value] - Parameter value
265
+ * @param {string} [opts.parameter98.name] - Parameter name
266
+ * @param {string} [opts.parameter98.value] - Parameter value
267
+ * @param {string} [opts.parameter99.name] - Parameter name
268
+ * @param {string} [opts.parameter99.value] - Parameter value
269
+ * @param {function} [callback] - Callback to handle processed record
270
+ *
271
+ * @returns {Promise} Resolves to processed SiprecInstance
272
+ */
273
+ /* jshint ignore:end */
274
+ SiprecListInstance.create = function create(opts, callback) {
275
+ if (_.isFunction(opts)) {
276
+ callback = opts;
277
+ opts = {};
278
+ }
279
+ opts = opts || {};
280
+
281
+ var deferred = Q.defer();
282
+ var data = values.of({
283
+ 'Name': _.get(opts, 'name'),
284
+ 'ConnectorName': _.get(opts, 'connectorName'),
285
+ 'Track': _.get(opts, 'track'),
286
+ 'StatusCallback': _.get(opts, 'statusCallback'),
287
+ 'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),
288
+ 'Parameter1.Name': _.get(opts, 'parameter1.name'),
289
+ 'Parameter1.Value': _.get(opts, 'parameter1.value'),
290
+ 'Parameter2.Name': _.get(opts, 'parameter2.name'),
291
+ 'Parameter2.Value': _.get(opts, 'parameter2.value'),
292
+ 'Parameter3.Name': _.get(opts, 'parameter3.name'),
293
+ 'Parameter3.Value': _.get(opts, 'parameter3.value'),
294
+ 'Parameter4.Name': _.get(opts, 'parameter4.name'),
295
+ 'Parameter4.Value': _.get(opts, 'parameter4.value'),
296
+ 'Parameter5.Name': _.get(opts, 'parameter5.name'),
297
+ 'Parameter5.Value': _.get(opts, 'parameter5.value'),
298
+ 'Parameter6.Name': _.get(opts, 'parameter6.name'),
299
+ 'Parameter6.Value': _.get(opts, 'parameter6.value'),
300
+ 'Parameter7.Name': _.get(opts, 'parameter7.name'),
301
+ 'Parameter7.Value': _.get(opts, 'parameter7.value'),
302
+ 'Parameter8.Name': _.get(opts, 'parameter8.name'),
303
+ 'Parameter8.Value': _.get(opts, 'parameter8.value'),
304
+ 'Parameter9.Name': _.get(opts, 'parameter9.name'),
305
+ 'Parameter9.Value': _.get(opts, 'parameter9.value'),
306
+ 'Parameter10.Name': _.get(opts, 'parameter10.name'),
307
+ 'Parameter10.Value': _.get(opts, 'parameter10.value'),
308
+ 'Parameter11.Name': _.get(opts, 'parameter11.name'),
309
+ 'Parameter11.Value': _.get(opts, 'parameter11.value'),
310
+ 'Parameter12.Name': _.get(opts, 'parameter12.name'),
311
+ 'Parameter12.Value': _.get(opts, 'parameter12.value'),
312
+ 'Parameter13.Name': _.get(opts, 'parameter13.name'),
313
+ 'Parameter13.Value': _.get(opts, 'parameter13.value'),
314
+ 'Parameter14.Name': _.get(opts, 'parameter14.name'),
315
+ 'Parameter14.Value': _.get(opts, 'parameter14.value'),
316
+ 'Parameter15.Name': _.get(opts, 'parameter15.name'),
317
+ 'Parameter15.Value': _.get(opts, 'parameter15.value'),
318
+ 'Parameter16.Name': _.get(opts, 'parameter16.name'),
319
+ 'Parameter16.Value': _.get(opts, 'parameter16.value'),
320
+ 'Parameter17.Name': _.get(opts, 'parameter17.name'),
321
+ 'Parameter17.Value': _.get(opts, 'parameter17.value'),
322
+ 'Parameter18.Name': _.get(opts, 'parameter18.name'),
323
+ 'Parameter18.Value': _.get(opts, 'parameter18.value'),
324
+ 'Parameter19.Name': _.get(opts, 'parameter19.name'),
325
+ 'Parameter19.Value': _.get(opts, 'parameter19.value'),
326
+ 'Parameter20.Name': _.get(opts, 'parameter20.name'),
327
+ 'Parameter20.Value': _.get(opts, 'parameter20.value'),
328
+ 'Parameter21.Name': _.get(opts, 'parameter21.name'),
329
+ 'Parameter21.Value': _.get(opts, 'parameter21.value'),
330
+ 'Parameter22.Name': _.get(opts, 'parameter22.name'),
331
+ 'Parameter22.Value': _.get(opts, 'parameter22.value'),
332
+ 'Parameter23.Name': _.get(opts, 'parameter23.name'),
333
+ 'Parameter23.Value': _.get(opts, 'parameter23.value'),
334
+ 'Parameter24.Name': _.get(opts, 'parameter24.name'),
335
+ 'Parameter24.Value': _.get(opts, 'parameter24.value'),
336
+ 'Parameter25.Name': _.get(opts, 'parameter25.name'),
337
+ 'Parameter25.Value': _.get(opts, 'parameter25.value'),
338
+ 'Parameter26.Name': _.get(opts, 'parameter26.name'),
339
+ 'Parameter26.Value': _.get(opts, 'parameter26.value'),
340
+ 'Parameter27.Name': _.get(opts, 'parameter27.name'),
341
+ 'Parameter27.Value': _.get(opts, 'parameter27.value'),
342
+ 'Parameter28.Name': _.get(opts, 'parameter28.name'),
343
+ 'Parameter28.Value': _.get(opts, 'parameter28.value'),
344
+ 'Parameter29.Name': _.get(opts, 'parameter29.name'),
345
+ 'Parameter29.Value': _.get(opts, 'parameter29.value'),
346
+ 'Parameter30.Name': _.get(opts, 'parameter30.name'),
347
+ 'Parameter30.Value': _.get(opts, 'parameter30.value'),
348
+ 'Parameter31.Name': _.get(opts, 'parameter31.name'),
349
+ 'Parameter31.Value': _.get(opts, 'parameter31.value'),
350
+ 'Parameter32.Name': _.get(opts, 'parameter32.name'),
351
+ 'Parameter32.Value': _.get(opts, 'parameter32.value'),
352
+ 'Parameter33.Name': _.get(opts, 'parameter33.name'),
353
+ 'Parameter33.Value': _.get(opts, 'parameter33.value'),
354
+ 'Parameter34.Name': _.get(opts, 'parameter34.name'),
355
+ 'Parameter34.Value': _.get(opts, 'parameter34.value'),
356
+ 'Parameter35.Name': _.get(opts, 'parameter35.name'),
357
+ 'Parameter35.Value': _.get(opts, 'parameter35.value'),
358
+ 'Parameter36.Name': _.get(opts, 'parameter36.name'),
359
+ 'Parameter36.Value': _.get(opts, 'parameter36.value'),
360
+ 'Parameter37.Name': _.get(opts, 'parameter37.name'),
361
+ 'Parameter37.Value': _.get(opts, 'parameter37.value'),
362
+ 'Parameter38.Name': _.get(opts, 'parameter38.name'),
363
+ 'Parameter38.Value': _.get(opts, 'parameter38.value'),
364
+ 'Parameter39.Name': _.get(opts, 'parameter39.name'),
365
+ 'Parameter39.Value': _.get(opts, 'parameter39.value'),
366
+ 'Parameter40.Name': _.get(opts, 'parameter40.name'),
367
+ 'Parameter40.Value': _.get(opts, 'parameter40.value'),
368
+ 'Parameter41.Name': _.get(opts, 'parameter41.name'),
369
+ 'Parameter41.Value': _.get(opts, 'parameter41.value'),
370
+ 'Parameter42.Name': _.get(opts, 'parameter42.name'),
371
+ 'Parameter42.Value': _.get(opts, 'parameter42.value'),
372
+ 'Parameter43.Name': _.get(opts, 'parameter43.name'),
373
+ 'Parameter43.Value': _.get(opts, 'parameter43.value'),
374
+ 'Parameter44.Name': _.get(opts, 'parameter44.name'),
375
+ 'Parameter44.Value': _.get(opts, 'parameter44.value'),
376
+ 'Parameter45.Name': _.get(opts, 'parameter45.name'),
377
+ 'Parameter45.Value': _.get(opts, 'parameter45.value'),
378
+ 'Parameter46.Name': _.get(opts, 'parameter46.name'),
379
+ 'Parameter46.Value': _.get(opts, 'parameter46.value'),
380
+ 'Parameter47.Name': _.get(opts, 'parameter47.name'),
381
+ 'Parameter47.Value': _.get(opts, 'parameter47.value'),
382
+ 'Parameter48.Name': _.get(opts, 'parameter48.name'),
383
+ 'Parameter48.Value': _.get(opts, 'parameter48.value'),
384
+ 'Parameter49.Name': _.get(opts, 'parameter49.name'),
385
+ 'Parameter49.Value': _.get(opts, 'parameter49.value'),
386
+ 'Parameter50.Name': _.get(opts, 'parameter50.name'),
387
+ 'Parameter50.Value': _.get(opts, 'parameter50.value'),
388
+ 'Parameter51.Name': _.get(opts, 'parameter51.name'),
389
+ 'Parameter51.Value': _.get(opts, 'parameter51.value'),
390
+ 'Parameter52.Name': _.get(opts, 'parameter52.name'),
391
+ 'Parameter52.Value': _.get(opts, 'parameter52.value'),
392
+ 'Parameter53.Name': _.get(opts, 'parameter53.name'),
393
+ 'Parameter53.Value': _.get(opts, 'parameter53.value'),
394
+ 'Parameter54.Name': _.get(opts, 'parameter54.name'),
395
+ 'Parameter54.Value': _.get(opts, 'parameter54.value'),
396
+ 'Parameter55.Name': _.get(opts, 'parameter55.name'),
397
+ 'Parameter55.Value': _.get(opts, 'parameter55.value'),
398
+ 'Parameter56.Name': _.get(opts, 'parameter56.name'),
399
+ 'Parameter56.Value': _.get(opts, 'parameter56.value'),
400
+ 'Parameter57.Name': _.get(opts, 'parameter57.name'),
401
+ 'Parameter57.Value': _.get(opts, 'parameter57.value'),
402
+ 'Parameter58.Name': _.get(opts, 'parameter58.name'),
403
+ 'Parameter58.Value': _.get(opts, 'parameter58.value'),
404
+ 'Parameter59.Name': _.get(opts, 'parameter59.name'),
405
+ 'Parameter59.Value': _.get(opts, 'parameter59.value'),
406
+ 'Parameter60.Name': _.get(opts, 'parameter60.name'),
407
+ 'Parameter60.Value': _.get(opts, 'parameter60.value'),
408
+ 'Parameter61.Name': _.get(opts, 'parameter61.name'),
409
+ 'Parameter61.Value': _.get(opts, 'parameter61.value'),
410
+ 'Parameter62.Name': _.get(opts, 'parameter62.name'),
411
+ 'Parameter62.Value': _.get(opts, 'parameter62.value'),
412
+ 'Parameter63.Name': _.get(opts, 'parameter63.name'),
413
+ 'Parameter63.Value': _.get(opts, 'parameter63.value'),
414
+ 'Parameter64.Name': _.get(opts, 'parameter64.name'),
415
+ 'Parameter64.Value': _.get(opts, 'parameter64.value'),
416
+ 'Parameter65.Name': _.get(opts, 'parameter65.name'),
417
+ 'Parameter65.Value': _.get(opts, 'parameter65.value'),
418
+ 'Parameter66.Name': _.get(opts, 'parameter66.name'),
419
+ 'Parameter66.Value': _.get(opts, 'parameter66.value'),
420
+ 'Parameter67.Name': _.get(opts, 'parameter67.name'),
421
+ 'Parameter67.Value': _.get(opts, 'parameter67.value'),
422
+ 'Parameter68.Name': _.get(opts, 'parameter68.name'),
423
+ 'Parameter68.Value': _.get(opts, 'parameter68.value'),
424
+ 'Parameter69.Name': _.get(opts, 'parameter69.name'),
425
+ 'Parameter69.Value': _.get(opts, 'parameter69.value'),
426
+ 'Parameter70.Name': _.get(opts, 'parameter70.name'),
427
+ 'Parameter70.Value': _.get(opts, 'parameter70.value'),
428
+ 'Parameter71.Name': _.get(opts, 'parameter71.name'),
429
+ 'Parameter71.Value': _.get(opts, 'parameter71.value'),
430
+ 'Parameter72.Name': _.get(opts, 'parameter72.name'),
431
+ 'Parameter72.Value': _.get(opts, 'parameter72.value'),
432
+ 'Parameter73.Name': _.get(opts, 'parameter73.name'),
433
+ 'Parameter73.Value': _.get(opts, 'parameter73.value'),
434
+ 'Parameter74.Name': _.get(opts, 'parameter74.name'),
435
+ 'Parameter74.Value': _.get(opts, 'parameter74.value'),
436
+ 'Parameter75.Name': _.get(opts, 'parameter75.name'),
437
+ 'Parameter75.Value': _.get(opts, 'parameter75.value'),
438
+ 'Parameter76.Name': _.get(opts, 'parameter76.name'),
439
+ 'Parameter76.Value': _.get(opts, 'parameter76.value'),
440
+ 'Parameter77.Name': _.get(opts, 'parameter77.name'),
441
+ 'Parameter77.Value': _.get(opts, 'parameter77.value'),
442
+ 'Parameter78.Name': _.get(opts, 'parameter78.name'),
443
+ 'Parameter78.Value': _.get(opts, 'parameter78.value'),
444
+ 'Parameter79.Name': _.get(opts, 'parameter79.name'),
445
+ 'Parameter79.Value': _.get(opts, 'parameter79.value'),
446
+ 'Parameter80.Name': _.get(opts, 'parameter80.name'),
447
+ 'Parameter80.Value': _.get(opts, 'parameter80.value'),
448
+ 'Parameter81.Name': _.get(opts, 'parameter81.name'),
449
+ 'Parameter81.Value': _.get(opts, 'parameter81.value'),
450
+ 'Parameter82.Name': _.get(opts, 'parameter82.name'),
451
+ 'Parameter82.Value': _.get(opts, 'parameter82.value'),
452
+ 'Parameter83.Name': _.get(opts, 'parameter83.name'),
453
+ 'Parameter83.Value': _.get(opts, 'parameter83.value'),
454
+ 'Parameter84.Name': _.get(opts, 'parameter84.name'),
455
+ 'Parameter84.Value': _.get(opts, 'parameter84.value'),
456
+ 'Parameter85.Name': _.get(opts, 'parameter85.name'),
457
+ 'Parameter85.Value': _.get(opts, 'parameter85.value'),
458
+ 'Parameter86.Name': _.get(opts, 'parameter86.name'),
459
+ 'Parameter86.Value': _.get(opts, 'parameter86.value'),
460
+ 'Parameter87.Name': _.get(opts, 'parameter87.name'),
461
+ 'Parameter87.Value': _.get(opts, 'parameter87.value'),
462
+ 'Parameter88.Name': _.get(opts, 'parameter88.name'),
463
+ 'Parameter88.Value': _.get(opts, 'parameter88.value'),
464
+ 'Parameter89.Name': _.get(opts, 'parameter89.name'),
465
+ 'Parameter89.Value': _.get(opts, 'parameter89.value'),
466
+ 'Parameter90.Name': _.get(opts, 'parameter90.name'),
467
+ 'Parameter90.Value': _.get(opts, 'parameter90.value'),
468
+ 'Parameter91.Name': _.get(opts, 'parameter91.name'),
469
+ 'Parameter91.Value': _.get(opts, 'parameter91.value'),
470
+ 'Parameter92.Name': _.get(opts, 'parameter92.name'),
471
+ 'Parameter92.Value': _.get(opts, 'parameter92.value'),
472
+ 'Parameter93.Name': _.get(opts, 'parameter93.name'),
473
+ 'Parameter93.Value': _.get(opts, 'parameter93.value'),
474
+ 'Parameter94.Name': _.get(opts, 'parameter94.name'),
475
+ 'Parameter94.Value': _.get(opts, 'parameter94.value'),
476
+ 'Parameter95.Name': _.get(opts, 'parameter95.name'),
477
+ 'Parameter95.Value': _.get(opts, 'parameter95.value'),
478
+ 'Parameter96.Name': _.get(opts, 'parameter96.name'),
479
+ 'Parameter96.Value': _.get(opts, 'parameter96.value'),
480
+ 'Parameter97.Name': _.get(opts, 'parameter97.name'),
481
+ 'Parameter97.Value': _.get(opts, 'parameter97.value'),
482
+ 'Parameter98.Name': _.get(opts, 'parameter98.name'),
483
+ 'Parameter98.Value': _.get(opts, 'parameter98.value'),
484
+ 'Parameter99.Name': _.get(opts, 'parameter99.name'),
485
+ 'Parameter99.Value': _.get(opts, 'parameter99.value')
486
+ });
487
+
488
+ var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
489
+
490
+ promise = promise.then(function(payload) {
491
+ deferred.resolve(new SiprecInstance(
492
+ this._version,
493
+ payload,
494
+ this._solution.accountSid,
495
+ this._solution.callSid,
496
+ this._solution.sid
497
+ ));
498
+ }.bind(this));
499
+
500
+ promise.catch(function(error) {
501
+ deferred.reject(error);
502
+ });
503
+
504
+ if (_.isFunction(callback)) {
505
+ deferred.promise.nodeify(callback);
506
+ }
507
+
508
+ return deferred.promise;
509
+ };
510
+
511
+ /* jshint ignore:start */
512
+ /**
513
+ * Constructs a siprec
514
+ *
515
+ * @function get
516
+ * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecList#
517
+ *
518
+ * @param {string} sid - The SID of the Siprec resource, or the `name`
519
+ *
520
+ * @returns {Twilio.Api.V2010.AccountContext.CallContext.SiprecContext}
521
+ */
522
+ /* jshint ignore:end */
523
+ SiprecListInstance.get = function get(sid) {
524
+ return new SiprecContext(this._version, this._solution.accountSid, this._solution.callSid, sid);
525
+ };
526
+
527
+ /* jshint ignore:start */
528
+ /**
529
+ * Provide a user-friendly representation
530
+ *
531
+ * @function toJSON
532
+ * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecList#
533
+ *
534
+ * @returns Object
535
+ */
536
+ /* jshint ignore:end */
537
+ SiprecListInstance.toJSON = function toJSON() {
538
+ return this._solution;
539
+ };
540
+
541
+ SiprecListInstance[util.inspect.custom] = function inspect(depth, options) {
542
+ return util.inspect(this.toJSON(), options);
543
+ };
544
+
545
+ return SiprecListInstance;
546
+ };
547
+
548
+
549
+ /* jshint ignore:start */
550
+ /**
551
+ * Initialize the SiprecPage
552
+ *
553
+ * @constructor Twilio.Api.V2010.AccountContext.CallContext.SiprecPage
554
+ *
555
+ * @param {V2010} version - Version of the resource
556
+ * @param {Response<string>} response - Response from the API
557
+ * @param {SiprecSolution} solution - Path solution
558
+ *
559
+ * @returns SiprecPage
560
+ */
561
+ /* jshint ignore:end */
562
+ SiprecPage = function SiprecPage(version, response, solution) {
563
+ // Path Solution
564
+ this._solution = solution;
565
+
566
+ Page.prototype.constructor.call(this, version, response, this._solution);
567
+ };
568
+
569
+ _.extend(SiprecPage.prototype, Page.prototype);
570
+ SiprecPage.prototype.constructor = SiprecPage;
571
+
572
+ /* jshint ignore:start */
573
+ /**
574
+ * Build an instance of SiprecInstance
575
+ *
576
+ * @function getInstance
577
+ * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecPage#
578
+ *
579
+ * @param {SiprecPayload} payload - Payload response from the API
580
+ *
581
+ * @returns SiprecInstance
582
+ */
583
+ /* jshint ignore:end */
584
+ SiprecPage.prototype.getInstance = function getInstance(payload) {
585
+ return new SiprecInstance(
586
+ this._version,
587
+ payload,
588
+ this._solution.accountSid,
589
+ this._solution.callSid
590
+ );
591
+ };
592
+
593
+ /* jshint ignore:start */
594
+ /**
595
+ * Provide a user-friendly representation
596
+ *
597
+ * @function toJSON
598
+ * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecPage#
599
+ *
600
+ * @returns Object
601
+ */
602
+ /* jshint ignore:end */
603
+ SiprecPage.prototype.toJSON = function toJSON() {
604
+ let clone = {};
605
+ _.forOwn(this, function(value, key) {
606
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
607
+ clone[key] = value;
608
+ }
609
+ });
610
+ return clone;
611
+ };
612
+
613
+ SiprecPage.prototype[util.inspect.custom] = function inspect(depth, options) {
614
+ return util.inspect(this.toJSON(), options);
615
+ };
616
+
617
+
618
+ /* jshint ignore:start */
619
+ /**
620
+ * Initialize the SiprecContext
621
+ *
622
+ * @constructor Twilio.Api.V2010.AccountContext.CallContext.SiprecInstance
623
+ *
624
+ * @property {string} sid - The SID of the Siprec resource.
625
+ * @property {string} accountSid -
626
+ * The SID of the Account that created this resource
627
+ * @property {string} callSid - The SID of the Call the resource is associated with
628
+ * @property {string} name - The name of this resource
629
+ * @property {siprec.status} status - The status - one of `stopped`, `in-progress`
630
+ * @property {Date} dateUpdated -
631
+ * The RFC 2822 date and time in GMT that this resource was last updated
632
+ *
633
+ * @param {V2010} version - Version of the resource
634
+ * @param {SiprecPayload} payload - The instance payload
635
+ * @param {sid} accountSid - The SID of the Account that created this resource
636
+ * @param {sid} callSid - The SID of the Call the resource is associated with
637
+ * @param {sid_like} sid - The SID of the Siprec resource, or the `name`
638
+ */
639
+ /* jshint ignore:end */
640
+ SiprecInstance = function SiprecInstance(version, payload, accountSid, callSid,
641
+ sid) {
642
+ this._version = version;
643
+
644
+ // Marshaled Properties
645
+ this.sid = payload.sid; // jshint ignore:line
646
+ this.accountSid = payload.account_sid; // jshint ignore:line
647
+ this.callSid = payload.call_sid; // jshint ignore:line
648
+ this.name = payload.name; // jshint ignore:line
649
+ this.status = payload.status; // jshint ignore:line
650
+ this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line
651
+
652
+ // Context
653
+ this._context = undefined;
654
+ this._solution = {accountSid: accountSid, callSid: callSid, sid: sid || this.sid, };
655
+ };
656
+
657
+ Object.defineProperty(SiprecInstance.prototype,
658
+ '_proxy', {
659
+ get: function() {
660
+ if (!this._context) {
661
+ this._context = new SiprecContext(
662
+ this._version,
663
+ this._solution.accountSid,
664
+ this._solution.callSid,
665
+ this._solution.sid
666
+ );
667
+ }
668
+
669
+ return this._context;
670
+ }
671
+ });
672
+
673
+ /* jshint ignore:start */
674
+ /**
675
+ * update a SiprecInstance
676
+ *
677
+ * @function update
678
+ * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecInstance#
679
+ *
680
+ * @param {object} opts - Options for request
681
+ * @param {siprec.update_status} opts.status -
682
+ * The status. Must have the value `stopped`
683
+ * @param {function} [callback] - Callback to handle processed record
684
+ *
685
+ * @returns {Promise} Resolves to processed SiprecInstance
686
+ */
687
+ /* jshint ignore:end */
688
+ SiprecInstance.prototype.update = function update(opts, callback) {
689
+ return this._proxy.update(opts, callback);
690
+ };
691
+
692
+ /* jshint ignore:start */
693
+ /**
694
+ * Provide a user-friendly representation
695
+ *
696
+ * @function toJSON
697
+ * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecInstance#
698
+ *
699
+ * @returns Object
700
+ */
701
+ /* jshint ignore:end */
702
+ SiprecInstance.prototype.toJSON = function toJSON() {
703
+ let clone = {};
704
+ _.forOwn(this, function(value, key) {
705
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
706
+ clone[key] = value;
707
+ }
708
+ });
709
+ return clone;
710
+ };
711
+
712
+ SiprecInstance.prototype[util.inspect.custom] = function inspect(depth, options)
713
+ {
714
+ return util.inspect(this.toJSON(), options);
715
+ };
716
+
717
+
718
+ /* jshint ignore:start */
719
+ /**
720
+ * Initialize the SiprecContext
721
+ *
722
+ * @constructor Twilio.Api.V2010.AccountContext.CallContext.SiprecContext
723
+ *
724
+ * @param {V2010} version - Version of the resource
725
+ * @param {sid} accountSid - The SID of the Account that created this resource
726
+ * @param {sid} callSid - The SID of the Call the resource is associated with
727
+ * @param {sid_like} sid - The SID of the Siprec resource, or the `name`
728
+ */
729
+ /* jshint ignore:end */
730
+ SiprecContext = function SiprecContext(version, accountSid, callSid, sid) {
731
+ this._version = version;
732
+
733
+ // Path Solution
734
+ this._solution = {accountSid: accountSid, callSid: callSid, sid: sid, };
735
+ this._uri = `/Accounts/${accountSid}/Calls/${callSid}/Siprec/${sid}.json`;
736
+ };
737
+
738
+ /* jshint ignore:start */
739
+ /**
740
+ * update a SiprecInstance
741
+ *
742
+ * @function update
743
+ * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecContext#
744
+ *
745
+ * @param {object} opts - Options for request
746
+ * @param {siprec.update_status} opts.status -
747
+ * The status. Must have the value `stopped`
748
+ * @param {function} [callback] - Callback to handle processed record
749
+ *
750
+ * @returns {Promise} Resolves to processed SiprecInstance
751
+ */
752
+ /* jshint ignore:end */
753
+ SiprecContext.prototype.update = function update(opts, callback) {
754
+ if (_.isUndefined(opts)) {
755
+ throw new Error('Required parameter "opts" missing.');
756
+ }
757
+ if (_.isUndefined(opts.status)) {
758
+ throw new Error('Required parameter "opts.status" missing.');
759
+ }
760
+
761
+ var deferred = Q.defer();
762
+ var data = values.of({'Status': _.get(opts, 'status')});
763
+
764
+ var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
765
+
766
+ promise = promise.then(function(payload) {
767
+ deferred.resolve(new SiprecInstance(
768
+ this._version,
769
+ payload,
770
+ this._solution.accountSid,
771
+ this._solution.callSid,
772
+ this._solution.sid
773
+ ));
774
+ }.bind(this));
775
+
776
+ promise.catch(function(error) {
777
+ deferred.reject(error);
778
+ });
779
+
780
+ if (_.isFunction(callback)) {
781
+ deferred.promise.nodeify(callback);
782
+ }
783
+
784
+ return deferred.promise;
785
+ };
786
+
787
+ /* jshint ignore:start */
788
+ /**
789
+ * Provide a user-friendly representation
790
+ *
791
+ * @function toJSON
792
+ * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecContext#
793
+ *
794
+ * @returns Object
795
+ */
796
+ /* jshint ignore:end */
797
+ SiprecContext.prototype.toJSON = function toJSON() {
798
+ return this._solution;
799
+ };
800
+
801
+ SiprecContext.prototype[util.inspect.custom] = function inspect(depth, options)
802
+ {
803
+ return util.inspect(this.toJSON(), options);
804
+ };
805
+
806
+ module.exports = {
807
+ SiprecList: SiprecList,
808
+ SiprecPage: SiprecPage,
809
+ SiprecInstance: SiprecInstance,
810
+ SiprecContext: SiprecContext
811
+ };