twilio 4.11.2 → 4.13.0
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.
- package/lib/base/BaseTwilio.js +15 -8
- package/lib/rest/api/v2010/account/message.d.ts +2 -2
- package/lib/rest/api/v2010/account/message.js +2 -2
- package/lib/rest/insights/v1/call/annotation.d.ts +9 -9
- package/lib/rest/insights/v1/call/callSummary.d.ts +58 -1
- package/lib/rest/insights/v1/call/event.d.ts +30 -3
- package/lib/rest/insights/v1/call/metric.d.ts +27 -6
- package/lib/rest/insights/v1/callSummaries.d.ts +135 -78
- package/lib/rest/insights/v1/callSummaries.js +8 -6
- package/lib/rest/insights/v1/setting.d.ts +16 -4
- package/lib/rest/lookups/v2/phoneNumber.d.ts +9 -1
- package/lib/rest/lookups/v2/phoneNumber.js +4 -0
- package/lib/rest/numbers/V1.d.ts +10 -0
- package/lib/rest/numbers/V1.js +15 -0
- package/lib/rest/numbers/V2.d.ts +10 -0
- package/lib/rest/numbers/V2.js +14 -0
- package/lib/rest/numbers/v1/portingBulkPortability.d.ts +120 -0
- package/lib/rest/numbers/v1/portingBulkPortability.js +136 -0
- package/lib/rest/numbers/v1/portingPortability.d.ts +134 -0
- package/lib/rest/numbers/v1/portingPortability.js +124 -0
- package/lib/rest/numbers/v2/authorizationDocument/dependentHostedNumberOrder.d.ts +265 -0
- package/lib/rest/numbers/v2/authorizationDocument/dependentHostedNumberOrder.js +164 -0
- package/lib/rest/numbers/v2/authorizationDocument.d.ts +288 -0
- package/lib/rest/numbers/v2/authorizationDocument.js +257 -0
- package/lib/rest/numbers/v2/hostedNumberOrder.d.ts +390 -0
- package/lib/rest/numbers/v2/hostedNumberOrder.js +296 -0
- package/lib/rest/taskrouter/v1/workspace/worker.d.ts +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { inspect, InspectOptions } from "util";
|
|
3
|
+
import Page, { TwilioResponsePayload } from "../../../../base/Page";
|
|
4
|
+
import Response from "../../../../http/response";
|
|
5
|
+
import V2 from "../../V2";
|
|
6
|
+
import { PhoneNumberCapabilities } from "../../../../interfaces";
|
|
7
|
+
export type DependentHostedNumberOrderStatus = "received" | "verified" | "pending-loa" | "carrier-processing" | "completed" | "failed" | "action-required";
|
|
8
|
+
/**
|
|
9
|
+
* Options to pass to each
|
|
10
|
+
*/
|
|
11
|
+
export interface DependentHostedNumberOrderListInstanceEachOptions {
|
|
12
|
+
/** Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. */
|
|
13
|
+
status?: DependentHostedNumberOrderStatus;
|
|
14
|
+
/** An E164 formatted phone number hosted by this HostedNumberOrder. */
|
|
15
|
+
phoneNumber?: string;
|
|
16
|
+
/** A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. */
|
|
17
|
+
incomingPhoneNumberSid?: string;
|
|
18
|
+
/** A human readable description of this resource, up to 64 characters. */
|
|
19
|
+
friendlyName?: string;
|
|
20
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
21
|
+
pageSize?: number;
|
|
22
|
+
/** Function to process each record. If this and a positional callback are passed, this one will be used */
|
|
23
|
+
callback?: (item: DependentHostedNumberOrderInstance, done: (err?: Error) => void) => void;
|
|
24
|
+
/** Function to be called upon completion of streaming */
|
|
25
|
+
done?: Function;
|
|
26
|
+
/** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
|
|
27
|
+
limit?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Options to pass to list
|
|
31
|
+
*/
|
|
32
|
+
export interface DependentHostedNumberOrderListInstanceOptions {
|
|
33
|
+
/** Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. */
|
|
34
|
+
status?: DependentHostedNumberOrderStatus;
|
|
35
|
+
/** An E164 formatted phone number hosted by this HostedNumberOrder. */
|
|
36
|
+
phoneNumber?: string;
|
|
37
|
+
/** A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. */
|
|
38
|
+
incomingPhoneNumberSid?: string;
|
|
39
|
+
/** A human readable description of this resource, up to 64 characters. */
|
|
40
|
+
friendlyName?: string;
|
|
41
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
42
|
+
pageSize?: number;
|
|
43
|
+
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
|
|
44
|
+
limit?: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Options to pass to page
|
|
48
|
+
*/
|
|
49
|
+
export interface DependentHostedNumberOrderListInstancePageOptions {
|
|
50
|
+
/** Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. */
|
|
51
|
+
status?: DependentHostedNumberOrderStatus;
|
|
52
|
+
/** An E164 formatted phone number hosted by this HostedNumberOrder. */
|
|
53
|
+
phoneNumber?: string;
|
|
54
|
+
/** A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. */
|
|
55
|
+
incomingPhoneNumberSid?: string;
|
|
56
|
+
/** A human readable description of this resource, up to 64 characters. */
|
|
57
|
+
friendlyName?: string;
|
|
58
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
59
|
+
pageSize?: number;
|
|
60
|
+
/** Page Number, this value is simply for client state */
|
|
61
|
+
pageNumber?: number;
|
|
62
|
+
/** PageToken provided by the API */
|
|
63
|
+
pageToken?: string;
|
|
64
|
+
}
|
|
65
|
+
export interface DependentHostedNumberOrderSolution {
|
|
66
|
+
signingDocumentSid: string;
|
|
67
|
+
}
|
|
68
|
+
export interface DependentHostedNumberOrderListInstance {
|
|
69
|
+
_version: V2;
|
|
70
|
+
_solution: DependentHostedNumberOrderSolution;
|
|
71
|
+
_uri: string;
|
|
72
|
+
/**
|
|
73
|
+
* Streams DependentHostedNumberOrderInstance records from the API.
|
|
74
|
+
*
|
|
75
|
+
* This operation lazily loads records as efficiently as possible until the limit
|
|
76
|
+
* is reached.
|
|
77
|
+
*
|
|
78
|
+
* The results are passed into the callback function, so this operation is memory
|
|
79
|
+
* efficient.
|
|
80
|
+
*
|
|
81
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
82
|
+
* function.
|
|
83
|
+
*
|
|
84
|
+
* @param { DependentHostedNumberOrderListInstanceEachOptions } [params] - Options for request
|
|
85
|
+
* @param { function } [callback] - Function to process each record
|
|
86
|
+
*/
|
|
87
|
+
each(callback?: (item: DependentHostedNumberOrderInstance, done: (err?: Error) => void) => void): void;
|
|
88
|
+
each(params: DependentHostedNumberOrderListInstanceEachOptions, callback?: (item: DependentHostedNumberOrderInstance, done: (err?: Error) => void) => void): void;
|
|
89
|
+
/**
|
|
90
|
+
* Retrieve a single target page of DependentHostedNumberOrderInstance records from the API.
|
|
91
|
+
*
|
|
92
|
+
* The request is executed immediately.
|
|
93
|
+
*
|
|
94
|
+
* @param { string } [targetUrl] - API-generated URL for the requested results page
|
|
95
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
96
|
+
*/
|
|
97
|
+
getPage(targetUrl: string, callback?: (error: Error | null, items: DependentHostedNumberOrderPage) => any): Promise<DependentHostedNumberOrderPage>;
|
|
98
|
+
/**
|
|
99
|
+
* Lists DependentHostedNumberOrderInstance records from the API as a list.
|
|
100
|
+
*
|
|
101
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
102
|
+
* function.
|
|
103
|
+
*
|
|
104
|
+
* @param { DependentHostedNumberOrderListInstanceOptions } [params] - Options for request
|
|
105
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
106
|
+
*/
|
|
107
|
+
list(callback?: (error: Error | null, items: DependentHostedNumberOrderInstance[]) => any): Promise<DependentHostedNumberOrderInstance[]>;
|
|
108
|
+
list(params: DependentHostedNumberOrderListInstanceOptions, callback?: (error: Error | null, items: DependentHostedNumberOrderInstance[]) => any): Promise<DependentHostedNumberOrderInstance[]>;
|
|
109
|
+
/**
|
|
110
|
+
* Retrieve a single page of DependentHostedNumberOrderInstance records from the API.
|
|
111
|
+
*
|
|
112
|
+
* The request is executed immediately.
|
|
113
|
+
*
|
|
114
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
115
|
+
* function.
|
|
116
|
+
*
|
|
117
|
+
* @param { DependentHostedNumberOrderListInstancePageOptions } [params] - Options for request
|
|
118
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
119
|
+
*/
|
|
120
|
+
page(callback?: (error: Error | null, items: DependentHostedNumberOrderPage) => any): Promise<DependentHostedNumberOrderPage>;
|
|
121
|
+
page(params: DependentHostedNumberOrderListInstancePageOptions, callback?: (error: Error | null, items: DependentHostedNumberOrderPage) => any): Promise<DependentHostedNumberOrderPage>;
|
|
122
|
+
/**
|
|
123
|
+
* Provide a user-friendly representation
|
|
124
|
+
*/
|
|
125
|
+
toJSON(): any;
|
|
126
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
127
|
+
}
|
|
128
|
+
export declare function DependentHostedNumberOrderListInstance(version: V2, signingDocumentSid: string): DependentHostedNumberOrderListInstance;
|
|
129
|
+
interface DependentHostedNumberOrderPayload extends TwilioResponsePayload {
|
|
130
|
+
items: DependentHostedNumberOrderResource[];
|
|
131
|
+
}
|
|
132
|
+
interface DependentHostedNumberOrderResource {
|
|
133
|
+
sid: string;
|
|
134
|
+
bulk_hosting_request_sid: string;
|
|
135
|
+
next_step: string;
|
|
136
|
+
account_sid: string;
|
|
137
|
+
incoming_phone_number_sid: string;
|
|
138
|
+
address_sid: string;
|
|
139
|
+
signing_document_sid: string;
|
|
140
|
+
phone_number: string;
|
|
141
|
+
capabilities: PhoneNumberCapabilities;
|
|
142
|
+
friendly_name: string;
|
|
143
|
+
status: DependentHostedNumberOrderStatus;
|
|
144
|
+
failure_reason: string;
|
|
145
|
+
date_created: Date;
|
|
146
|
+
date_updated: Date;
|
|
147
|
+
email: string;
|
|
148
|
+
cc_emails: Array<string>;
|
|
149
|
+
contact_title: string;
|
|
150
|
+
contact_phone_number: string;
|
|
151
|
+
}
|
|
152
|
+
export declare class DependentHostedNumberOrderInstance {
|
|
153
|
+
protected _version: V2;
|
|
154
|
+
constructor(_version: V2, payload: DependentHostedNumberOrderResource, signingDocumentSid: string);
|
|
155
|
+
/**
|
|
156
|
+
* A 34 character string that uniquely identifies this Authorization Document
|
|
157
|
+
*/
|
|
158
|
+
sid: string;
|
|
159
|
+
/**
|
|
160
|
+
* A 34 character string that uniquely identifies the bulk hosting request associated with this HostedNumberOrder.
|
|
161
|
+
*/
|
|
162
|
+
bulkHostingRequestSid: string;
|
|
163
|
+
/**
|
|
164
|
+
* The next step you need to take to complete the hosted number order and request it successfully.
|
|
165
|
+
*/
|
|
166
|
+
nextStep: string;
|
|
167
|
+
/**
|
|
168
|
+
* The unique SID identifier of the Account.
|
|
169
|
+
*/
|
|
170
|
+
accountSid: string;
|
|
171
|
+
/**
|
|
172
|
+
* A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder.
|
|
173
|
+
*/
|
|
174
|
+
incomingPhoneNumberSid: string;
|
|
175
|
+
/**
|
|
176
|
+
* A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number.
|
|
177
|
+
*/
|
|
178
|
+
addressSid: string;
|
|
179
|
+
/**
|
|
180
|
+
* A 34 character string that uniquely identifies the LOA document associated with this HostedNumberOrder.
|
|
181
|
+
*/
|
|
182
|
+
signingDocumentSid: string;
|
|
183
|
+
/**
|
|
184
|
+
* An E164 formatted phone number hosted by this HostedNumberOrder.
|
|
185
|
+
*/
|
|
186
|
+
phoneNumber: string;
|
|
187
|
+
capabilities: PhoneNumberCapabilities;
|
|
188
|
+
/**
|
|
189
|
+
* A human readable description of this resource, up to 64 characters.
|
|
190
|
+
*/
|
|
191
|
+
friendlyName: string;
|
|
192
|
+
status: DependentHostedNumberOrderStatus;
|
|
193
|
+
/**
|
|
194
|
+
* A message that explains why a hosted_number_order went to status \"action-required\"
|
|
195
|
+
*/
|
|
196
|
+
failureReason: string;
|
|
197
|
+
/**
|
|
198
|
+
* The date this resource was created, given as [GMT RFC 2822](http://www.ietf.org/rfc/rfc2822.txt) format.
|
|
199
|
+
*/
|
|
200
|
+
dateCreated: Date;
|
|
201
|
+
/**
|
|
202
|
+
* The date that this resource was updated, given as [GMT RFC 2822](http://www.ietf.org/rfc/rfc2822.txt) format.
|
|
203
|
+
*/
|
|
204
|
+
dateUpdated: Date;
|
|
205
|
+
/**
|
|
206
|
+
* Email of the owner of this phone number that is being hosted.
|
|
207
|
+
*/
|
|
208
|
+
email: string;
|
|
209
|
+
/**
|
|
210
|
+
* Email recipients who will be informed when an Authorization Document has been sent and signed
|
|
211
|
+
*/
|
|
212
|
+
ccEmails: Array<string>;
|
|
213
|
+
/**
|
|
214
|
+
* The title of the person authorized to sign the Authorization Document for this phone number.
|
|
215
|
+
*/
|
|
216
|
+
contactTitle: string;
|
|
217
|
+
/**
|
|
218
|
+
* The contact phone number of the person authorized to sign the Authorization Document.
|
|
219
|
+
*/
|
|
220
|
+
contactPhoneNumber: string;
|
|
221
|
+
/**
|
|
222
|
+
* Provide a user-friendly representation
|
|
223
|
+
*
|
|
224
|
+
* @returns Object
|
|
225
|
+
*/
|
|
226
|
+
toJSON(): {
|
|
227
|
+
sid: string;
|
|
228
|
+
bulkHostingRequestSid: string;
|
|
229
|
+
nextStep: string;
|
|
230
|
+
accountSid: string;
|
|
231
|
+
incomingPhoneNumberSid: string;
|
|
232
|
+
addressSid: string;
|
|
233
|
+
signingDocumentSid: string;
|
|
234
|
+
phoneNumber: string;
|
|
235
|
+
capabilities: PhoneNumberCapabilities;
|
|
236
|
+
friendlyName: string;
|
|
237
|
+
status: DependentHostedNumberOrderStatus;
|
|
238
|
+
failureReason: string;
|
|
239
|
+
dateCreated: Date;
|
|
240
|
+
dateUpdated: Date;
|
|
241
|
+
email: string;
|
|
242
|
+
ccEmails: string[];
|
|
243
|
+
contactTitle: string;
|
|
244
|
+
contactPhoneNumber: string;
|
|
245
|
+
};
|
|
246
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
247
|
+
}
|
|
248
|
+
export declare class DependentHostedNumberOrderPage extends Page<V2, DependentHostedNumberOrderPayload, DependentHostedNumberOrderResource, DependentHostedNumberOrderInstance> {
|
|
249
|
+
/**
|
|
250
|
+
* Initialize the DependentHostedNumberOrderPage
|
|
251
|
+
*
|
|
252
|
+
* @param version - Version of the resource
|
|
253
|
+
* @param response - Response from the API
|
|
254
|
+
* @param solution - Path solution
|
|
255
|
+
*/
|
|
256
|
+
constructor(version: V2, response: Response<string>, solution: DependentHostedNumberOrderSolution);
|
|
257
|
+
/**
|
|
258
|
+
* Build an instance of DependentHostedNumberOrderInstance
|
|
259
|
+
*
|
|
260
|
+
* @param payload - Payload response from the API
|
|
261
|
+
*/
|
|
262
|
+
getInstance(payload: DependentHostedNumberOrderResource): DependentHostedNumberOrderInstance;
|
|
263
|
+
[inspect.custom](depth: any, options: InspectOptions): string;
|
|
264
|
+
}
|
|
265
|
+
export {};
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* Twilio - Numbers
|
|
9
|
+
* This is the public Twilio REST API.
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator.
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.DependentHostedNumberOrderPage = exports.DependentHostedNumberOrderInstance = exports.DependentHostedNumberOrderListInstance = void 0;
|
|
20
|
+
const util_1 = require("util");
|
|
21
|
+
const Page_1 = __importDefault(require("../../../../base/Page"));
|
|
22
|
+
const deserialize = require("../../../../base/deserialize");
|
|
23
|
+
const serialize = require("../../../../base/serialize");
|
|
24
|
+
const utility_1 = require("../../../../base/utility");
|
|
25
|
+
function DependentHostedNumberOrderListInstance(version, signingDocumentSid) {
|
|
26
|
+
if (!(0, utility_1.isValidPathParam)(signingDocumentSid)) {
|
|
27
|
+
throw new Error("Parameter 'signingDocumentSid' is not valid.");
|
|
28
|
+
}
|
|
29
|
+
const instance = {};
|
|
30
|
+
instance._version = version;
|
|
31
|
+
instance._solution = { signingDocumentSid };
|
|
32
|
+
instance._uri = `/HostedNumber/AuthorizationDocuments/${signingDocumentSid}/DependentHostedNumberOrders`;
|
|
33
|
+
instance.page = function page(params, callback) {
|
|
34
|
+
if (params instanceof Function) {
|
|
35
|
+
callback = params;
|
|
36
|
+
params = {};
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
params = params || {};
|
|
40
|
+
}
|
|
41
|
+
let data = {};
|
|
42
|
+
if (params["status"] !== undefined)
|
|
43
|
+
data["Status"] = params["status"];
|
|
44
|
+
if (params["phoneNumber"] !== undefined)
|
|
45
|
+
data["PhoneNumber"] = params["phoneNumber"];
|
|
46
|
+
if (params["incomingPhoneNumberSid"] !== undefined)
|
|
47
|
+
data["IncomingPhoneNumberSid"] = params["incomingPhoneNumberSid"];
|
|
48
|
+
if (params["friendlyName"] !== undefined)
|
|
49
|
+
data["FriendlyName"] = params["friendlyName"];
|
|
50
|
+
if (params["pageSize"] !== undefined)
|
|
51
|
+
data["PageSize"] = params["pageSize"];
|
|
52
|
+
if (params.pageNumber !== undefined)
|
|
53
|
+
data["Page"] = params.pageNumber;
|
|
54
|
+
if (params.pageToken !== undefined)
|
|
55
|
+
data["PageToken"] = params.pageToken;
|
|
56
|
+
const headers = {};
|
|
57
|
+
let operationVersion = version, operationPromise = operationVersion.page({
|
|
58
|
+
uri: instance._uri,
|
|
59
|
+
method: "get",
|
|
60
|
+
params: data,
|
|
61
|
+
headers,
|
|
62
|
+
});
|
|
63
|
+
operationPromise = operationPromise.then((payload) => new DependentHostedNumberOrderPage(operationVersion, payload, instance._solution));
|
|
64
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
65
|
+
return operationPromise;
|
|
66
|
+
};
|
|
67
|
+
instance.each = instance._version.each;
|
|
68
|
+
instance.list = instance._version.list;
|
|
69
|
+
instance.getPage = function getPage(targetUrl, callback) {
|
|
70
|
+
const operationPromise = instance._version._domain.twilio.request({
|
|
71
|
+
method: "get",
|
|
72
|
+
uri: targetUrl,
|
|
73
|
+
});
|
|
74
|
+
let pagePromise = operationPromise.then((payload) => new DependentHostedNumberOrderPage(instance._version, payload, instance._solution));
|
|
75
|
+
pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
|
|
76
|
+
return pagePromise;
|
|
77
|
+
};
|
|
78
|
+
instance.toJSON = function toJSON() {
|
|
79
|
+
return instance._solution;
|
|
80
|
+
};
|
|
81
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
82
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
83
|
+
};
|
|
84
|
+
return instance;
|
|
85
|
+
}
|
|
86
|
+
exports.DependentHostedNumberOrderListInstance = DependentHostedNumberOrderListInstance;
|
|
87
|
+
class DependentHostedNumberOrderInstance {
|
|
88
|
+
constructor(_version, payload, signingDocumentSid) {
|
|
89
|
+
this._version = _version;
|
|
90
|
+
this.sid = payload.sid;
|
|
91
|
+
this.bulkHostingRequestSid = payload.bulk_hosting_request_sid;
|
|
92
|
+
this.nextStep = payload.next_step;
|
|
93
|
+
this.accountSid = payload.account_sid;
|
|
94
|
+
this.incomingPhoneNumberSid = payload.incoming_phone_number_sid;
|
|
95
|
+
this.addressSid = payload.address_sid;
|
|
96
|
+
this.signingDocumentSid = payload.signing_document_sid;
|
|
97
|
+
this.phoneNumber = payload.phone_number;
|
|
98
|
+
this.capabilities = payload.capabilities;
|
|
99
|
+
this.friendlyName = payload.friendly_name;
|
|
100
|
+
this.status = payload.status;
|
|
101
|
+
this.failureReason = payload.failure_reason;
|
|
102
|
+
this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
|
|
103
|
+
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
|
|
104
|
+
this.email = payload.email;
|
|
105
|
+
this.ccEmails = payload.cc_emails;
|
|
106
|
+
this.contactTitle = payload.contact_title;
|
|
107
|
+
this.contactPhoneNumber = payload.contact_phone_number;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Provide a user-friendly representation
|
|
111
|
+
*
|
|
112
|
+
* @returns Object
|
|
113
|
+
*/
|
|
114
|
+
toJSON() {
|
|
115
|
+
return {
|
|
116
|
+
sid: this.sid,
|
|
117
|
+
bulkHostingRequestSid: this.bulkHostingRequestSid,
|
|
118
|
+
nextStep: this.nextStep,
|
|
119
|
+
accountSid: this.accountSid,
|
|
120
|
+
incomingPhoneNumberSid: this.incomingPhoneNumberSid,
|
|
121
|
+
addressSid: this.addressSid,
|
|
122
|
+
signingDocumentSid: this.signingDocumentSid,
|
|
123
|
+
phoneNumber: this.phoneNumber,
|
|
124
|
+
capabilities: this.capabilities,
|
|
125
|
+
friendlyName: this.friendlyName,
|
|
126
|
+
status: this.status,
|
|
127
|
+
failureReason: this.failureReason,
|
|
128
|
+
dateCreated: this.dateCreated,
|
|
129
|
+
dateUpdated: this.dateUpdated,
|
|
130
|
+
email: this.email,
|
|
131
|
+
ccEmails: this.ccEmails,
|
|
132
|
+
contactTitle: this.contactTitle,
|
|
133
|
+
contactPhoneNumber: this.contactPhoneNumber,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
[util_1.inspect.custom](_depth, options) {
|
|
137
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
exports.DependentHostedNumberOrderInstance = DependentHostedNumberOrderInstance;
|
|
141
|
+
class DependentHostedNumberOrderPage extends Page_1.default {
|
|
142
|
+
/**
|
|
143
|
+
* Initialize the DependentHostedNumberOrderPage
|
|
144
|
+
*
|
|
145
|
+
* @param version - Version of the resource
|
|
146
|
+
* @param response - Response from the API
|
|
147
|
+
* @param solution - Path solution
|
|
148
|
+
*/
|
|
149
|
+
constructor(version, response, solution) {
|
|
150
|
+
super(version, response, solution);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Build an instance of DependentHostedNumberOrderInstance
|
|
154
|
+
*
|
|
155
|
+
* @param payload - Payload response from the API
|
|
156
|
+
*/
|
|
157
|
+
getInstance(payload) {
|
|
158
|
+
return new DependentHostedNumberOrderInstance(this._version, payload, this._solution.signingDocumentSid);
|
|
159
|
+
}
|
|
160
|
+
[util_1.inspect.custom](depth, options) {
|
|
161
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
exports.DependentHostedNumberOrderPage = DependentHostedNumberOrderPage;
|