twilio 3.83.3 → 3.83.4

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 (38) hide show
  1. package/lib/rest/FlexApi.d.ts +2 -0
  2. package/lib/rest/FlexApi.js +8 -0
  3. package/lib/rest/Messaging.d.ts +4 -0
  4. package/lib/rest/Messaging.js +18 -0
  5. package/lib/rest/Preview.d.ts +0 -10
  6. package/lib/rest/Preview.js +0 -46
  7. package/lib/rest/content/v1/content/approvalFetch.d.ts +139 -0
  8. package/lib/rest/content/v1/content/approvalFetch.js +328 -0
  9. package/lib/rest/content/v1/content.d.ts +7 -6
  10. package/lib/rest/content/v1/content.js +31 -31
  11. package/lib/rest/flexApi/V1.d.ts +3 -0
  12. package/lib/rest/flexApi/V1.js +11 -0
  13. package/lib/rest/flexApi/v1/assessments.d.ts +113 -0
  14. package/lib/rest/flexApi/v1/assessments.js +300 -0
  15. package/lib/rest/lookups/v2/phoneNumber.d.ts +22 -0
  16. package/lib/rest/lookups/v2/phoneNumber.js +43 -1
  17. package/lib/rest/messaging/V1.d.ts +6 -0
  18. package/lib/rest/messaging/V1.js +24 -0
  19. package/lib/rest/messaging/v1/domainCert.d.ts +178 -0
  20. package/lib/rest/messaging/v1/domainCert.js +447 -0
  21. package/lib/rest/messaging/v1/domainConfig.d.ts +172 -0
  22. package/lib/rest/messaging/v1/domainConfig.js +421 -0
  23. package/lib/rest/microvisor/v1/device.d.ts +2 -0
  24. package/lib/rest/microvisor/v1/device.js +2 -0
  25. package/lib/rest/serverless/v1/service/build.d.ts +1 -1
  26. package/package.json +1 -1
  27. package/lib/rest/preview/TrustedComms.d.ts +0 -34
  28. package/lib/rest/preview/TrustedComms.js +0 -84
  29. package/lib/rest/preview/trusted_comms/brandedChannel/channel.d.ts +0 -120
  30. package/lib/rest/preview/trusted_comms/brandedChannel/channel.js +0 -257
  31. package/lib/rest/preview/trusted_comms/brandedChannel.d.ts +0 -150
  32. package/lib/rest/preview/trusted_comms/brandedChannel.js +0 -362
  33. package/lib/rest/preview/trusted_comms/brandsInformation.d.ts +0 -158
  34. package/lib/rest/preview/trusted_comms/brandsInformation.js +0 -338
  35. package/lib/rest/preview/trusted_comms/cps.d.ts +0 -156
  36. package/lib/rest/preview/trusted_comms/cps.js +0 -332
  37. package/lib/rest/preview/trusted_comms/currentCall.d.ts +0 -180
  38. package/lib/rest/preview/trusted_comms/currentCall.js +0 -367
@@ -8,6 +8,7 @@
8
8
  import Domain = require('../base/Domain');
9
9
  import Twilio = require('./Twilio');
10
10
  import V1 = require('./flexApi/V1');
11
+ import { AssessmentsListInstance } from './flexApi/v1/assessments';
11
12
  import { ChannelListInstance } from './flexApi/v1/channel';
12
13
  import { ConfigurationListInstance } from './flexApi/v1/configuration';
13
14
  import { FlexFlowListInstance } from './flexApi/v1/flexFlow';
