Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2c77186

Browse files
committed
[Librarian] Regenerated @ 84b4cd4c23a96109c715a2512bbe8238fae5c394 27d8c0867df0f71947f6535d79d018c706950630
1 parent ad1f208 commit 2c77186

File tree

264 files changed

+1119
-1860
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

264 files changed

+1119
-1860
lines changed

CHANGES.md

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

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

6+
[2024-06-18] Version 9.2.0
7+
--------------------------
8+
**Library - Chore**
9+
- [PR #796](https://github.com/twilio/twilio-python/pull/796): adding contentType in post and put. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
10+
11+
**Events**
12+
- Add `status` and `documentation_url` to Event Types
13+
14+
**Lookups**
15+
- Removed unused `fraud` lookups in V1 only to facilitate rest proxy migration
16+
17+
**Numbers**
18+
- Add date_created field to the Get Port In Request API
19+
- Rename the `status_last_time_updated_timestamp` field to `last_updated` in the Get Port In Phone Number API **(breaking change)**
20+
- Add Rejection reason and rejection reason code to the Get Port In Phone Number API
21+
- Remove the carrier information from the Portability API
22+
23+
**Proxy**
24+
- Change property `type` from enum to ienum
25+
26+
**Trusthub**
27+
- Add skipMessagingUseCase field in compliance_tollfree_inquiry.
28+
29+
630
[2024-06-06] Version 9.1.1
731
--------------------------
832
**Api**

twilio/rest/accounts/v1/credential/aws.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,10 @@ def create(
330330
"AccountSid": account_sid,
331331
}
332332
)
333+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
333334

334335
payload = self._version.create(
335-
method="POST",
336-
uri=self._uri,
337-
data=data,
336+
method="POST", uri=self._uri, data=data, headers=headers
338337
)
339338

340339
return AwsInstance(self._version, payload)
@@ -362,11 +361,10 @@ async def create_async(
362361
"AccountSid": account_sid,
363362
}
364363
)
364+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
365365

366366
payload = await self._version.create_async(
367-
method="POST",
368-
uri=self._uri,
369-
data=data,
367+
method="POST", uri=self._uri, data=data, headers=headers
370368
)
371369

372370
return AwsInstance(self._version, payload)

twilio/rest/accounts/v1/credential/public_key.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,11 +334,10 @@ def create(
334334
"AccountSid": account_sid,
335335
}
336336
)
337+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
337338

338339
payload = self._version.create(
339-
method="POST",
340-
uri=self._uri,
341-
data=data,
340+
method="POST", uri=self._uri, data=data, headers=headers
342341
)
343342

344343
return PublicKeyInstance(self._version, payload)
@@ -366,11 +365,10 @@ async def create_async(
366365
"AccountSid": account_sid,
367366
}
368367
)
368+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
369369

370370
payload = await self._version.create_async(
371-
method="POST",
372-
uri=self._uri,
373-
data=data,
371+
method="POST", uri=self._uri, data=data, headers=headers
374372
)
375373

376374
return PublicKeyInstance(self._version, payload)

twilio/rest/accounts/v1/safelist.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,10 @@ def create(self, phone_number: str) -> SafelistInstance:
6969
"PhoneNumber": phone_number,
7070
}
7171
)
72+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
7273

7374
payload = self._version.create(
74-
method="POST",
75-
uri=self._uri,
76-
data=data,
75+
method="POST", uri=self._uri, data=data, headers=headers
7776
)
7877

7978
return SafelistInstance(self._version, payload)
@@ -92,11 +91,10 @@ async def create_async(self, phone_number: str) -> SafelistInstance:
9291
"PhoneNumber": phone_number,
9392
}
9493
)
94+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
9595

9696
payload = await self._version.create_async(
97-
method="POST",
98-
uri=self._uri,
99-
data=data,
97+
method="POST", uri=self._uri, data=data, headers=headers
10098
)
10199

