Skip to content

Commit 45e8ee2

Browse files
committed
[Librarian] Regenerated @ fdad267944635962308083659322c23f28226702
1 parent 8bb79ed commit 45e8ee2

14 files changed

+1129
-52
lines changed

CHANGES.md

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

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

6+
[2021-09-08] Version 6.63.2
7+
---------------------------
8+
**Api**
9+
- Revert adding `siprec` resource
10+
- Add `siprec` resource
11+
12+
**Messaging**
13+
- Add 'mock' as an optional field to brand_registration api
14+
- Add 'mock' as an optional field to us_app_to_person api
15+
- Adds more Use Cases in us_app_to_person_usecase api transaction and updates us_app_to_person_usecase docs
16+
17+
**Verify**
18+
- Verify List Templates API endpoint added.
19+
20+
621
[2021-08-25] Version 6.63.1
722
---------------------------
823
**Api**

tests/integration/insights/v1/test_call_summaries.py

Lines changed: 549 additions & 19 deletions
Large diffs are not rendered by default.

tests/integration/messaging/v1/service/test_us_app_to_person.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ def test_create_response(self):
6868
},
6969
"date_created": "2021-02-18T14:48:52Z",
7070
"date_updated": "2021-02-18T14:48:52Z",
71-
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b"
71+
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b",
72+
"mock": false
7273
}
7374
'''
7475
))
@@ -146,7 +147,8 @@ def test_read_full_response(self):
146147
},
147148
"date_created": "2021-02-18T14:48:52Z",
148149
"date_updated": "2021-02-18T14:48:52Z",
149-
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b"
150+
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b",
151+
"mock": false
150152
}
151153
],
152154
"meta": {
@@ -210,7 +212,8 @@ def test_fetch_response(self):
210212
},
211213
"date_created": "2021-02-18T14:48:52Z",
212214
"date_updated": "2021-02-18T14:48:52Z",
213-
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b"
215+
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b",
216+
"mock": false
214217
}
215218
'''
216219
))

tests/integration/messaging/v1/service/test_us_app_to_person_usecase.py

