8000 [Librarian] Regenerated @ 80dd00474e40ce3e7657a532f4ff0d75bd9b7287 · aditya274/twilio-python@062bc0e · GitHub
[go: up one dir, main page]

Skip to content

Commit 062bc0e

Browse files
committed
[Librarian] Regenerated @ 80dd00474e40ce3e7657a532f4ff0d75bd9b7287
1 parent e2d06b1 commit 062bc0e

File tree

38 files changed

+1627
-465
lines changed

38 files changed

+1627
-465
lines changed

CHANGES.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,42 @@ twilio-python Changelog
33

44
Here you can see the full list of changes between each twilio-python release.
55

6+
[2019-10-30] Version 6.33.0
7+
---------------------------
8+
**Library**
9+
- [PR #414](https://github.com/twilio/twilio-python/pull/414): Add support for passing custom logger into TwilioHttpClient. Thanks to [@tysonholub](https://github.com/tysonholub)!
10+
- [PR #423](https://github.com/twilio/twilio-python/pull/423): Document exception case in README. Thanks to [@prateem](https://github.com/prateem)!
11+
- [PR #489](https://github.com/twilio/twilio-python/pull/489): Include the license file when packaging the library. Thanks to [@marcelotrevisani](https://github.com/marcelotrevisani)!
12+
- [PR #485](https://github.com/twilio/twilio-python/pull/485): Adding timeout to TwilioHttpClient constructor. Thanks to [@Kerl1310](https://github.com/Kerl1310)!
13+
- [PR #488](https://github.com/twilio/twilio-python/pull/488): Update resources after sorting. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
14+
- [PR #486](https://github.com/twilio/twilio-python/pull/486): Declare support for Python 3.8. Thanks to [@Jamim](https://github.com/Jamim)!
15+
16+
**Api**
17+
- Add new usage categories to the public api `sms-messages-carrierfees` and `mms-messages-carrierfees`
18+
19+
**Conversations**
20+
- Add ProjectedAddress to Conversations Participant resource
21+
22+
**Preview**
23+
- Implemented different `Sid` for Current Calls (Verified by Twilio), instead of relying in `Call.Sid` from Voice API team **(breaking change)**
24+
25+
**Supersim**
26+
- Add List endpoint to Commands resource for Super Sim Pilot
27+
- Add UsageRecords resource for the Super Sim Pilot
28+
- Add List endpoint to UsageRecords resource for the Super Sim Pilot
29+
- Allow assigning a Sim to a Fleet by Fleet SID or Unique Name for Super SIM Pilot
30+
- Add Update endpoint to Fleets resource for Super Sim Pilot
31+
- Add Fetch endpoint to Commands resource for Super Sim Pilot
32+
- Allow filtering the Sims resource List endpoint by Fleet
33+
- Add List endpoint to Fleets resource for Super Sim Pilot
34+
35+
**Wireless**
36+
- Added `account_sid` to Sim update parameters.
37+
38+
**Twiml**
39+
- Add new locales and voices for `Say` from Polly
40+
41+
642
[2019-10-16] Version 6.32.0
743
---------------------------
844
**Library**

tests/integration/api/v2010/account/test_message.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ def test_create_response(self):
4747
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4848
"num_media": "0",
4949
"num_segments": "1",
50-
"price": "-0.00750",
51-
"price_unit": "USD",
50+
"price": null,
51+
"price_unit": null,
5252
"sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5353
"status": "sent",
5454
"subresource_uris": {
@@ -83,8 +83,8 @@ def test_create_wo_service_response(self):
8383
"messaging_service_sid": null,
8484
"num_media": "0",
8585
"num_segments": "1",
86-
"price": "-0.00750",
87-
"price_unit": "USD",
86+
"price": null,
87+
"price_unit": null,
8888
"sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8989
"status": "sent",
9090
"subresource_uris": {

tests/integration/api/v2010/account/test_notification.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -57,29 +57,6 @@ def test_fetch_response(self):
5757

5858
self.assertIsNotNone(actual)
5959

60-
def test_delete_request(self):
61-
self.holodeck.mock(Response(500, ''))
62-
63-
with self.assertRaises(TwilioException):
64-
self.client.api.v2010.accounts(sid="ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
65-
.notifications(sid="NOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
66-
67-
self.holodeck.assert_has_request(Request(
68-
'delete',
69-
'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications/NOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json',
70-
))
71-
72-
def test_delete_response(self):
73-
self.holodeck.mock(Response(
74-
204,
75-
None,
76-
))
77-
78-
actual = self.client.api.v2010.accounts(sid="ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
79-
.notifications(sid="NOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
80-
81-
self.assertTrue(actual)
82-
8360
def test_list_request(self):
8461
self.holodeck.mock(Response(500, ''))
8562

tests/integration/conversations/v1/conversation/test_participant.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,32 @@ def test_create_chat_response(self):
7676

7777
self.assertIsNotNone(actual)
7878

79+
def test_create_gmms_response(self):
80+
self.holodeck.mock(Response(
81+
201,
82+
'''
83+
{
84+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
85+
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
86+
"sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
87+
"identity": "IDENTITY",
88+
"attributes": "{ \\"role\\": \\"driver\\" }",
89+
"messaging_binding": {
90+
"type": "sms",
91+
"projected_address": "+15017122661"
92+
},
93+
"date_created": "2015-12-16T22:18:37Z",
94+
"date_updated": "2015-12-16T22:18:38Z",
95+
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
96+
}
97+
'''
98+
))
99+
100+
actual = self.client.conversations.v1.conversations(sid="CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
101+
.participants.create()
102+
103+
F438 self.assertIsNotNone(actual)
104+
79105
def test_update_request(self):
80106
self.holodeck.mock(Response(500, ''))
81107

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
11+
from twilio.base.exceptions import TwilioException
12+
from twilio.http.response import Response
13+
14+
15+
class ExportCustomJobTestCase(IntegrationTestCase):
16+
17+
def test_list_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.preview.bulk_exports.exports(resource_type="resource_type") \
22+
.export_custom_jobs.list()
23+
24+
self.holodeck.assert_has_request(Request(
25+
'get',
26+
'https://preview.twilio.com/BulkExports/Exports/resource_type/Jobs',
27+
))
28+
29+
def test_read_empty_response(self):
30+
self.holodeck.mock(Response(
31+
200,
32+
'''
33+
{
34+
"meta": {
35+
"previous_page_url": null,
36+
"url": "https://preview.twilio.com/BulkExports/Exports/Messages/Jobs?PageSize=50&Page=0",
37+
"page_size": 50,
38+
"key": "jobs",
39+
"first_page_url": "https://preview.twilio.com/BulkExports/Exports/Messages/Jobs?PageSize=50&Page=0",
40+
"next_page_url": null,
41+
"page": 0
42+
},
43+
"jobs": []
44+
}
45+
'''
46+
))
47+
48+
actual = self.client.preview.bulk_exports.exports(resource_type="resource_type") \
49+
.export_custom_jobs.list()
50+
51+
self.assertIsNotNone(actual)
52+
53+
def test_read_full_response(self):
54+
self.holodeck.mock(Response(
55+
200,
56+
'''
57+
{
58+
"meta": {
59+
"previous_page_url": null,
60+
"url": "https://preview.twilio.com/BulkExports/Exports/Messages/Jobs?PageSize=50&Page=0",
61+
"page_size": 50,
62+
"key": "jobs",
63+
"first_page_url": "https://preview.twilio.com/BulkExports/Exports/Messages/Jobs?PageSize=50&Page=0",
64+
"next_page_url": null,
65+
"page": 0
66+
},
67+
"jobs": [
68+
{
69+
"start_day": "start_day",
70+
"job_sid": "JSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
71+
"friendly_name": "friendly_name",
72+
"webhook_method": "webhook_method",
73+
"details": {},
74+
"end_day": "end_day",
75+
"webhook_url": "webhook_url",
76+
"email": "email",
77+
"resource_type": "resource_type"
78+
}
79+
]
80+
}
81+
'''
82+
))
83+
84+
actual = self.client.preview.bulk_exports.exports(resource_type="resource_type") \
85+
.export_custom_jobs.list()
86+
87+
self.assertIsNotNone(actual)
88+
89+
def test_create_request(self):
90+
self.holodeck.mock(Response(500, ''))
91+
92+
with self.assertRaises(TwilioException):
93+
self.client.preview.bulk_exports.exports(resource_type="resource_type") \
94+
.export_custom_jobs.create()
95+
96+
self.holodeck.assert_has_request(Request(
97+
'post',
98+
'https://preview.twilio.com/BulkExports/Exports/resource_type/Jobs',
99+
))
100+
101+
def test_create_response(self):
102+
self.holodeck.mock(Response(
103+
201,
104+
'''
105+
{
106+
"start_day": "start_day",
107+
"job_sid": "JSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
108+
"friendly_name": "friendly_name",
109+
"webhook_method": "webhook_method",
110+
"details": {},
111+
"end_day": "end_day",
112+
"webhook_url": "webhook_url",
113+
"email": "email",
114+
"resource_type": "resource_type"
115+
}
116+
'''
117+
))
118+
119+
actual = self.client.preview.bulk_exports.exports(resource_type="resource_type") \
120+
.export_custom_jobs.create()
121+
122+
self.assertIsNotNone(actual)
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
11+
from twilio.base.exceptions import TwilioException
12+
from twilio.http.response import Response
13+
14+
15+
class JobTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.preview.bulk_exports.exports \
22+
.jobs(job_sid="JSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
23+
24+
self.holodeck.assert_has_request(Request(
25+
'get',
26+
'https://preview.twilio.com/BulkExports/Exports/Jobs/JSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
27+
))
28+
29+
def test_fetch_response(self):
30+
self.holodeck.mock(Response(
31+
200,
32+
'''
33+
{
34+
"start_day": "start_day",
35+
"job_sid": "JSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36+
"url": "https://preview.twilio.com/BulkExports/Exports/Jobs/JSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37+
"friendly_name": "friendly_name",
38+
"end_day": "end_day",
39+
"details": {},
40+
"resource_type": "resource_type"
41+
}
42+
'''
43+
))
44+
45+
actual = self.client.preview.bulk_exports.exports \
46+
.jobs(job_sid="JSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
47+
48+
self.assertIsNotNone(actual)
49+
50+
def test_delete_request(self):
51+
self.holodeck.mock(Response(500, ''))
52+
53+
with self.assertRaises(TwilioException):
54+
self.client.preview.bulk_exports.exports \
55+
.jobs(job_sid="JSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
56+
57+
self.holodeck.assert_has_request(Request(
58+
'delete',
59+
'https://preview.twilio.com/BulkExports/Exports/Jobs/JSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
60+
))
61+
62+
def test_delete_response(self):
63+
self.holodeck.mock(Response(
64+
204,
65+
None,
66+
))
67+
68+
actual = self.client.preview.bulk_exports.exports \
69+
.jobs(job_sid="JSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
70+
71+
self.assertTrue(actual)

tests/integration/preview/trusted_comms/test_branded_call.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,18 @@ def test_create_response(self):
3535
{
3636
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3737
"bg_color": "#fff",
38+
"brand_sid": "BZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
39+
"branded_channel_sid": "BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
40+
"business_sid": "BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
41+
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3842
"caller": "Owl Bank",
3943
"created_at": "2019-05-01T20:00:00Z",
4044
"font_color": "#000",
4145
"from": "+15000000000",
4246
"logo": "https://www.twilio.com/marketing/bundles/company/img/logos/red/twilio-logo-red.png",
47+
"phone_number_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4348
"reason": "Hello Jhon, your appointment has been confirmed.",
44-
"sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
49+
"sid": "CQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4550
"status": "unknown",
4651
"to": "+573000000000",
4752
"use_case": "conversational",

tests/integration/preview/trusted_comms/test_cps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ def test_fetch_response(self):
3030
200,
3131
'''
3232
{
33-
"phone_number": "+1500123",
3433
"cps_url": "https://preview.twilio.com/TrustedComms/CurrentCall",
34+
"phone_number": "+1500123",
3535
"url": "https://preview.twilio.com/TrustedComms/CPS"
3636
}
3737
'''

tests/integration/preview/trusted_comms/test_current_call.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@ def test_read_found_response(self):
3030
200,
3131
'''
3232
{
33-
"sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34-
"from": "+1500123",
35-
"to": "+1500456",
36-
"status": "ringing",
37-
"reason": "Hello Jhon, your bank appointment has been confirmed.",
38-
"created_at": "2019-05-01T20:00:00Z",
39-
"caller": "Owl Bank",
40-
"logo": "https://www.twilio.com/marketing/bundles/company/img/logos/red/twilio-logo-red.png",
4133
"bg_color": "#fff",
34+
"caller": "Owl Bank",
35+
"created_at": "2019-05-01T20:00:00Z",
4236
"font_color": "#f22f46",
43-
"use_case": "conversational",
37+
"from": "+1500123",
38+
"logo": "https://www.twilio.com/marketing/bundles/company/img/logos/red/twilio-logo-red.png",
4439
"manager": "Twilio",
40+
"reason": "Hello Jhon, your bank appointment has been confirmed.",
4541
"shield_img": "https://www.twilio.com/marketing/bundles/company/img/badges/red/twilio-badge-red.png",
46-
"url": "https://preview.twilio.com/TrustedComms/CurrentCall"
42+
"sid": "CQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
43+
"status": "ringing",
44+
"to": "+1500456",
45+
"url": "https://preview.twilio.com/TrustedComms/CurrentCall",
46+
"use_case": "conversational"
4747
}
4848
'''
4949
))

tests/integration/preview/trusted_comms/test_device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ def test_create_response(self):
3333
201,
3434
'''
3535
{
36-
"sid": "DDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3736
"binding_sid": "BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3837
"phone_number": "+573000000000",
38+
"sid": "DDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3939
"url": "https://preview.twilio.com/TrustedComms/Devices"
4040
}
4141
'''

0 commit comments

Comments
 (0)
0