102100
return SafelistInstance(self._version, payload)
@@ -108,13 +106,16 @@ def delete(self, phone_number: Union[str, object] = values.unset) -> bool:
108106
:param phone_number: The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
109107
:returns: True if delete succeeds, False otherwise
110108
"""
109+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
111110

112111
params = values.of(
113112
{
114113
"PhoneNumber": phone_number,
115114
}
116115
)
117-
return self._version.delete(method="DELETE", uri=self._uri, params=params)
116+
return self._version.delete(
117+
method="DELETE", uri=self._uri, headers=headers, params=params
118+
)
118119

119120
async def delete_async(
120121
self, phone_number: Union[str, object] = values.unset
@@ -125,14 +126,15 @@ async def delete_async(
125126
:param phone_number: The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
126127
:returns: True if delete succeeds, False otherwise
127128
"""
129+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
128130

129131
params = values.of(
130132
{
131133
"PhoneNumber": phone_number,
132134
}
133135
)
134136
return await self._version.delete_async(
135-
method="DELETE", uri=self._uri, params=params
137+
method="DELETE", uri=self._uri, headers=headers, params=params
136138
)
137139

138140
def fetch(
@@ -144,14 +146,17 @@ def fetch(
144146
:param phone_number: The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
145147
:returns: The fetched SafelistInstance
146148
"""
149+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
147150

148151
params = values.of(
149152
{
150153
"PhoneNumber": phone_number,
151154
}
152155
)
153156

154-
payload = self._version.fetch(method="GET", uri=self._uri, params=params)
157+
payload = self._version.fetch(
158+
method="GET", uri=self._uri, headers=headers, params=params
159+
)
155160

156161
return SafelistInstance(self._version, payload)
157162

@@ -164,6 +169,7 @@ async def fetch_async(
164169
:param phone_number: The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
165170
:returns: The fetched SafelistInstance
166171
"""
172+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
167173

168174
params = values.of(
169175
{
@@ -172,7 +178,7 @@ async def fetch_async(
172178
)
173179

174180
payload = await self._version.fetch_async(
175-
method="GET", uri=self._uri, params=params
181+
method="GET", uri=self._uri, headers=headers, params=params
176182
)
177183

178184
return SafelistInstance(self._version, payload)

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -830,11 +830,10 @@ def create(
830830
"FriendlyName": friendly_name,
831831
}
832832
)
833+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
833834

834835
payload = self._version.create(
835-
method="POST",
836-
uri=self._uri,
837-
data=data,
836+
method="POST", uri=self._uri, data=data, headers=headers
838837
)
839838

840839
return AccountInstance(self._version, payload)
@@ -855,11 +854,10 @@ async def create_async(
855854
"FriendlyName": friendly_name,
856855
}
857856
)
857+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
858858

859859
payload = await self._version.create_async(
860-
method="POST",
861-
uri=self._uri,
862-
data=data,
860+
method="POST", uri=self._uri, data=data, headers=headers
863861
)
864862

865863
return AccountInstance(self._version, payload)

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -529,11 +529,10 @@ def create(
529529
"StreetSecondary": street_secondary,
530530
}
531531
)
532+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
532533

533534
payload = self._version.create(
534-
method="POST",
535-
uri=self._uri,
536-
data=data,
535+
method="POST", uri=self._uri, data=data, headers=headers
537536
)
538537

539538
return AddressInstance(
@@ -584,11 +583,10 @@ async def create_async(
584583
"StreetSecondary": street_secondary,
585584
}
586585
)
586+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
587587

588588
payload = await self._version.create_async(
589-
method="POST",
590-
uri=self._uri,
591-
data=data,
589+
method="POST", uri=self._uri, data=data, headers=headers
592590
)
593591

594592
return AddressInstance(

twilio/rest/api/v2010/account/application.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -636,11 +636,10 @@ def create(
636636
),
637637
}
638638
)
639+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
639640

640641
payload = self._version.create(
641-
method="POST",
642-
uri=self._uri,
643-
data=data,
642+
method="POST", uri=self._uri, data=data, headers=headers
644643
)
645644

646645
return ApplicationInstance(
@@ -713,11 +712,10 @@ async def create_async(
713712
),
714713
}
715714
)
715+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
716716

717717
payload = await self._version.create_async(
718-
method="POST",
719-
uri=self._uri,
720-
data=data,
718+
method="POST", uri=self._uri, data=data, headers=headers
721719
)
722720

