Skip to content

Commit 8131f0a

Browse files
Merge branch 'main' into PHP8.4Take2
2 parents bac4b28 + 6373585 commit 8131f0a

File tree

129 files changed

+1352
-6018
lines changed

Some content is hidden

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

129 files changed

+1352
-6018
lines changed

CHANGES.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,78 @@
11
twilio-php Changelog
22
====================
33

4+
[2025-03-20] Version 8.4.1
5+
--------------------------
6+
**Library - Chore**
7+
- [PR #851](https://github.com/twilio/twilio-php/pull/851): fix seralization. Thanks to [@manisha1997](https://github.com/manisha1997)!
8+
9+
**Accounts**
10+
- Update Safelist API docs as part of prefix supoort
11+
12+
**Flex**
13+
- Removing `first_name`, `last_name`, and `friendly_name` from the Flex User API
14+
15+
**Messaging**
16+
- Add missing tests under transaction/phone_numbers and transaction/short_code
17+
18+
19+
[2025-03-11] Version 8.4.0
20+
--------------------------
21+
**Api**
22+
- Add the missing `emergency_enabled` field for `Address Service` endpoints
23+
24+
**Messaging**
25+
- Add missing enums for A2P and TF
26+
27+
**Numbers**
28+
- add missing enum values to hosted_number_order_status
29+
30+
**Twiml**
31+
- Convert Twiml Attribute `speechModel` of type enum to string **(breaking change)**
32+
33+
34+
[2025-02-20] Version 8.3.15
35+
---------------------------
36+
**Flex**
37+
- Adding Digital Transfers APIs under v1/Interactions
38+
39+
**Numbers**
40+
- Convert webhook_type to ienum type in v1/Porting/Configuration/Webhook/{webhook_type}
41+
42+
**Trusthub**
43+
- Changing TrustHub SupportingDocument status enum from lowercase to uppercase since kyc-orch returns status capitalized and rest proxy requires strict casing
44+
45+
46+
[2025-02-11] Version 8.3.14
47+
---------------------------
48+
**Api**
49+
- Change downstream url and change media type for file `base/api/v2010/validation_request.json`.
50+
51+
**Intelligence**
52+
- Add json_results for Generative JSON operator results
53+
54+
**Messaging**
55+
- Add DestinationAlphaSender API to support Country-Specific Alpha Senders
56+
57+
**Video**
58+
- Change codec type from enum to case-insensitive enum in recording and room_recording apis
59+
60+
61+
[2025-01-28] Version 8.3.13
62+
---------------------------
63+
**Api**
64+
- Add open-api file tag to `conference/call recordings` and `recording_transcriptions`.
65+
66+
**Events**
67+
- Add support for subaccount subscriptions (beta)
68+
69+
**Insights**
70+
- add new region to conference APIs
71+
72+
**Lookups**
73+
- Add new `parnter_sub_id` query parameter to the lookup request
74+
75+
476
[2025-01-13] Version 8.3.12
577
---------------------------
678
**Library - Chore**

src/Twilio/Rest/Accounts/V1/BulkConsentsList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(
4545
/**
4646
* Create the BulkConsentsInstance
4747
*
48-
* @param array[] $items This is a list of objects that describes a contact's opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; and `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`].
48+
* @param object[] $items This is a list of objects that describes a contact's opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; and `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`].
4949
* @return BulkConsentsInstance Created BulkConsentsInstance
5050
* @throws TwilioException When an HTTP error occurs.
5151
*/

src/Twilio/Rest/Accounts/V1/BulkContactsList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(
4545
/**
4646
* Create the BulkContactsInstance
4747
*
48-
* @param array[] $items A list of objects where each object represents a contact's details. Each object includes the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID that maps the response to the original request; `country_iso_code`, a string representing the country using the ISO format (e.g., US for the United States); and `zip_code`, a string representing the postal code.
48+
* @param object[] $items A list of objects where each object represents a contact's details. Each object includes the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID that maps the response to the original request; `country_iso_code`, a string representing the country using the ISO format (e.g., US for the United States); and `zip_code`, a string representing the postal code.
4949
* @return BulkContactsInstance Created BulkContactsInstance
5050
* @throws TwilioException When an HTTP error occurs.
5151
*/

src/Twilio/Rest/Accounts/V1/SafelistList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(
4545
/**
4646
* Create the SafelistInstance
4747
*
48-
* @param string $phoneNumber The phone number to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
48+
* @param string $phoneNumber The phone number or phone number 1k prefix to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
4949
* @return SafelistInstance Created SafelistInstance
5050
* @throws TwilioException When an HTTP error occurs.
5151
*/

src/Twilio/Rest/Accounts/V1/SafelistOptions.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ abstract class SafelistOptions
2222
{
2323

2424
/**
25-
* @param string $phoneNumber The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
25+
* @param string $phoneNumber The phone number or phone number 1k prefix to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
2626
* @return DeleteSafelistOptions Options builder
2727
*/
2828
public static function delete(
@@ -37,7 +37,7 @@ public static function delete(
3737
}
3838

3939
/**
40-
* @param string $phoneNumber The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
40+
* @param string $phoneNumber The phone number or phone number 1k prefix to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
4141
* @return FetchSafelistOptions Options builder
4242
*/
4343
public static function fetch(
@@ -57,7 +57,7 @@ public static function fetch(
5757
class DeleteSafelistOptions extends Options
5858
{
5959
/**
60-
* @param string $phoneNumber The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
60+
* @param string $phoneNumber The phone number or phone number 1k prefix to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
6161
*/
6262
public function __construct(
6363

@@ -68,9 +68,9 @@ public function __construct(
6868
}
6969

7070
/**
71-
* The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
71+
* The phone number or phone number 1k prefix to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
7272
*
73-
* @param string $phoneNumber The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
73+
* @param string $phoneNumber The phone number or phone number 1k prefix to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
7474
* @return $this Fluent Builder
7575
*/
7676
public function setPhoneNumber(string $phoneNumber): self
@@ -94,7 +94,7 @@ public function __toString(): string
9494
class FetchSafelistOptions extends Options
9595
{
9696
/**
97-
* @param string $phoneNumber The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
97+
* @param string $phoneNumber The phone number or phone number 1k prefix to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
9898
*/
9999
public function __construct(
100100

@@ -105,9 +105,9 @@ public function __construct(
105105
}
106106

107107
/**
108-
* The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
108+
* The phone number or phone number 1k prefix to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
109109
*
110-
* @param string $phoneNumber The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
110+
* @param string $phoneNumber The phone number or phone number 1k prefix to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
111111
* @return $this Fluent Builder
112112
*/
113113
public function setPhoneNumber(string $phoneNumber): self

src/Twilio/Rest/Api/V2010/Account/AddressList.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ public function page(
174174
$options['customerName'],
175175
'FriendlyName' =>
176176
$options['friendlyName'],
177+
'EmergencyEnabled' =>
178+
Serialize::booleanToString($options['emergencyEnabled']),
177179
'IsoCountry' =>
178180
$options['isoCountry'],
179181
'PageToken' => $pageToken,

src/Twilio/Rest/Api/V2010/Account/AddressOptions.php

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,29 @@ public static function create(
4949
/**
5050
* @param string $customerName The `customer_name` of the Address resources to read.
5151
* @param string $friendlyName The string that identifies the Address resources to read.
52+
* @param bool $emergencyEnabled Whether the address can be associated to a number for emergency calling.
5253
* @param string $isoCountry The ISO country code of the Address resources to read.
5354
* @return ReadAddressOptions Options builder
5455
*/
5556
public static function read(
5657

5758
string $customerName = Values::NONE,
5859
string $friendlyName = Values::NONE,
60+
bool $emergencyEnabled = Values::BOOL_NONE,
5961
string $isoCountry = Values::NONE
6062

6163
): ReadAddressOptions
6264
{
6365
return new ReadAddressOptions(
6466
$customerName,
6567
$friendlyName,
68+
$emergencyEnabled,
6669
$isoCountry
6770
);
6871
}
6972

7073
/**
71-
* @param string $friendlyName A descriptive string that you create to describe the address. It can be up to 64 characters long.
74+
* @param string $friendlyName A descriptive string that you create to describe the new address. It can be up to 64 characters long for Regulatory Compliance addresses and 32 characters long for Emergency addresses.
7275
* @param string $customerName The name to associate with the address.
7376
* @param string $street The number and street address of the address.
7477
* @param string $city The city of the address.
@@ -197,17 +200,20 @@ class ReadAddressOptions extends Options
197200
/**
198201
* @param string $customerName The `customer_name` of the Address resources to read.
199202
* @param string $friendlyName The string that identifies the Address resources to read.
203+
* @param bool $emergencyEnabled Whether the address can be associated to a number for emergency calling.
200204
* @param string $isoCountry The ISO country code of the Address resources to read.
201205
*/
202206
public function __construct(
203207

204208
string $customerName = Values::NONE,
205209
string $friendlyName = Values::NONE,
210+
bool $emergencyEnabled = Values::BOOL_NONE,
206211
string $isoCountry = Values::NONE
207212

208213
) {
209214
$this->options['customerName'] = $customerName;
210215
$this->options['friendlyName'] = $friendlyName;
216+
$this->options['emergencyEnabled'] = $emergencyEnabled;
211217
$this->options['isoCountry'] = $isoCountry;
212218
}
213219

@@ -235,6 +241,18 @@ public function setFriendlyName(string $friendlyName): self
235241
return $this;
236242
}
237243

244+
/**
245+
* Whether the address can be associated to a number for emergency calling.
246+
*
247+
* @param bool $emergencyEnabled Whether the address can be associated to a number for emergency calling.
248+
* @return $this Fluent Builder
249+
*/
250+
public function setEmergencyEnabled(bool $emergencyEnabled): self
251+
{
252+
$this->options['emergencyEnabled'] = $emergencyEnabled;
253+
return $this;
254+
}
255+
238256
/**
239257
* The ISO country code of the Address resources to read.
240258
*
@@ -262,7 +280,7 @@ public function __toString(): string
262280
class UpdateAddressOptions extends Options
263281
{
264282
/**
265-
* @param string $friendlyName A descriptive string that you create to describe the address. It can be up to 64 characters long.
283+
* @param string $friendlyName A descriptive string that you create to describe the new address. It can be up to 64 characters long for Regulatory Compliance addresses and 32 characters long for Emergency addresses.
266284
* @param string $customerName The name to associate with the address.
267285
* @param string $street The number and street address of the address.
268286
* @param string $city The city of the address.
@@ -297,9 +315,9 @@ public function __construct(
297315
}
298316

299317
/**
300-
* A descriptive string that you create to describe the address. It can be up to 64 characters long.
318+
* A descriptive string that you create to describe the new address. It can be up to 64 characters long for Regulatory Compliance addresses and 32 characters long for Emergency addresses.
301319
*
302-
* @param string $friendlyName A descriptive string that you create to describe the address. It can be up to 64 characters long.
320+
* @param string $friendlyName A descriptive string that you create to describe the new address. It can be up to 64 characters long for Regulatory Compliance addresses and 32 characters long for Emergency addresses.
303321
* @return $this Fluent Builder
304322
*/
305323
public function setFriendlyName(string $friendlyName): self

src/Twilio/Rest/Api/V2010/Account/Call/TranscriptionOptions.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ abstract class TranscriptionOptions
3434
* @param string $speechModel Recognition model used by the transcription engine, among those supported by the provider
3535
* @param string $hints A Phrase contains words and phrase \\\"hints\\\" so that the speech recognition engine is more likely to recognize them.
3636
* @param bool $enableAutomaticPunctuation The provider will add punctuation to recognition result
37-
* @param string $intelligenceService The SID of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .
37+
* @param string $intelligenceService The SID or unique name of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .
3838
* @return CreateTranscriptionOptions Options builder
3939
*/
4040
public static function create(
@@ -93,7 +93,7 @@ class CreateTranscriptionOptions extends Options
9393
* @param string $speechModel Recognition model used by the transcription engine, among those supported by the provider
9494
* @param string $hints A Phrase contains words and phrase \\\"hints\\\" so that the speech recognition engine is more likely to recognize them.
9595
* @param bool $enableAutomaticPunctuation The provider will add punctuation to recognition result
96-
* @param string $intelligenceService The SID of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .
96+
* @param string $intelligenceService The SID or unique name of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .
9797
*/
9898
public function __construct(
9999

@@ -284,9 +284,9 @@ public function setEnableAutomaticPunctuation(bool $enableAutomaticPunctuation):
284284
}
285285

286286
/**
287-
* The SID of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .
287+
* The SID or unique name of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .
288288
*
289-
* @param string $intelligenceService The SID of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .
289+
* @param string $intelligenceService The SID or unique name of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .
290290
* @return $this Fluent Builder
291291
*/
292292
public function setIntelligenceService(string $intelligenceService): self

0 commit comments

Comments
 (0)