@@ -25,6 +26,7 @@ declare class FlexApi extends Domain {
25
26
  */
26
27
  constructor(twilio: Twilio);
27
28
 
29
+ readonly assessments: AssessmentsListInstance;
28
30
  readonly channel: ChannelListInstance;
29
31
  readonly configuration: ConfigurationListInstance;
30
32
  readonly flexFlow: FlexFlowListInstance;
@@ -21,6 +21,7 @@ var V1 = require('./flexApi/V1'); /* jshint ignore:line */
21
21
  * @constructor Twilio.FlexApi
22
22
  *
23
23
  * @property {Twilio.FlexApi.V1} v1 - v1 version
24
+ * @property {Twilio.FlexApi.V1.AssessmentsList} assessments - assessments resource
24
25
  * @property {Twilio.FlexApi.V1.ChannelList} channel - channel resource
25
26
  * @property {Twilio.FlexApi.V1.ConfigurationList} configuration -
26
27
  * configuration resource
@@ -51,6 +52,13 @@ Object.defineProperty(FlexApi.prototype,
51
52
  }
52
53
  });
53
54
 
55
+ Object.defineProperty(FlexApi.prototype,
56
+ 'assessments', {
57
+ get: function() {
58
+ return this.v1.assessments;
59
+ }
60
+ });
61
+
54
62
  Object.defineProperty(FlexApi.prototype,
55
63
  'channel', {
56
64
  get: function() {
@@ -10,6 +10,8 @@ import Twilio = require('./Twilio');
10
10
  import V1 = require('./messaging/V1');
11
11
  import { BrandRegistrationListInstance } from './messaging/v1/brandRegistration';
12
12
  import { DeactivationsListInstance } from './messaging/v1/deactivation';
13
+ import { DomainCertsListInstance } from './messaging/v1/domainCert';
14
+ import { DomainConfigListInstance } from './messaging/v1/domainConfig';
13
15
  import { ExternalCampaignListInstance } from './messaging/v1/externalCampaign';
14
16
  import { ServiceListInstance } from './messaging/v1/service';
15
17
  import { TollfreeVerificationListInstance } from './messaging/v1/tollfreeVerification';
@@ -26,6 +28,8 @@ declare class Messaging extends Domain {
26
28
 
27
29
  readonly brandRegistrations: BrandRegistrationListInstance;
28
30
  readonly deactivations: DeactivationsListInstance;
31
+ readonly domainCerts: DomainCertsListInstance;
32
+ readonly domainConfig: DomainConfigListInstance;
29
33
  readonly externalCampaign: ExternalCampaignListInstance;
30
34
  readonly services: ServiceListInstance;
31
35
  readonly tollfreeVerifications: TollfreeVerificationListInstance;
@@ -25,6 +25,10 @@ var V1 = require('./messaging/V1'); /* jshint ignore:line */
25
25
  * brandRegistrations resource
26
26
  * @property {Twilio.Messaging.V1.DeactivationsList} deactivations -
27
27
  * deactivations resource
28
+ * @property {Twilio.Messaging.V1.DomainCertsList} domainCerts -
29
+ * domainCerts resource
30
+ * @property {Twilio.Messaging.V1.DomainConfigList} domainConfig -
31
+ * domainConfig resource
28
32
  * @property {Twilio.Messaging.V1.ExternalCampaignList} externalCampaign -
29
33
  * externalCampaign resource
30
34
  * @property {Twilio.Messaging.V1.ServiceList} services - services resource
@@ -67,6 +71,20 @@ Object.defineProperty(Messaging.prototype,
67
71
  }
68
72
  });
69
73
 
74
+ Object.defineProperty(Messaging.prototype,
75
+ 'domainCerts', {
76
+ get: function() {
77
+ return this.v1.domainCerts;
78
+ }
79
+ });
80
+
81
+ Object.defineProperty(Messaging.prototype,
82
+ 'domainConfig', {
83
+ get: function() {
84
+ return this.v1.domainConfig;
85
+ }
86
+ });
87
+
70
88
  Object.defineProperty(Messaging.prototype,
71
89
  'externalCampaign', {
72
90
  get: function() {
@@ -10,18 +10,13 @@ import Domain = require('../base/Domain');
10
10
  import HostedNumbers = require('./preview/HostedNumbers');
11
11
  import Marketplace = require('./preview/Marketplace');
12
12
  import Sync = require('./preview/Sync');
13
- import TrustedComms = require('./preview/TrustedComms');
14
13
  import Twilio = require('./Twilio');
15
14
  import Understand = require('./preview/Understand');
16
15
  import Wireless = require('./preview/Wireless');
17
16
  import { AssistantListInstance } from './preview/understand/assistant';
18
17
  import { AuthorizationDocumentListInstance } from './preview/hosted_numbers/authorizationDocument';
19
18
  import { AvailableAddOnListInstance } from './preview/marketplace/availableAddOn';
20
- import { BrandedChannelListInstance } from './preview/trusted_comms/brandedChannel';
21
- import { BrandsInformationListInstance } from './preview/trusted_comms/brandsInformation';
22
19
  import { CommandListInstance } from './preview/wireless/command';
23
- import { CpsListInstance } from './preview/trusted_comms/cps';
24
- import { CurrentCallListInstance } from './preview/trusted_comms/currentCall';
25
20
  import { FleetListInstance } from './preview/deployed_devices/fleet';
26
21
  import { HostedNumberOrderListInstance } from './preview/hosted_numbers/hostedNumberOrder';
27
22
  import { InstalledAddOnListInstance } from './preview/marketplace/installedAddOn';
@@ -41,11 +36,7 @@ declare class Preview extends Domain {
41
36
  readonly assistants: AssistantListInstance;
42
37
  readonly authorizationDocuments: AuthorizationDocumentListInstance;
43
38
  readonly availableAddOns: AvailableAddOnListInstance;
44
- readonly brandedChannels: BrandedChannelListInstance;
45
- readonly brandsInformation: BrandsInformationListInstance;
46
39
  readonly commands: CommandListInstance;
47
- readonly cps: CpsListInstance;
48
- readonly currentCalls: CurrentCallListInstance;
49
40
  readonly deployed_devices: DeployedDevices;
50
41
  readonly fleets: FleetListInstance;
51
42
  readonly hostedNumberOrders: HostedNumberOrderListInstance;
@@ -56,7 +47,6 @@ declare class Preview extends Domain {
56
47
  readonly services: ServiceListInstance;
57
48
  readonly sims: SimListInstance;
58
49
  readonly sync: Sync;
59
- readonly trusted_comms: TrustedComms;
60
50
  readonly understand: Understand;
61
51
  readonly wireless: Wireless;
62
52
  }
@@ -17,7 +17,6 @@ var HostedNumbers = require(
17
17
  './preview/HostedNumbers'); /* jshint ignore:line */
18
18
  var Marketplace = require('./preview/Marketplace'); /* jshint ignore:line */
19
19
  var Sync = require('./preview/Sync'); /* jshint ignore:line */
20
- var TrustedComms = require('./preview/TrustedComms'); /* jshint ignore:line */
21
20
  var Understand = require('./preview/Understand'); /* jshint ignore:line */
22
21
  var Wireless = require('./preview/Wireless'); /* jshint ignore:line */
23
22
 
@@ -35,7 +34,6 @@ var Wireless = require('./preview/Wireless'); /* jshint ignore:line */
35
34
  * @property {Twilio.Preview.Sync} sync - sync version
36
35
  * @property {Twilio.Preview.Understand} understand - understand version
37
36
  * @property {Twilio.Preview.Wireless} wireless - wireless version
38
- * @property {Twilio.Preview.TrustedComms} trusted_comms - trusted_comms version
39
37
  * @property {Twilio.Preview.DeployedDevices.FleetList} fleets - fleets resource
40
38
  * @property {Twilio.Preview.HostedNumbers.AuthorizationDocumentList} authorizationDocuments -
41
39
  * authorizationDocuments resource
@@ -51,13 +49,6 @@ var Wireless = require('./preview/Wireless'); /* jshint ignore:line */
51
49
  * @property {Twilio.Preview.Wireless.CommandList} commands - commands resource
52
50
  * @property {Twilio.Preview.Wireless.RatePlanList} ratePlans - ratePlans resource
53
51
  * @property {Twilio.Preview.Wireless.SimList} sims - sims resource
54
- * @property {Twilio.Preview.TrustedComms.BrandedChannelList} brandedChannels -
55
- * brandedChannels resource
56
- * @property {Twilio.Preview.TrustedComms.BrandsInformationList} brandsInformation -
57
- * brandsInformation resource
58
- * @property {Twilio.Preview.TrustedComms.CpsList} cps - cps resource
59
- * @property {Twilio.Preview.TrustedComms.CurrentCallList} currentCalls -
60
- * currentCalls resource
61
52
  *
62
53
  * @param {Twilio} twilio - The twilio client
63
54
  */
@@ -72,7 +63,6 @@ function Preview(twilio) {
72
63
  this._sync = undefined;
73
64
  this._understand = undefined;
74
65
  this._wireless = undefined;
75
- this._trusted_comms = undefined;
76
66
  }
77
67
 
78
68
  _.extend(Preview.prototype, Domain.prototype);
@@ -126,14 +116,6 @@ Object.defineProperty(Preview.prototype,
126
116
  }
127
117
  });
128
118
 
129
- Object.defineProperty(Preview.prototype,
130
- 'trusted_comms', {
131
- get: function() {
132
- this._trusted_comms = this._trusted_comms || new TrustedComms(this);
133
- return this._trusted_comms;
134
- }
135
- });
136
-
137
119
  Object.defineProperty(Preview.prototype,
138
120
  'fleets', {
139
121
  get: function() {
@@ -204,32 +186,4 @@ Object.defineProperty(Preview.prototype,
204
186
  }
205
187
  });
206
188
 
207
- Object.defineProperty(Preview.prototype,
208
- 'brandedChannels', {
209
- get: function() {
210
- return this.trusted_comms.brandedChannels;
211
- }
212
- });
213
-
214
- Object.defineProperty(Preview.prototype,
215
- 'brandsInformation', {
216
- get: function() {
217
- return this.trusted_comms.brandsInformation;
218
- }
219
- });
220
-
221
- Object.defineProperty(Preview.prototype,
222
- 'cps', {
223
- get: function() {
224
- return this.trusted_comms.cps;
225
- }
226
- });
227
-
228
- Object.defineProperty(Preview.prototype,
229
- 'currentCalls', {
230
- get: function() {
231
- return this.trusted_comms.currentCalls;
232
- }
233
- });
234
-
235
189
  module.exports = Preview;
@@ -0,0 +1,139 @@
1
+ /**
2
+ * This code was generated by
3
+ * \ / _ _ _| _ _
4
+ * | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ * / /
6
+ */
7
+
8
+ import Page = require('../../../../base/Page');
9
+ import Response = require('../../../../http/response');
10
+ import V1 = require('../../V1');
11
+ import { SerializableClass } from '../../../../interfaces';
12
+
13
+ /**
14
+ * Initialize the ApprovalFetchList
15
+ *
16
+ * PLEASE NOTE that this class contains preview products that are subject to
17
+ * change. Use them with caution. If you currently do not have developer preview
18
+ * access, please contact help@twilio.com.
19
+ *
20
+ * @param version - Version of the resource
21
+ * @param sid - The unique string that identifies the Content resource
22
+ */
23
+ declare function ApprovalFetchList(version: V1, sid: string): ApprovalFetchListInstance;
24
+
25
+ interface ApprovalFetchListInstance {
26
+ /**
27
+ * @param sid - sid of instance
28
+ */
29
+ (sid: string): ApprovalFetchContext;
30
+ /**
31
+ * Constructs a approval_fetch
32
+ */
33
+ get(): ApprovalFetchContext;
34
+ /**
35
+ * Provide a user-friendly representation
36
+ */
37
+ toJSON(): any;
38
+ }
39
+
40
+ interface ApprovalFetchPayload extends ApprovalFetchResource, Page.TwilioResponsePayload {
41
+ }
42
+
43
+ interface ApprovalFetchResource {
44
+ account_sid: string;
45
+ sid: string;
46
+ url: string;
47
+ whatsapp: object;
48
+ }
49
+
50
+ interface ApprovalFetchSolution {
51
+ sid?: string;
52
+ }
53
+
54
+
55
+ declare class ApprovalFetchContext {
56
+ /**
57
+ * Initialize the ApprovalFetchContext
58
+ *
59
+ * PLEASE NOTE that this class contains preview products that are subject to
60
+ * change. Use them with caution. If you currently do not have developer preview
61
+ * access, please contact help@twilio.com.
62
+ *
63
+ * @param version - Version of the resource
64
+ * @param sid - The unique string that identifies the Content resource
65
+ */
66
+ constructor(version: V1, sid: string);
67
+
68
+ /**
69
+ * fetch a ApprovalFetchInstance
70
+ *
71
+ * @param callback - Callback to handle processed record
72
+ */
73
+ fetch(callback?: (error: Error | null, items: ApprovalFetchInstance) => any): Promise<ApprovalFetchInstance>;
74
+ /**
75
+ * Provide a user-friendly representation
76
+ */
77
+ toJSON(): any;
78
+ }
79
+
80
+
81
+ declare class ApprovalFetchInstance extends SerializableClass {
82
+ /**
83
+ * Initialize the ApprovalFetchContext
84
+ *
85
+ * PLEASE NOTE that this class contains preview products that are subject to
86
+ * change. Use them with caution. If you currently do not have developer preview
87
+ * access, please contact help@twilio.com.
88
+ *
89
+ * @param version - Version of the resource
90
+ * @param payload - The instance payload
91
+ * @param sid - The unique string that identifies the Content resource
92
+ */
93
+ constructor(version: V1, payload: ApprovalFetchPayload, sid: string);
94
+
95
+ private _proxy: ApprovalFetchContext;
96
+ accountSid: string;
97
+ /**
98
+ * fetch a ApprovalFetchInstance
99
+ *
100
+ * @param callback - Callback to handle processed record
101
+ */
102
+ fetch(callback?: (error: Error | null, items: ApprovalFetchInstance) => any): Promise<ApprovalFetchInstance>;
103
+ sid: string;
104
+ /**
105
+ * Provide a user-friendly representation
106
+ */
107
+ toJSON(): any;
108
+ url: string;
109
+ whatsapp: any;
110
+ }
111
+
112
+
113
+ declare class ApprovalFetchPage extends Page<V1, ApprovalFetchPayload, ApprovalFetchResource, ApprovalFetchInstance> {
114
+ /**
115
+ * Initialize the ApprovalFetchPage
116
+ *
117
+ * PLEASE NOTE that this class contains preview products that are subject to
118
+ * change. Use them with caution. If you currently do not have developer preview
119
+ * access, please contact help@twilio.com.
120
+ *
121
+ * @param version - Version of the resource
122
+ * @param response - Response from the API
123
+ * @param solution - Path solution
124
+ */
125
+ constructor(version: V1, response: Response<string>, solution: ApprovalFetchSolution);
126
+
127
+ /**
128
+ * Build an instance of ApprovalFetchInstance
129
+ *
130
+ * @param payload - Payload response from the API
131
+ */
132
+ getInstance(payload: ApprovalFetchPayload): ApprovalFetchInstance;
133
+ /**
134
+ * Provide a user-friendly representation
135
+ */
136
+ toJSON(): any;
137
+ }
138
+
139
+ export { ApprovalFetchContext, ApprovalFetchInstance, ApprovalFetchList, ApprovalFetchListInstance, ApprovalFetchPage, ApprovalFetchPayload, ApprovalFetchResource, ApprovalFetchSolution }
@@ -0,0 +1,328 @@
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 values = require('../../../../base/values'); /* jshint ignore:line */
17
+
18
+ var ApprovalFetchList;
19
+ var ApprovalFetchPage;
20
+ var ApprovalFetchInstance;
21
+ var ApprovalFetchContext;
22
+
23
+ /* jshint ignore:start */
24
+ /**
25
+ * Initialize the ApprovalFetchList
26
+ *
27
+ * PLEASE NOTE that this class contains preview products that are subject to
28
+ * change. Use them with caution. If you currently do not have developer preview
29
+ * access, please contact help@twilio.com.
30
+ *
31
+ * @constructor Twilio.Content.V1.ContentContext.ApprovalFetchList
32
+ *
33
+ * @param {Twilio.Content.V1} version - Version of the resource
34
+ * @param {string} sid - The unique string that identifies the Content resource
35
+ */
36
+ /* jshint ignore:end */
37
+ ApprovalFetchList = function ApprovalFetchList(version, sid) {
38
+ /* jshint ignore:start */
39
+ /**
40
+ * @function approvalFetch
41
+ * @memberof Twilio.Content.V1.ContentContext#
42
+ *
43
+ * @param {string} sid - sid of instance
44
+ *
45
+ * @returns {Twilio.Content.V1.ContentContext.ApprovalFetchContext}
46
+ */
47
+ /* jshint ignore:end */
48
+ function ApprovalFetchListInstance(sid) {
49
+ return ApprovalFetchListInstance.get(sid);
50
+ }
51
+
52
+ ApprovalFetchListInstance._version = version;
53
+ // Path Solution
54
+ ApprovalFetchListInstance._solution = {sid: sid};
55
+ /* jshint ignore:start */
56
+ /**
57
+ * Constructs a approval_fetch
58
+ *
59
+ * @function get
60
+ * @memberof Twilio.Content.V1.ContentContext.ApprovalFetchList#
61
+ *
62
+ * @returns {Twilio.Content.V1.ContentContext.ApprovalFetchContext}
63
+ */
64
+ /* jshint ignore:end */
65
+ ApprovalFetchListInstance.get = function get() {
66
+ return new ApprovalFetchContext(this._version, this._solution.sid);
67
+ };
68
+
69
+ /* jshint ignore:start */
70
+ /**
71
+ * Provide a user-friendly representation
72
+ *
73
+ * @function toJSON
74
+ * @memberof Twilio.Content.V1.ContentContext.ApprovalFetchList#
75
+ *
76
+ * @returns Object
77
+ */
78
+ /* jshint ignore:end */
79
+ ApprovalFetchListInstance.toJSON = function toJSON() {
80
+ return this._solution;
81
+ };
82
+
83
+ ApprovalFetchListInstance[util.inspect.custom] = function inspect(depth,
84
+ options) {
85
+ return util.inspect(this.toJSON(), options);
86
+ };
87
+
88
+ return ApprovalFetchListInstance;
89
+ };
90
+
91
+
92
+ /* jshint ignore:start */
93
+ /**
94
+ * Initialize the ApprovalFetchPage
95
+ *
96
+ * PLEASE NOTE that this class contains preview products that are subject to
97
+ * change. Use them with caution. If you currently do not have developer preview
98
+ * access, please contact help@twilio.com.
99
+ *
100
+ * @constructor Twilio.Content.V1.ContentContext.ApprovalFetchPage
101
+ *
102
+ * @param {V1} version - Version of the resource
103
+ * @param {Response<string>} response - Response from the API
104
+ * @param {ApprovalFetchSolution} solution - Path solution
105
+ *
106
+ * @returns ApprovalFetchPage
107
+ */
108
+ /* jshint ignore:end */
109
+ ApprovalFetchPage = function ApprovalFetchPage(version, response, solution) {
110
+ // Path Solution
111
+ this._solution = solution;
112
+
113
+ Page.prototype.constructor.call(this, version, response, this._solution);
114
+ };
115
+
116
+ _.extend(ApprovalFetchPage.prototype, Page.prototype);
117
+ ApprovalFetchPage.prototype.constructor = ApprovalFetchPage;
118
+
119
+ /* jshint ignore:start */
120
+ /**
121
+ * Build an instance of ApprovalFetchInstance
122
+ *
123
+ * @function getInstance
124
+ * @memberof Twilio.Content.V1.ContentContext.ApprovalFetchPage#
125
+ *
126
+ * @param {ApprovalFetchPayload} payload - Payload response from the API
127
+ *
128
+ * @returns ApprovalFetchInstance
129
+ */
130
+ /* jshint ignore:end */
131
+ ApprovalFetchPage.prototype.getInstance = function getInstance(payload) {
132
+ return new ApprovalFetchInstance(this._version, payload, this._solution.sid);
133
+ };
134
+
135
+ /* jshint ignore:start */
136
+ /**
137
+ * Provide a user-friendly representation
138
+ *
139
+ * @function toJSON
140
+ * @memberof Twilio.Content.V1.ContentContext.ApprovalFetchPage#
141
+ *
142
+ * @returns Object
143
+ */
144
+ /* jshint ignore:end */
145
+ ApprovalFetchPage.prototype.toJSON = function toJSON() {
146
+ let clone = {};
147
+ _.forOwn(this, function(value, key) {
148
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
149
+ clone[key] = value;
150
+ }
151
+ });
152
+ return clone;
153
+ };
154
+
155
+ ApprovalFetchPage.prototype[util.inspect.custom] = function inspect(depth,
156
+ options) {
157
+ return util.inspect(this.toJSON(), options);
158
+ };
159
+
160
+
161
+ /* jshint ignore:start */
162
+ /**
163
+ * Initialize the ApprovalFetchContext
164
+ *
165
+ * PLEASE NOTE that this class contains preview products that are subject to
166
+ * change. Use them with caution. If you currently do not have developer preview
167
+ * access, please contact help@twilio.com.
168
+ *
169
+ * @constructor Twilio.Content.V1.ContentContext.ApprovalFetchInstance
170
+ *
171
+ * @property {string} sid - The unique string that identifies the Content resource
172
+ * @property {string} accountSid -
173
+ * The SID of the Account that created the Content resource
174
+ * @property {object} whatsapp -
175
+ * Contains the whatsapp approval information for the Content resource
176
+ * @property {string} url -
177
+ * The URL of the resource, relative to `https://content.twilio.com`
178
+ *
179
+ * @param {V1} version - Version of the resource
180
+ * @param {ApprovalFetchPayload} payload - The instance payload
181
+ * @param {sid} sid - The unique string that identifies the Content resource
182
+ */
183
+ /* jshint ignore:end */
184
+ ApprovalFetchInstance = function ApprovalFetchInstance(version, payload, sid) {
185
+ this._version = version;
186
+
187
+ // Marshaled Properties
188
+ this.sid = payload.sid; // jshint ignore:line
189
+ this.accountSid = payload.account_sid; // jshint ignore:line
190
+ this.whatsapp = payload.whatsapp; // jshint ignore:line
191
+ this.url = payload.url; // jshint ignore:line
192
+
193
+ // Context
194
+ this._context = undefined;
195
+ this._solution = {sid: sid, };
196
+ };
197
+
198
+ Object.defineProperty(ApprovalFetchInstance.prototype,
199
+ '_proxy', {
200
+ get: function() {
201
+ if (!this._context) {
202
+ this._context = new ApprovalFetchContext(this._version, this._solution.sid);
203
+ }
204
+
205
+ return this._context;
206
+ }
207
+ });
208
+
209
+ /* jshint ignore:start */
210
+ /**
211
+ * fetch a ApprovalFetchInstance
212
+ *
213
+ * @function fetch
214
+ * @memberof Twilio.Content.V1.ContentContext.ApprovalFetchInstance#
215
+ *
216
+ * @param {function} [callback] - Callback to handle processed record
217
+ *
218
+ * @returns {Promise} Resolves to processed ApprovalFetchInstance
219
+ */
220
+ /* jshint ignore:end */
221
+ ApprovalFetchInstance.prototype.fetch = function fetch(callback) {
222
+ return this._proxy.fetch(callback);
223
+ };
224
+
225
+ /* jshint ignore:start */
226
+ /**
227
+ * Provide a user-friendly representation
228
+ *
229
+ * @function toJSON
230
+ * @memberof Twilio.Content.V1.ContentContext.ApprovalFetchInstance#
231
+ *
232
+ * @returns Object
233
+ */
234
+ /* jshint ignore:end */
235
+ ApprovalFetchInstance.prototype.toJSON = function toJSON() {
236
+ let clone = {};
237
+ _.forOwn(this, function(value, key) {
238
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
239
+ clone[key] = value;
240
+ }
241
+ });
242
+ return clone;
243
+ };
244
+
245
+ ApprovalFetchInstance.prototype[util.inspect.custom] = function inspect(depth,
246
+ options) {
247
+ return util.inspect(this.toJSON(), options);
248
+ };
249
+
250
+
251
+ /* jshint ignore:start */
252
+ /**
253
+ * Initialize the ApprovalFetchContext
254
+ *
255
+ * PLEASE NOTE that this class contains preview products that are subject to
256
+ * change. Use them with caution. If you currently do not have developer preview
257
+ * access, please contact help@twilio.com.
258
+ *
259
+ * @constructor Twilio.Content.V1.ContentContext.ApprovalFetchContext
260
+ *
261
+ * @param {V1} version - Version of the resource
262
+ * @param {sid} sid - The unique string that identifies the Content resource
263
+ */
264
+ /* jshint ignore:end */
265
+ ApprovalFetchContext = function ApprovalFetchContext(version, sid) {
266
+ this._version = version;
267
+
268
+ // Path Solution
269
+ this._solution = {sid: sid, };
270
+ this._uri = `/Content/${sid}/ApprovalRequests`;
271
+ };
272
+
273
+ /* jshint ignore:start */
274
+ /**
275
+ * fetch a ApprovalFetchInstance
276
+ *
277
+ * @function fetch
278
+ * @memberof Twilio.Content.V1.ContentContext.ApprovalFetchContext#
279
+ *
280
+ * @param {function} [callback] - Callback to handle processed record
281
+ *
282
+ * @returns {Promise} Resolves to processed ApprovalFetchInstance
283
+ */
284
+ /* jshint ignore:end */
285
+ ApprovalFetchContext.prototype.fetch = function fetch(callback) {
286
+ var deferred = Q.defer();
287
+ var promise = this._version.fetch({uri: this._uri, method: 'GET'});
288
+
289
+ promise = promise.then(function(payload) {
290
+ deferred.resolve(new ApprovalFetchInstance(this._version, payload, this._solution.sid));
291
+ }.bind(this));
292
+
293
+ promise.catch(function(error) {
294
+ deferred.reject(error);
295
+ });
296
+
297
+ if (_.isFunction(callback)) {
298
+ deferred.promise.nodeify(callback);
299
+ }
300
+
301
+ return deferred.promise;
302
+ };
303
+
304
+ /* jshint ignore:start */
305
+ /**
306
+ * Provide a user-friendly representation
307
+ *
308
+ * @function toJSON
309
+ * @memberof Twilio.Content.V1.ContentContext.ApprovalFetchContext#
310
+ *
311
+ * @returns Object
312
+ */
313
+ /* jshint ignore:end */
314
+ ApprovalFetchContext.prototype.toJSON = function toJSON() {
315
+ return this._solution;
316
+ };
317
+
318
+ ApprovalFetchContext.prototype[util.inspect.custom] = function inspect(depth,
319
+ options) {
320
+ return util.inspect(this.toJSON(), options);
321
+ };
322
+
323
+ module.exports = {
324
+ ApprovalFetchList: ApprovalFetchList,
325
+ ApprovalFetchPage: ApprovalFetchPage,
326
+ ApprovalFetchInstance: ApprovalFetchInstance,
327
+ ApprovalFetchContext: ApprovalFetchContext
328
+ };