8000 Merge pull request #320 from twilio/update-client-helpers-and-regenerate · twilio/twilio-python@18a80b2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 18a80b2

Browse files
authored
Merge pull request #320 from twilio/update-client-helpers-and-regenerate
Update client resource helpers
2 parents 16537d2 + f6f05ab commit 18a80b2

File tree

7 files changed

+39
-28
lines changed

7 files changed

+39
-28
lines changed

tests/integration/taskrouter/v1/workspace/task_queue/test_task_queue_statistics.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def test_fetch_response(self):
8787
"tasks_by_status": {
8888
"assigned": 0,
8989
"pending": 0,
90-
"reserved": 0
90+
"reserved": 0,
91+
"wrapping": 0
9192
},
9293
"total_available_workers": 0,
9394
"total_eligible_workers": 0,

tests/integration/taskrouter/v1/workspace/task_queue/test_task_queues_statistics.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ def test_read_full_response(self):
9797
"tasks_by_status": {
9898
"assigned": 0,
9999
"pending": 0,
100-
"reserved": 0
100+
"reserved": 0,
101+
"wrapping": 0
101102
},
102103
"total_available_workers": 0,
103104
"total_eligible_workers": 0,

tests/integration/taskrouter/v1/workspace/test_workspace_statistics.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def test_fetch_response(self):
8787
"tasks_by_status": {
8888
"assigned": 0,
8989
"pending": 0,
90-
"reserved": 0
90+
"reserved": 0,
91+
"wrapping": 0
9192
},
9293
"total_tasks": 0,
9394
"total_workers": 1

tests/integration/taskrouter/v1/workspace/workflow/test_workflow_statistics.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ def test_fetch_response(self):
5252
"tasks_by_status": {
5353
"assigned": 1,
5454
"pending": 0,
55-
"reserved": 0
55+
"reserved": 0,
56+
"wrapping": 0
5657
},
5758
"total_tasks": 1
5859
},

twilio/rest/__init__.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -288,161 +288,161 @@ def addresses(self):
288288
"""
289289
:rtype: twilio.rest.api.v2010.account.address.AddressList
290290
"""
291-
return self.account.addresses
291+
return self.api.account.addresses
292292

293293
@property
294294
def applications(self):
295295
"""
296296
:rtype: twilio.rest.api.v2010.account.application.ApplicationList
297297
"""
298-
return self.account.applications
298+
return self.api.account.applications
299299

300300
@property
301301
def authorized_connect_apps(self):
302302
"""
303303
:rtype: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppList
304304
"""
305-
return self.account.authorized_connect_apps
305+
return self.api.account.authorized_connect_apps
306306

307307
@property
308308
def available_phone_numbers(self):
309309
"""
310310
:rtype: twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryList
311311
"""
312-
return self.account.available_phone_numbers
312+
return self.api.account.available_phone_numbers
313313

314314
@property
315315
def calls(self):
316316
"""
317317
:rtype: twilio.rest.api.v2010.account.call.CallList
318318
"""
319-
return self.account.calls
319+
return self.api.account.calls
320320

321321
@property
322322
def conferences(self):
323323
"""
324324
:rtype: twilio.rest.api.v2010.account.conference.ConferenceList
325325
"""
326-
return self.account.conferences
326+
return self.api.account.conferences
327327

328328
@property
329329
def connect_apps(self):
330330
"""
331331
:rtype: twilio.rest.api.v2010.account.connect_app.ConnectAppList
332332
"""
333-
return self.account.connect_apps
333+
return self.api.account.connect_apps
334334

335335
@property
336336
def incoming_phone_numbers(self):
337337
"""
338338
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberList
339339
"""
340-
return self.account.incoming_phone_numbers
340+
return self.api.account.incoming_phone_numbers
341341

342342
@property
343343
def keys(self):
344344
"""
345345
:rtype: twilio.rest.api.v2010.account.key.KeyList
346346
"""
347-
return self.account.keys
347+
return self.api.account.keys
348348

349349
@property
350350
def messages(self):
351351
"""
352352
:rtype: twilio.rest.api.v2010.account.message.MessageList
353353
"""
354-
return self.account.messages
354+
return self.api.account.messages
355355

356356
@property
357357
def new_keys(self):
358358
"""
359359
:rtype: twilio.rest.api.v2010.account.new_key.NewKeyList
360360
"""
361-
return self.account.new_keys
361+
return self.api.account.new_keys
362362

363363
@property
364364
def new_signing_keys(self):
365365
"""
366366
:rtype: twilio.rest.api.v2010.account.new_signing_key.NewSigningKeyList
367367
"""
368-
return self.account.new_signing_keys
368+
return self.api.account.new_signing_keys
369369