723721
return ApplicationInstance(

twilio/rest/api/v2010/account/balance.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"""
1414

1515
from typing import Any, Dict, Optional
16+
from twilio.base import values
1617

1718
from twilio.base.instance_resource import InstanceResource
1819
from twilio.base.list_resource import ListResource
@@ -72,8 +73,9 @@ def fetch(self) -> BalanceInstance:
7273
7374
:returns: The fetched BalanceInstance
7475
"""
76+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
7577

76-
payload = self._version.fetch(method="GET", uri=self._uri)
78+
payload = self._version.fetch(method="GET", uri=self._uri, headers=headers)
7779

7880
return BalanceInstance(
7981
self._version, payload, account_sid=self._solution["account_sid"]
@@ -86,8 +88,11 @@ async def fetch_async(self) -> BalanceInstance:
8688
8789
:returns: The fetched BalanceInstance
8890
"""
91+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
8992

90-
payload = await self._version.fetch_async(method="GET", uri=self._uri)
93+
payload = await self._version.fetch_async(
94+
method="GET", uri=self._uri, headers=headers
95+
)
9196

9297
return BalanceInstance(
9398
self._version, payload, account_sid=self._solution["account_sid"]

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class UpdateStatus(object):
6565
:ivar start_time: The start time of the call, given as UTC in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call has not yet been dialed.
6666
:ivar end_time: The time the call ended, given as UTC in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call did not complete successfully.
6767
:ivar duration: The length of the call in seconds. This value is empty for busy, failed, unanswered, or ongoing calls.
68-
:ivar price: The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available.
68+
:ivar price: The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available. The price associated with a call only reflects the charge for connectivity. Charges for other call-related features such as Answering Machine Detection, Text-To-Speech, and SIP REFER are not included in this value.
6969
:ivar price_unit: The currency in which `Price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g., `USD`, `EUR`, `JPY`). Always capitalized for calls.
7070
:ivar direction: A string describing the direction of the call. Can be: `inbound` for inbound calls, `outbound-api` for calls initiated via the REST API or `outbound-dial` for calls initiated by a `<Dial>` verb. Using [Elastic SIP Trunking](https://www.twilio.com/docs/sip-trunking), the values can be [`trunking-terminating`](https://www.twilio.com/docs/sip-trunking#termination) for outgoing calls from your communications infrastructure to the PSTN or [`trunking-originating`](https://www.twilio.com/docs/sip-trunking#origination) for incoming calls to your communications infrastructure from the PSTN.
7171
:ivar answered_by: Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise.
@@ -807,11 +807,10 @@ def create(
807807
"ApplicationSid": application_sid,
808808
}
809809
)
810+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
810811

811812
payload = self._version.create(
812-
method="POST",
813-
uri=self._uri,
814-
data=data,
813+
method="POST", uri=self._uri, data=data, headers=headers
815814
)
816815

817816
return CallInstance(
@@ -941,11 +940,10 @@ async def create_async(
941940
"ApplicationSid": application_sid,
942941
}
943942
)
943+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
944944

945945
payload = await self._version.create_async(
946-
method="POST",
947-
uri=self._uri,
948-
data=data,
946+
method="POST", uri=self._uri, data=data, headers=headers
949947
)
950948

951949
return CallInstance(

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,10 @@ def create(
362362
"ValidCardTypes": valid_card_types,
363363
}
364364
)
365+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
365366

366367
payload = self._version.create(
367-
method="POST",
368-
uri=self._uri,
369-
data=data,
368+
method="POST", uri=self._uri, data=data, headers=headers
370369
)
371370

372371
return PaymentInstance(
@@ -440,11 +439,10 @@ async def create_async(
440439
"ValidCardTypes": valid_card_types,
441440
}
442441
)
442+
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
443443

444444
payload = await self._version.create_async(
445-
method="POST",
446-
uri=self._uri,
447-
data=data,
445+
method="POST", uri=self._uri, data=data, headers=headers
448446
)
449447

450448
return PaymentInstance(

0 commit comments

Comments
 (0)