8000 [Librarian] Regenerated @ 91fb5867c6a09e359c0bb254e6da381be4af7049 · drice/twilio-python@dfbf895 · GitHub
[go: up one dir, main page]

Skip to content

Commit dfbf895

Browse files
committed
[Librarian] Regenerated @ 91fb5867c6a09e359c0bb254e6da381be4af7049
1 parent 5b2c0bb commit dfbf895

File tree

12 files changed

+390
-101
lines changed

12 files changed

+390
-101
lines changed

CHANGES.md

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

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

6+
[2022-05-04] Version 7.9.0
7+
--------------------------
8+
**Conversations**
9+
- Expose query parameter `type` in list operation on Address Configurations resource
10+
11+
**Supersim**
12+
- Add `data_total_billed` and `billed_units` fields to Super SIM UsageRecords API response.
13+
- Change ESimProfiles `Eid` parameter to optional to enable Activation Code download method support **(breaking change)**
14+
15+
**Verify**
16+
- Deprecate `push.include_date` parameter in create and update service.
17+
18+
619
[2022-04-20] Version 7.8.2
720
--------------------------
821
**Library - Fix**

tests/integration/conversations/v1/test_address_configuration.py

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,82 @@ def test_read_blank_response(self):
124124

125125
self.assertIsNotNone(actual)
126126

127+
def test_read_by_address_type_response(self):
128+
self.holodeck.mock(Response(
129+
200,
130+
'''
131+
{
132+
"meta": {
133+
"page": 0,
134+
"page_size": 50,
135+
"first_page_url": "https://conversations.twilio.com/v1/Configuration/Addresses?Type=sms&PageSize=50&Page=0",
136+
"previous_page_url": null,
137+
"url": "https://conversations.twilio.com/v1/Configuration/Addresses?Type=sms&PageSize=50&Page=0",
138+
"next_page_url": null,
139+
"key": "address_configurations"
140+
},
141+
"address_configurations": [
142+
{
143+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
144+
"sid": "IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
145+
"address": "+37256123457",
146+
"type": "sms",
147+
"friendly_name": "My Test Configuration",
148+
"auto_creation": {
149+
"enabled": true,
150+
"type": "webhook",
151+
"conversation_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
152+
"webhook_url": "https://example.com",
153+
"webhook_method": "POST",
154+
"webhook_filters": [
155+
"onParticipantAdded",
156+
"onMessageAdded"
157+
]
158+
},
159+
"date_created": "2016-03-24T21:05:50Z",
160+
"date_updated": "2016-03-24T21:05:50Z",
161+
"url": "https://conversations.twilio.com/v1/Configuration/Addresses/IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
162+
},
163+
{
164+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
165+
"sid": "IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
166+
"address": "+37256123458",
167+
"type": "sms",
168+
"friendly_name": "Studio Test Configuration",
169+
"auto_creation": {
170+
"enabled": false,
171+
"type": "studio",
172+
"conversation_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
173+
"studio_flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
174+
"studio_retry_count": 3
175+
},
176+
"date_created": "2016-03-24T21:05:50Z",
177+
"date_updated": "2016-03-24T21:05:50Z",
178+
"url": "https://conversations.twilio.com/v1/Configuration/Addresses/IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
179+
},
180+
{
181+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
182+
"sid": "IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac",
183+
"address": "+37256123459",
184+
"type": "sms",
185+
"friendly_name": "Default Test Configuration",
186+
"auto_creation": {
187+
"enabled": true,
188+
"type": "default"
189+
},
190+
"date_created": "2016-03-24T21:05:50Z",
191+
"date_updated": "2016-03-24T21:05:50Z",
192+
"url": "https://conversations.twilio.com/v1/Configuration/Addresses/IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac"
193+
}
194+
]
195+
}
196+
'''
197+
))
198+
199+
actual = self.client.conversations.v1.address_configurations.list()
200+
201+
self.assertIsNotNone(actual)
202+
127203
def test_fetch_request(self):
128204
self.holodeck.mock(Response(500, ''))
129205

tests/integration/supersim/v1/test_esim_profile.py

Lines changed: 78 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,11 @@ def test_create_request(self):
1818
self.holodeck.mock(Response(500, ''))
1919

2020
with self.assertRaises(TwilioException):
21-
self.client.supersim.v1.esim_profiles.create(eid="eid")
22-
23-
values = {'Eid': "eid", }
21+
self.client.supersim.v1.esim_profiles.create()
2422

2523
self.holodeck.assert_has_request(Request(
2624
'post',
2725
'https://supersim.twilio.com/v1/ESimProfiles',
28-
data=values,
2926
))
3027

