8000 [Librarian] Regenerated @ 4e75c7be2507558854a659be2e05b171bcf7512b · RoadRunner11/twilio-python@44620df · GitHub
[go: up one dir, main page]

Skip to content

Commit 44620df

Browse files
committed
[Librarian] Regenerated @ 4e75c7be2507558854a659be2e05b171bcf7512b
1 parent cbf3103 commit 44620df

File tree

13 files changed

+561
-25
lines changed

13 files changed

+561
-25
lines changed

CHANGES.md

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

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

6+
[2021-06-30] Version 6.61.0
7+
---------------------------
8+
**Conversations**
9+
- Read-only Conversation Email Binding property `binding`
10+
11+
**Supersim**
12+
- Add Billing Period resource for the Super Sim Pilot
13+
- Add List endpoint to Billing Period resource for Super Sim Pilot
14+
- Add Fetch endpoint to Billing Period resource for Super Sim Pilot
15+
16+
**Taskrouter**
17+
- Update `transcribe` & `transcription_configuration` form params in Reservation update endpoint to have private visibility **(breaking change)**
18+
- Add `transcribe` & `transcription_configuration` form params to Reservation update endpoint
19+
20+
**Twiml**
21+
- Add `modify` event to `statusCallbackEvent` for `<Conference>`.
22+
23+
624
[2021-06-16] Version 6.60.0
725
---------------------------
826
**Api**

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

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -474,14 +474,11 @@ def test_update_request(self):
474474

475475
with self.assertRaises(TwilioException):
476476
self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
477-
.messages("MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(body="body")
478-
479-
values = {'Body': "body", }
477+
.messages("MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
480478

481479
self.holodeck.assert_has_request(Request(
482480
'post',
483481
'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json',
484-
data=values,
485482
))
486483

487484
def test_redact_body_response(self):
@@ -517,6 +514,43 @@ def test_redact_body_response(self):
517514
))
518515