370370
@property
371371
def notifications(self):
372372
"""
373373
:rtype: twilio.rest.api.v2010.account.notification.NotificationList
374374
"""
375-
return self.account.notifications
375+
return self.api.account.notifications
376376

377377
@property
378378
def outgoing_caller_ids(self):
379379
"""
380380
:rtype: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdList
381381
"""
382-
return self.account.outgoing_caller_ids
382+
return self.api.account.outgoing_caller_ids
383383

384384
@property
385385
def queues(self):
386386
"""
387387
:rtype: twilio.rest.api.v2010.account.queue.QueueList
388388
"""
389-
return self.account.queues
389+
return self.api.account.queues
390390

391391
@property
392392
def recordings(self):
393393
"""
394394
:rtype: twilio.rest.api.v2010.account.recording.RecordingList
395395
"""
396-
return self.account.recordings
396+
return self.api.account.recordings
397397

398398
@property
399399
def signing_keys(self):
400400
"""
401401
:rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyList
402402
"""
403-
return self.account.signing_keys
403+
return self.api.account.signing_keys
404404

405405
@property
406406
def sip(self):
407407
"""
408408
:rtype: twilio.rest.api.v2010.account.sip.SipList
409409
"""
410-
return self.account.sip
410+
return self.api.account.sip
411411

412412
@property
413413
def short_codes(self):
414414
"""
415415
:rtype: twilio.rest.api.v2010.account.short_code.ShortCodeList
416416
"""
417-
return self.account.short_codes
417+
return self.api.account.short_codes
418418

419419
@property
420420
def tokens(self):
421421
"""
422422
:rtype: twilio.rest.api.v2010.account.token.TokenList
423423
"""
424-
return self.account.tokens
424+
return self.api.account.tokens
425425

426426
@property
427427
def transcriptions(self):
428428
"""
429429
:rtype: twilio.rest.api.v2010.account.transcription.TranscriptionList
430430
"""
431-
return self.account.transcriptions
431+
return self.api.account.transcriptions
432432

433433
@property
434434
def usage(self):
435435
"""
436436
:rtype: twilio.rest.api.v2010.account.usage.UsageList
437437
"""
438-
return self.account.usage
438+
return self.api.account.usage
439439

440440
@property
441441
def validation_requests(self):
442442
"""
443443
:rtype: twilio.rest.api.v2010.account.validation_request.ValidationRequestList
444444
"""
445-
return self.account.validation_requests
445+
return self.api.account.validation_requests
446446

447447
def __repr__(self):
448448
"""

twilio/rest/api/v2010/account/call/__init__.py

Lines changed: 7 additions & 1 deletion
1241
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ def create(self, to, from_, method=values.unset, fallback_url=values.unset,
5151
recording_status_callback=values.unset,
5252
recording_status_callback_method=values.unset,
5353
sip_auth_username=values.unset, sip_auth_password=values.unset,
54-
url=values.unset, application_sid=values.unset):
54+
machine_detection=values.unset,
55+
machine_detection_timeout=values.unset, url=values.unset,
56+
application_sid=values.unset):
5557
"""
5658
Create a new CallInstance
5759
@@ -72,6 +74,8 @@ def create(self, to, from_, method=values.unset, fallback_url=values.unset,
7274
:param unicode recording_status_callback_method: The recording_status_callback_method
7375
:param unicode sip_auth_username: The sip_auth_username
7476
:param unicode sip_auth_password: The sip_auth_password
77+
:param unicode machine_detection: Enable machine detection or end of greeting detection
78+
:param unicode machine_detection_timeout: Number of miliseconds to wait for machine detection
7579
:param unicode url: Url from which to fetch TwiML
7680
:param unicode application_sid: ApplicationSid that configures from where to fetch TwiML
7781
@@ -98,6 +102,8 @@ def create(self, to, from_, method=values.unset, fallback_url=values.unset,
98102
'RecordingStatusCallbackMethod': recording_status_callback_method,
99103
'SipAuthUsername': sip_auth_username,
100104
'SipAuthPassword': sip_auth_password,
105+
'MachineDetection': machine_detection,
106+
'MachineDetectionTimeout': machine_detection_timeout,
101107
})
102108

103109
payload = self._version.create(

twilio/rest/taskrouter/v1/workspace/task/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ class Status(object):
419419
ASSIGNED = "assigned"
420420
CANCELED = "canceled"
421421
COMPLETED = "completed"
422+
WRAPPING = "wrapping"
422423

423424
def __init__(self, version, payload, workspace_sid, sid=None):
424425
"""

0 commit comments

Comments
 (0)
0