3128
def test_create_default_smdp_response(self):
@@ -37,9 +34,38 @@ def test_create_default_smdp_response(self):
3734
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3835
"iccid": null,
3936
"sim_sid": null,
40-
"status": "reserving",
37+
"status": "new",
4138
"eid": "89049032005008882600033489aaaaaa",
4239
"smdp_plus_address": null,
40+
"matching_id": null,
41+
"activation_code": null,
42+
"error_code": null,
43+
"error_message": null,
44+
"date_created": "2020-09-01T20:00:00Z",
45+
"date_updated": "2020-09-01T20:00:00Z",
46+
"url": "https://supersim.twilio.com/v1/ESimProfiles/HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
47+
}
48+
'''
49+
))
50+
51+
actual = self.client.supersim.v1.esim_profiles.create()
52+
53+
self.assertIsNotNone(actual)
54+
55+
def test_create_activation_code_response(self):
56+
self.holodeck.mock(Response(
57+
201,
58+
'''
59+
{
60+
"sid": "HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
61+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
62+
"iccid": null,
63+
"sim_sid": null,
64+
"status": "new",
65+
"eid": null,
66+
"smdp_plus_address": null,
67+
"matching_id": null,
68+
"activation_code": null,
4369
"error_code": null,
4470
"error_message": null,
4571
"date_created": "2020-09-01T20:00:00Z",
@@ -49,7 +75,7 @@ def test_create_default_smdp_response(self):
4975
'''
5076
))
5177

52-
actual = self.client.supersim.v1.esim_profiles.create(eid="eid")
78+
actual = self.client.supersim.v1.esim_profiles.create()
5379

5480
self.assertIsNotNone(actual)
5581

@@ -65,6 +91,8 @@ def test_create_with_callback_response(self):
6591
"status": "reserving",
6692
"eid": "89049032005008882600033489aaaaaa",
6793
"smdp_plus_address": null,
94+
"matching_id": null,
95+
"activation_code": null,
6896
"error_code": null,
6997
"error_message": null,
7098
"date_created": "2020-09-01T20:00:00Z",
@@ -74,7 +102,7 @@ def test_create_with_callback_response(self):
74102
'''
75103
))
76104

77-
actual = self.client.supersim.v1.esim_profiles.create(eid="eid")
105+
actual = self.client.supersim.v1.esim_profiles.create()
78106

79107
self.assertIsNotNone(actual)
80108

@@ -89,7 +117,7 @@ def test_fetch_request(self):
89117
'https://supersim.twilio.com/v1/ESimProfiles/HPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
90118
))
91119

92-
def test_fetch_response(self):
120+
def test_fetch_default_smdp_response(self):
93121
self.holodeck.mock(Response(
94122
200,
95123
'''
@@ -100,7 +128,36 @@ def test_fetch_response(self):
100128
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
101129
"status": "available",
102130
"eid": "89049032005008882600033489aaaaaa",
103-
"smdp_plus_address": "https://sm-dp-plus.twilio.com",
131+
"smdp_plus_address": "sm-dp-plus.twilio.com",
132+
"matching_id": null,
133+
"activation_code": null,
134+
"error_code": null,
135+
"error_message": null,
136+
"date_created": "2020-09-01T20:00:00Z",
137+
"date_updated": "2020-09-01T20:00:00Z",
138+
"url": "https://supersim.twilio.com/v1/ESimProfiles/HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
139+
}
140+
'''
141+
))
142+
143+
actual = self.client.supersim.v1.esim_profiles("HPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
144+
145+
self.assertIsNotNone(actual)
146+
147+
def test_fetch_activation_code_response(self):
148+
self.holodeck.mock(Response(
149+
200,
150+
'''
151+
{
152+
"sid": "HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
153+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
154+
"iccid": "8988307aaaaaaaaaaaaa",
155+
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
156+
"status": "available",
157+
"eid": null,
158+
"smdp_plus_address": "sm-dp-plus.twilio.com",
159+
"matching_id": "AAAAA-BBBBB-CCCCC-DDDDD-EEEEE",
160+
"activation_code": "1$SM-DP-PLUS.TWILIO.COM$AAAAA-BBBBB-CCCCC-DDDDD-EEEEE",
104161
"error_code": null,
105162
"error_message": null,
106163
"date_created": "2020-09-01T20:00:00Z",
@@ -138,7 +195,9 @@ def test_read_all_response(self):
138195
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
139196
"status": "available",
140197
"eid": "89049032005008882600033489aaaaaa",
141-
"smdp_plus_address": "https://sm-dp-plus.twilio.com",
198+
"smdp_plus_address": "sm-dp-plus.twilio.com",
199+
"matching_id": null,
200+
"activation_code": null,
142201
"error_code": null,
143202
"error_message": null,
144203
"date_created": "2020-09-01T20:00:00Z",
@@ -176,7 +235,9 @@ def test_read_by_eid_response(self):
176235
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
177236
"status": "available",
178237
"eid": "89049032005008882600033489aaaaaa",
179-
"smdp_plus_address": "https://sm-dp-plus.twilio.com",
238+
"smdp_plus_address": "sm-dp-plus.twilio.com",
239+
"matching_id": null,
240+
"activation_code": null,
180241
"error_code": null,
181242
"error_message": null,
182243
"date_created": "2020-09-01T20:00:00Z",
@@ -214,7 +275,9 @@ def test_read_by_sim_sid_response(self):
214275
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
215276
"status": "available",
216277
"eid": "89049032005008882600033489aaaaaa",
217-
"smdp_plus_address": "https://sm-dp-plus.twilio.com",
278+
"smdp_plus_address": "sm-dp-plus.twilio.com",
279+
"matching_id": null,
280+
"activation_code": null,
218281
"error_code": null,
219282
"error_message": null,
220283
"date_created": "2020-09-01T20:00:00Z",
@@ -252,7 +315,9 @@ def test_read_by_status_response(self):
252315
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
253316
"status": "downloaded",
254317
"eid": "89049032005008882600033489aaaaaa",
255-
"smdp_plus_address": "https://sm-dp-plus.twilio.com",
318+
"smdp_plus_address": "sm-dp-plus.twilio.com",
319+
"matching_id": null,
320+
"activation_code": null,
256321
"error_code": null,
257322
"error_message": null,
258323
"date_created": "2020-09-01T20:00:00Z",

0 commit comments

Comments
 (0)
0