blob: 84ca7ba5b4952e5a2f103161966bc5ac6f1bbeff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
|
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\Rest\Api;
use Twilio\Domain;
use Twilio\Exceptions\TwilioException;
use Twilio\Rest\Api\V2010\AccountContext;
use Twilio\Rest\Api\V2010\AccountInstance;
use Twilio\Rest\Api\V2010\AccountList;
use Twilio\Version;
/**
* @property \Twilio\Rest\Api\V2010\AccountList accounts
* @method \Twilio\Rest\Api\V2010\AccountContext accounts(string $sid)
* @property \Twilio\Rest\Api\V2010\AccountContext account
* @property \Twilio\Rest\Api\V2010\Account\AddressList addresses
* @property \Twilio\Rest\Api\V2010\Account\ApplicationList applications
* @property \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList authorizedConnectApps
* @property \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList availablePhoneNumbers
* @property \Twilio\Rest\Api\V2010\Account\CallList calls
* @property \Twilio\Rest\Api\V2010\Account\ConferenceList conferences
* @property \Twilio\Rest\Api\V2010\Account\ConnectAppList connectApps
* @property \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList incomingPhoneNumbers
* @property \Twilio\Rest\Api\V2010\Account\KeyList keys
* @property \Twilio\Rest\Api\V2010\Account\MessageList messages
* @property \Twilio\Rest\Api\V2010\Account\NewKeyList newKeys
* @property \Twilio\Rest\Api\V2010\Account\NewSigningKeyList newSigningKeys
* @property \Twilio\Rest\Api\V2010\Account\NotificationList notifications
* @property \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList outgoingCallerIds
* @property \Twilio\Rest\Api\V2010\Account\QueueList queues
* @property \Twilio\Rest\Api\V2010\Account\RecordingList recordings
* @property \Twilio\Rest\Api\V2010\Account\SandboxList sandbox
* @property \Twilio\Rest\Api\V2010\Account\SigningKeyList signingKeys
* @property \Twilio\Rest\Api\V2010\Account\SipList sip
* @property \Twilio\Rest\Api\V2010\Account\ShortCodeList shortCodes
* @property \Twilio\Rest\Api\V2010\Account\TokenList tokens
* @property \Twilio\Rest\Api\V2010\Account\TranscriptionList transcriptions
* @property \Twilio\Rest\Api\V2010\Account\UsageList usage
* @property \Twilio\Rest\Api\V2010\Account\ValidationRequestList validationRequests
* @method \Twilio\Rest\Api\V2010\Account\AddressContext addresses(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\ApplicationContext applications(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppContext authorizedConnectApps(string $connectAppSid)
* @method \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryContext availablePhoneNumbers(string $countryCode)
* @method \Twilio\Rest\Api\V2010\Account\CallContext calls(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\ConferenceContext conferences(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\ConnectAppContext connectApps(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberContext incomingPhoneNumbers(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\KeyContext keys(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\MessageContext messages(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\NotificationContext notifications(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdContext outgoingCallerIds(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\QueueContext queues(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\RecordingContext recordings(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\SandboxContext sandbox()
* @method \Twilio\Rest\Api\V2010\Account\SigningKeyContext signingKeys(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\ShortCodeContext shortCodes(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\TranscriptionContext transcriptions(string $sid)
*/
class V2010 extends Version {
protected $_accounts = null;
protected $_account = null;
protected $_addresses = null;
protected $_applications = null;
protected $_authorizedConnectApps = null;
protected $_availablePhoneNumbers = null;
protected $_calls = null;
protected $_conferences = null;
protected $_connectApps = null;
protected $_incomingPhoneNumbers = null;
protected $_keys = null;
protected $_messages = null;
protected $_newKeys = null;
protected $_newSigningKeys = null;
protected $_notifications = null;
protected $_outgoingCallerIds = null;
protected $_queues = null;
protected $_recordings = null;
protected $_sandbox = null;
protected $_signingKeys = null;
protected $_sip = null;
protected $_shortCodes = null;
protected $_tokens = null;
protected $_transcriptions = null;
protected $_usage = null;
protected $_validationRequests = null;
/**
* Construct the V2010 version of Api
*
* @param \Twilio\Domain $domain Domain that contains the version
* @return \Twilio\Rest\Api\V2010 V2010 version of Api
*/
public function __construct(Domain $domain) {
parent::__construct($domain);
$this->version = '2010-04-01';
}
/**
* @return \Twilio\Rest\Api\V2010\AccountList
*/
protected function getAccounts() {
if (!$this->_accounts) {
$this->_accounts = new AccountList($this);
}
return $this->_accounts;
}
/**
* @return \Twilio\Rest\Api\V2010\AccountContext Account provided as the
* authenticating account
*/
protected function getAccount() {
if (!$this->_account) {
$this->_account = new AccountContext(
$this,
$this->domain->getClient()->getAccountSid()
);
}
return $this->_account;
}
/**
* Setter to override the primary account
*
* @param AccountContext|AccountInstance $account account to use as the primary
* account
*/
public function setAccount($account) {
$this->_account = $account;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\AddressList
*/
protected function getAddresses() {
return $this->account->addresses;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\ApplicationList
*/
protected function getApplications() {
return $this->account->applications;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList
*/
protected function getAuthorizedConnectApps() {
return $this->account->authorizedConnectApps;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList
*/
protected function getAvailablePhoneNumbers() {
return $this->account->availablePhoneNumbers;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\CallList
*/
protected function getCalls() {
return $this->account->calls;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\ConferenceList
*/
protected function getConferences() {
return $this->account->conferences;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\ConnectAppList
*/
protected function getConnectApps() {
return $this->account->connectApps;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList
*/
protected function getIncomingPhoneNumbers() {
return $this->account->incomingPhoneNumbers;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\KeyList
*/
protected function getKeys() {
return $this->account->keys;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\MessageList
*/
protected function getMessages() {
return $this->account->messages;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\NewKeyList
*/
protected function getNewKeys() {
return $this->account->newKeys;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\NewSigningKeyList
*/
protected function getNewSigningKeys() {
return $this->account->newSigningKeys;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\NotificationList
*/
protected function getNotifications() {
return $this->account->notifications;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList
*/
protected function getOutgoingCallerIds() {
return $this->account->outgoingCallerIds;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\QueueList
*/
protected function getQueues() {
return $this->account->queues;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\RecordingList
*/
protected function getRecordings() {
return $this->account->recordings;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\SandboxList
*/
protected function getSandbox() {
return $this->account->sandbox;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\SigningKeyList
*/
protected function getSigningKeys() {
return $this->account->signingKeys;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\SipList
*/
protected function getSip() {
return $this->account->sip;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\ShortCodeList
*/
protected function getShortCodes() {
return $this->account->shortCodes;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\TokenList
*/
protected function getTokens() {
return $this->account->tokens;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\TranscriptionList
*/
protected function getTranscriptions() {
return $this->account->transcriptions;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\UsageList
*/
protected function getUsage() {
return $this->account->usage;
}
/**
* @return \Twilio\Rest\Api\V2010\Account\ValidationRequestList
*/
protected function getValidationRequests() {
return $this->account->validationRequests;
}
/**
* Magic getter to lazy load root resources
*
* @param string $name Resource to return
* @return \Twilio\ListResource The requested resource
* @throws \Twilio\Exceptions\TwilioException For unknown resource
*/
public function __get($name) {
$method = 'get' . ucfirst($name);
if (method_exists($this, $method)) {
return $this->$method();
}
throw new TwilioException('Unknown resource ' . $name);
}
/**
* Magic caller to get resource contexts
*
* @param string $name Resource to return
* @param array $arguments Context parameters
* @return \Twilio\InstanceContext The requested resource context
* @throws \Twilio\Exceptions\TwilioException For unknown resource
*/
public function __call($name, $arguments) {
$property = $this->$name;
if (method_exists($property, 'getContext')) {
return call_user_func_array(array($property, 'getContext'), $arguments);
}
throw new TwilioException('Resource does not have a context');
}
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
public function __toString() {
return '[Twilio.Api.V2010]';
}
}
|