Lines changed: 168 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,94 @@ def test_fetch_with_brand_registration_sid_response(self):
3333
{
3434
"us_app_to_person_usecases": [
3535
{
36-
"code": "MARKETING",
37-
"name": "Marketing",
38-
"description": "Send marketing messages about sales and offers to opted in customers."
36+
"code": "2FA",
37+
"name": "Two-Factor authentication (2FA)",
38+
"description": "Two-Factor authentication, one-time use password, password reset"
39+
},
40+
{
41+
"code": "ACCOUNT_NOTIFICATION",
42+
"name": "Account Notification",
43+
"description": "All reminders, alerts, and notifications. (Examples include: flight delayed, hotel booked, appointment reminders.)"
44+
},
45+
{
46+
"code": "AGENTS_FRANCHISES",
47+
"name": "Agents and Franchises",
48+
"description": "For brands that have multiple agents, franchises or offices in the same brand vertical, but require individual localised numbers per agent/location/office."
49+
},
50+
{
51+
"code": "CHARITY",
52+
"name": "Charity",
53+
"description": "Includes: 5013C Charity\\nDoes not include: Religious organizations"
54+
},
55+
{
56+
"code": "CONVERSATIONAL",
57+
"name": "Conversational Messaging",
58+
"description": "Peer-to-peer app-based group messaging with proxy/pooled numbers (For example: GroupMe)\\nSupporting personalized services and non-exposure of personal numbers for enterprise or A2P communications. (Examples include: Uber and AirBnb.)"
59+
},
60+
{
61+
"code": "CUSTOMER_CARE",
62+
"name": "Customer Care",
63+
"description": "All customer care messaging, including account management and support"
3964
},
4065
{
4166
"code": "DELIVERY_NOTIFICATION",
4267
"name": "Delivery Notification",
43-
"description": "Information about the status of the delivery of a product or service."
68+
"description": "Information about the status of the delivery of a product or service"
69+
},
70+
{
71+
"code": "EMERGENCY",
72+
"name": "Emergency",
73+
"description": "Notification services designed to support public safety / health during natural disasters, armed conflicts, pandemics and other national or regional emergencies"
74+
},
75+
{
76+
"code": "FRAUD_ALERT",
77+
"name": "Fraud Alert Messaging",
78+
"description": "Fraud alert notification"
79+
},
80+
{
81+
"code": "HIGHER_EDUCATION",
82+
"name": "Higher Education",
83+
"description": "For campaigns created on behalf of Colleges or Universities and will also include School Districts etc that fall outside of any \\"free to the consumer\\" messaging model"
84+
},
85+
{
86+
"code": "LOW_VOLUME",
87+
"name": "Low Volume Mixed",
88+
"description": "Low throughput, any combination of use-cases. Examples include: test, demo accounts"
89+
},
90+
{
91+
"code": "MARKETING",
92+
"name": "Marketing",
93+
"description": "Any communication with marketing and/or promotional content"
94+
},
95+
{
96+
"code": "MIXED",
97+
"name": "Mixed",
98+
"description": "Mixed messaging reserved for specific consumer service industry"
99+
},
100+
{
101+
"code": "POLLING_VOTING",
102+
"name": "Polling and voting",
103+
"description": "Polling and voting"
104+
},
105+
{
106+
"code": "PUBLIC_SERVICE_ANNOUNCEMENT",
107+
"name": "Public Service Announcement",
108+
"description": "An informational message that is meant to raise the audience awareness about an important issue"
109+
},
110+
{
111+
"code": "SECURITY_ALERT",
112+
"name": "Security Alert",
113+
"description": "A notification that the security of a system, either software or hardware, has been compromised in some way and there is an action you need to take"
114+
},
115+
{
116+
"code": "SOCIAL",
117+
"name": "Social",
118+
"description": "Communication within or between closed communities (For example: influencers alerts)"
119+
},
120+
{
121+
"code": "SWEEPSTAKE",
122+
"name": "Sweepstake",
123+
"description": "Sweepstake"
44124
}
45125
]
46126
}
@@ -59,14 +139,94 @@ def test_fetch_without_brand_registration_sid_response(self):
59139
{
60140
"us_app_to_person_usecases": [
61141
{
62-
"code": "MARKETING",
63-
"name": "Marketing",
64-
"description": "Send marketing messages about sales and offers to opted in customers."
142+
"code": "2FA",
143+
"name": "Two-Factor authentication (2FA)",
144+
"description": "Two-Factor authentication, one-time use password, password reset"
145+
},
146+
{
147+
"code": "ACCOUNT_NOTIFICATION",
148+
"name": "Account Notification",
149+
"description": "All reminders, alerts, and notifications. (Examples include: flight delayed, hotel booked, appointment reminders.)"
150+
},
151+
{
152+
"code": "AGENTS_FRANCHISES",
153+
"name": "Agents and Franchises",
154+
"description": "For brands that have multiple agents, franchises or offices in the same brand vertical, but require individual localised numbers per agent/location/office."
155+
},
156+
{
157+
"code": "CHARITY",
158+
"name": "Charity",
159+
"description": "Includes: 5013C Charity\\nDoes not include: Religious organizations"
160+
},
161+
{
162+
"code": "CONVERSATIONAL",
163+
"name": "Conversational Messaging",
164+
"description": "Peer-to-peer app-based group messaging with proxy/pooled numbers (For example: GroupMe)\\nSupporting personalized services and non-exposure of personal numbers for enterprise or A2P communications. (Examples include: Uber and AirBnb.)"
165+
},
166+
{
167+
"code": "CUSTOMER_CARE",
168+
"name": "Customer Care",
169+
"description": "All customer care messaging, including account management and support"
65170
},
66171
{
67172
"code": "DELIVERY_NOTIFICATION",
68173
"name": "Delivery Notification",
69-
"description": "Information about the status of the delivery of a product or service."
174+
"description": "Information about the status of the delivery of a product or service"
175+
},
176+
{
177+
"code": "EMERGENCY",
178+
"name": "Emergency",
179+
"description": "Notification services designed to support public safety / health during natural disasters, armed conflicts, pandemics and other national or regional emergencies"
180+
},
181+
{
182+
"code": "FRAUD_ALERT",
183+
"name": "Fraud Alert Messaging",
184+
"description": "Fraud alert notification"
185+
},
186+
{
187+
"code": "HIGHER_EDUCATION",
188+
"name": "Higher Education",
189+
"description": "For campaigns created on behalf of Colleges or Universities and will also include School Districts etc that fall outside of any \\"free to the consumer\\" messaging model"
190+
},
191+
{
192+
"code": "LOW_VOLUME",
193+
"name": "Low Volume Mixed",
194+
"description": "Low throughput, any combination of use-cases. Examples include: test, demo accounts"
195+
},
196+
{
197+
"code": "MARKETING",
198+
"name": "Marketing",
199+
"description": "Any communication with marketing and/or promotional content"
200+
},
201+
{
202+
"code": "MIXED",
203+
"name": "Mixed",
204+
"description": "Mixed messaging reserved for specific consumer service industry"
205+
},
206+
{
207+
"code": "POLLING_VOTING",
208+
"name": "Polling and voting",
209+
"description": "Polling and voting"
210+
},
211+
{
212+
"code": "PUBLIC_SERVICE_ANNOUNCEMENT",
213+
"name": "Public Service Announcement",
214+
"description": "An informational message that is meant to raise the audience awareness about an important issue"
215+
},
216+
{
217+
"code": "SECURITY_ALERT",
218+
"name": "Security Alert",
219+
"description": "A notification that the security of a system, either software or hardware, has been compromised in some way and there is an action you need to take"
220+
},
221+
{
222+
"code": "SOCIAL",
223+
"name": "Social",
224+
"description": "Communication within or between closed communities (For example: influencers alerts)"
225+
},
226+
{
227+
"code": "SWEEPSTAKE",
228+
"name": "Sweepstake",
229+
"description": "Sweepstake"
70230
}
71231
]
72232
}