519516
actual = self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
520-
.messages("MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(body="body")
517+
.messages("MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
518+
519+
self.assertIsNotNone(actual)
520+
521+
def test_cancel_message_response(self):
522+
self.holodeck.mock(Response(
523+
200,
524+
'''
525+
{
526+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
527+
"api_version": "2010-04-01",
528+
"body": "",
529+
"date_created": "Fri, 24 May 2019 17:18:27 +0000",
530+
"date_sent": "Fri, 24 May 2019 17:18:28 +0000",
531+
"date_updated": "Fri, 24 May 2019 17:18:28 +0000",
532+
"direction": "outbound-api",
533+
"error_code": 30007,
534+
"error_message": "Carrier violation",
535+
"from": "+12019235161",
536+
"messaging_service_sid": "MGdeadbeefdeadbeefdeadbeefdeadbeef",
537+
"num_media": "0",
538+
"num_segments": "1",
539+
"price": "-0.00750",
540+
"price_unit": "USD",
541+
"sid": "SMb7c0a2ce80504485a6f653a7110836f5",
542+
"status": "canceled",
543+
"subresource_uris": {
544+
"media": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMb7c0a2ce80504485a6f653a7110836f5/Media.json",
545+
"feedback": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMb7c0a2ce80504485a6f653a7110836f5/Feedback.json"
546+
},
547+
"to": "+18182008801",
548+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMb7c0a2ce80504485a6f653a7110836f5.json"
549+
}
550+
'''
551+
))
552+
553+
actual = self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
554+
.messages("MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
521555

522556
self.assertIsNotNone(actual)

tests/integration/conversations/v1/service/test_conversation.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def test_create_response(self):
4747
"date_inactive": "2015-12-16T22:19:38Z",
4848
"date_closed": "2015-12-16T22:28:38Z"
4949
},
50+
"bindings": {},
5051
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5152
"links": {
5253
"participants": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
@@ -78,6 +79,7 @@ def test_create_no_timers_no_attributes_response(self):
7879
"date_updated": "2020-07-01T22:18:37Z",
7980
"state": "active",
8081
"timers": {},
82+
"bindings": {},
8183
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8284
"links": {
8385
"participants": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
@@ -126,6 +128,7 @@ def test_update_response(self):
126128
"date_inactive": "2015-12-16T22:19:38Z",
127129
"date_closed": "2015-12-16T22:28:38Z"
128130
},
131+
"bindings": {},
129132
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
130133
"links": {
131134
"participants": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
@@ -197,6 +200,7 @@ def test_fetch_response(self):
197200
"date_inactive": "2015-12-16T22:19:38Z",
198201
"date_closed": "2015-12-16T22:28:38Z"
199202
},
203+
"bindings": {},
200204
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
201205
"links": {
202206
"participants": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
@@ -245,6 +249,7 @@ def test_read_full_response(self):
245249
"date_inactive": "2015-12-16T22:19:38Z",
246250
"date_closed": "2015-12-16T22:28:38Z"
247251
},
252+
"bindings": {},
248253
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
249254
"links": {
250255
"participants": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",

tests/integration/conversations/v1/test_conversation.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def test_create_response(self):
4646
"date_inactive": "2015-12-16T22:19:38Z",
4747
"date_closed": "2015-12-16T22:28:38Z"
4848
},
49+
"bindings": {},
4950
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5051
"links": {
5152
"participants": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
@@ -76,6 +77,7 @@ def test_create_no_timers_no_attributes_response(self):
7677
"date_updated": "2020-07-01T22:18:37Z",
7778
"state": "active",
7879
"timers": {},
80+
"bindings": {},
7981
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8082
"links": {
8183
"participants": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
@@ -122,6 +124,7 @@ def test_update_response(self):
122124
"date_inactive": "2015-12-16T22:19:38Z",
123125
"date_closed": "2015-12-16T22:28:38Z"
124126
},
127+
"bindings": {},
125128
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
126129
"links": {
127130
"participants": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
@@ -189,6 +192,7 @@ def test_fetch_response(self):
189192
"date_inactive": "2015-12-16T22:19:38Z",
190193
"date_closed": "2015-12-16T22:28:38Z"
191194
},
195+
"bindings": {},
192196
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
193197
"links": {
194198
"participants": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
@@ -235,6 +239,7 @@ def test_read_full_response(self):
235239
"date_inactive": "2015-12-16T22:19:38Z",
236240
"date_closed": "2015-12-16T22:28:38Z"
237241
},
242+
"bindings": {},
238243
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
239244
"links": {
240245
"participants": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
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 BillingPeriodTestCase(IntegrationTestCase):
16+
17+
def test_list_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.supersim.v1.sims("HSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22+
.billing_periods.list()
23+
24+
self.holodeck.assert_has_request(Request(
25+
'get',
26+
'https://supersim.twilio.com/v1/Sims/HSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/BillingPeriods',
27+
))
28+
29+
def test_read_empty_response(self):
30+
self.holodeck.mock(Response(
31+
200,
32+
'''
33+
{
34+
"billing_periods": [],
35+
"meta": {
36+
"page": 0,
37+
"page_size": 50,
38+
"first_page_url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods?PageSize=50&Page=0",
39+
"previous_page_url": null,
40+
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods?PageSize=50&Page=0",
41+
"next_page_url": null,
42+
"key": "billing_periods"
43+
}
44+
}
45+
'''
46+
))
47+
48+
actual = self.client.supersim.v1.sims("HSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
49+
.billing_periods.list()
50+
51+
self.assertIsNotNone(actual)
52+
53+
def test_read_full_active_period_response(self):
54+
self.holodeck.mock(Response(
55+
200,
56+
'''
57+
{
58+
"billing_periods": [
59+
{
60+
"sid": "HBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
61+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
62+
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
63+
"period_type": "active",
64+
"start_time": "2021-06-09T13:18:15Z",
65+
"end_time": "2021-07-09T13:18:15Z",
66+
"date_created": "2021-06-09T13:18:16Z",
67+
"date_updated": "2021-06-09T13:18:16Z"
68+
}
69+
],
70+
"meta": {
71+
"page": 0,
72+
"page_size": 50,
73+
"first_page_url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods?PageSize=50&Page=0",
74+
"previous_page_url": null,
75+
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods?PageSize=50&Page=0",
76+
"next_page_url": null,
77+
"key": "billing_periods"
78+
}
79+
}
80+
'''
81+
))
82+
83+
actual = self.client.supersim.v1.sims("HSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
84+
.billing_periods.list()
85+
86+
self.assertIsNotNone(actual)
87+
88+
def test_read_full_ready_period_response(self):
89+
self.holodeck.mock(Response(
90+
200,
91+
'''
92+
{
93+
"billing_periods": [
94+
{
95+
"sid": "HBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
96+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
97+
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
98+
"period_type": "ready",
99+
"start_time": "2021-06-09T13:18:15Z",
100+
"end_time": "2021-07-09T13:18:15Z",
101+
"date_created": "2021-06-09T13:18:16Z",
102+
"date_updated": "2021-06-09T13:18:16Z"
103+
}
104+
],
105+
"meta": {
106+
"page": 0,
107+
"page_size": 50,
108+
"first_page_url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods?PageSize=50&Page=0",
109+
"previous_page_url": null,
110+
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods?PageSize=50&Page=0",
111+
"next_page_url": null,
112+
"key": "billing_periods"
113+
}
114+
}
115+
'''
116+
))
117+
118+
actual = self.client.supersim.v1.sims("HSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
119+
.billing_periods.list()
120+
121+
self.assertIsNotNone(actual)

0 commit comments

Comments
 (0)
0