tests/integration/messaging/v1/test_brand_registration.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def test_fetch_response(self):
4141
"tcr_id": "BXXXXXX",
4242
"failure_reason": "Registration error",
4343
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85",
44-
"brand_score": 42
44+
"brand_score": 42,
45+
"mock": false
4546
}
4647
'''
4748
))
@@ -88,7 +89,8 @@ def test_read_response(self):
8889
"tcr_id": "BXXXXXX",
8990
"failure_reason": "Registration error",
9091
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85",
91-
"brand_score": 42
92+
"brand_score": 42,
93+
"mock": false
9294
}
9395
]
9496
}
@@ -132,7 +134,8 @@ def test_create_response(self):
132134
"tcr_id": "BXXXXXX",
133135
"failure_reason": "Registration error",
134136
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85",
135-
"brand_score": 42
137+
"brand_score": 42,
138+
"mock": false
136139
}
137140
'''
138141
))

tests/integration/pricing/v2/test_country.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,20 @@ def test_fetch_response(self):
9696
"country": "United States",
9797
"originating_call_prices": [
9898
{
99-
"base_price": "",
99+
"base_price": null,
100100
"current_price": "0.0085",
101101
"number_type": "local"
102102
},
103103
{
104-
"base_price": "",
104+
"base_price": null,
105105
"current_price": "0.022",
106106
"number_type": "toll free"
107107
}
108108
],
109109
"iso_country": "US",
110110
"terminating_prefix_prices": [
111111
{
112-
"base_price": "",
112+
"base_price": null,
113113
"current_price": "0.090",
114114
"destination_prefixes": [
115115
"1907"
@@ -120,7 +120,7 @@ def test_fetch_response(self):
120120
]
121121
},
122122
{
123-
"base_price": "",
123+
"base_price": null,
124124
"current_price": "0.013",
125125
"destination_prefixes": [
126126
"1808"
@@ -131,7 +131,7 @@ def test_fetch_response(self):
131131
]
132132
},
133133
{
134-
"base_price": "",
134+
"base_price": null,
135135
"current_price": "0.013",
136136
"destination_prefixes": [
137137
"1800",
@@ -147,7 +147,7 @@ def test_fetch_response(self):
147147
]
148148
},
149149
{
150-
"base_price": "",
150+
"base_price": null,
151151
"current_price": "0.013",
152152
"destination_prefixes": [
153153
"1"

tests/integration/pricing/v2/test_number.py

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ def test_fetch_response(self):
3838
"number_type": null
3939
},
4040
"iso_country": "US",
41-
"origination_number": "+987654321",
41+
"origination_number": null,
4242
"terminating_prefix_prices": [
4343
{
44-
"base_price": "",
44+
"base_price": null,
4545
"current_price": "0.013",
4646
"destination_prefixes": [
4747
"1800"
@@ -61,3 +61,40 @@ def test_fetch_response(self):
6161
actual = self.client.pricing.v2.numbers("+15017122661").fetch()
6262

6363
self.assertIsNotNone(actual)
64+
65+
def test_fetch_with_origination_response(self):
66+
self.holodeck.mock(Response(
67+
200,
68+
'''
69+
{
70+
"country": "United States",
71+
"destination_number": "+18001234567",
72+
"originating_call_price": {
73+
"base_price": null,
74+
"current_price": "0.013",
75+
"number_type": "tollfree"
76+
},
77+
"iso_country": "US",
78+
"origination_number": "+15105556789",
79+
"terminating_prefix_prices": [
80+
{
81+
"base_price": null,
82+
"current_price": "0.001",
83+
"destination_prefixes": [
84+
"1800"
85+
],
86+
"friendly_name": "Trunking Outbound Minute - United States - Toll Free",
87+
"origination_prefixes": [
88+
"ALL"
89+
]
90+
}
91+
],
92+
"price_unit": "USD",
93+
"url": "https://pricing.twilio.com/v2/Trunking/Numbers/+18001234567"
94+
}
95+
'''
96+
))
97+
98+
actual = self.client.pricing.v2.numbers("+15017122661").fetch()
99+
100+
self.assertIsNotNone(actual)

0 commit comments

Comments
 (0)