Skip to content

Commit 453ef37

Browse files
committed
[Librarian] Regenerated @ 45fa5159053e1c1f62f6d613f3b67a9239b43a5f 2551818144b7f525e66740ded45831b930db82b8
1 parent d05c08d commit 453ef37

16 files changed

+699
-29
lines changed

CHANGES.md

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

4+
[2024-12-05] Version 8.3.9
5+
--------------------------
6+
**Api**
7+
- Add optional parameter `intelligence_service` to `transcription`
8+
- Updated `phone_number_sid` to be populated for sip trunking terminating calls.
9+
10+
**Numbers**
11+
- Add Update Hosted Number Order V2 API endpoint
12+
- Update Port in docs
13+
14+
**Twiml**
15+
- Add optional parameter `intelligence_service` to `<Transcription>`
16+
- Add support for new `<ConversationRelay>` and `<Assistant>` noun
17+
- Add `events` attribute to `<Dial>` verb
18+
19+
420
[2024-11-15] Version 8.3.8
521
--------------------------
622
**Library - Chore**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ public function create(array $options = []): TranscriptionInstance
9494
$options['hints'],
9595
'EnableAutomaticPunctuation' =>
9696
Serialize::booleanToString($options['enableAutomaticPunctuation']),
97+
'IntelligenceService' =>
98+
$options['intelligenceService'],
9799
]);
98100

99101
$headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);

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

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +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 or the unique name of the [IntelligentService](https://www.twilio.com/docs/voice/intelligence/api/service-resource) to process the transcription.
3738
* @return CreateTranscriptionOptions Options builder
3839
*/
3940
public static function create(
@@ -50,7 +51,8 @@ public static function create(
5051
bool $profanityFilter = Values::BOOL_NONE,
5152
string $speechModel = Values::NONE,
5253
string $hints = Values::NONE,
53-
bool $enableAutomaticPunctuation = Values::BOOL_NONE
54+
bool $enableAutomaticPunctuation = Values::BOOL_NONE,
55+
string $intelligenceService = Values::NONE
5456

5557
): CreateTranscriptionOptions
5658
{
@@ -67,7 +69,8 @@ public static function create(
6769
$profanityFilter,
6870
$speechModel,
6971
$hints,
70-
$enableAutomaticPunctuation
72+
$enableAutomaticPunctuation,
73+
$intelligenceService
7174
);
7275
}
7376

@@ -90,6 +93,7 @@ class CreateTranscriptionOptions extends Options
9093
* @param string $speechModel Recognition model used by the transcription engine, among those supported by the provider
9194
* @param string $hints A Phrase contains words and phrase \\\"hints\\\" so that the speech recognition engine is more likely to recognize them.
9295
* @param bool $enableAutomaticPunctuation The provider will add punctuation to recognition result
96+
* @param string $intelligenceService The SID or the unique name of the [IntelligentService](https://www.twilio.com/docs/voice/intelligence/api/service-resource) to process the transcription.
9397
*/
9498
public function __construct(
9599

@@ -105,7 +109,8 @@ public function __construct(
105109
bool $profanityFilter = Values::BOOL_NONE,
106110
string $speechModel = Values::NONE,
107111
string $hints = Values::NONE,
108-
bool $enableAutomaticPunctuation = Values::BOOL_NONE
112+
bool $enableAutomaticPunctuation = Values::BOOL_NONE,
113+
string $intelligenceService = Values::NONE
109114

110115
) {
111116
$this->options['name'] = $name;
@@ -121,6 +126,7 @@ public function __construct(
121126
$this->options['speechModel'] = $speechModel;
122127
$this->options['hints'] = $hints;
123128
$this->options['enableAutomaticPunctuation'] = $enableAutomaticPunctuation;
129+
$this->options['intelligenceService'] = $intelligenceService;
124130
}
125131

126132
/**
@@ -277,6 +283,18 @@ public function setEnableAutomaticPunctuation(bool $enableAutomaticPunctuation):
277283
return $this;
278284
}
279285

286+
/**
287+
* The SID or the unique name of the [IntelligentService](https://www.twilio.com/docs/voice/intelligence/api/service-resource) to process the transcription.
288+
*
289+
* @param string $intelligenceService The SID or the unique name of the [IntelligentService](https://www.twilio.com/docs/voice/intelligence/api/service-resource) to process the transcription.
290+
* @return $this Fluent Builder
291+
*/
292+
public function setIntelligenceService(string $intelligenceService): self
293+
{
294+
$this->options['intelligenceService'] = $intelligenceService;
295+
return $this;
296+
}
297+
280298
/**
281299
* Provide a friendly representation
282300
*

src/Twilio/Rest/Numbers/V1.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
use Twilio\Rest\Numbers\V1\PortingPortabilityList;
2626
use Twilio\Rest\Numbers\V1\PortingWebhookConfigurationList;
2727
use Twilio\Rest\Numbers\V1\PortingWebhookConfigurationDeleteList;
28+
use Twilio\Rest\Numbers\V1\PortingWebhookConfigurationFetchList;
2829
use Twilio\Rest\Numbers\V1\SigningRequestConfigurationList;
29-
use Twilio\Rest\Numbers\V1\WebhookList;
3030
use Twilio\Version;
3131

3232
/**
@@ -37,8 +37,8 @@
3737
* @property PortingPortabilityList $portingPortabilities
3838
* @property PortingWebhookConfigurationList $portingWebhookConfigurations
3939
* @property PortingWebhookConfigurationDeleteList $portingWebhookConfigurationsDelete
40+
* @property PortingWebhookConfigurationFetchList $portingWebhookConfigurationFetch
4041
* @property SigningRequestConfigurationList $signingRequestConfigurations
41-
* @property WebhookList $webhook
4242
* @method \Twilio\Rest\Numbers\V1\BulkEligibilityContext bulkEligibilities(string $requestId)
4343
* @method \Twilio\Rest\Numbers\V1\PortingPortInContext portingPortIns(string $portInRequestSid)
4444
* @method \Twilio\Rest\Numbers\V1\PortingPortInPhoneNumberContext portingPortInPhoneNumber(string $portInRequestSid, string $phoneNumberSid)
@@ -54,8 +54,8 @@ class V1 extends Version
5454
protected $_portingPortabilities;
5555
protected $_portingWebhookConfigurations;
5656
protected $_portingWebhookConfigurationsDelete;
57+
protected $_portingWebhookConfigurationFetch;
5758
protected $_signingRequestConfigurations;
58-
protected $_webhook;
5959

6060
/**
6161
* Construct the V1 version of Numbers
@@ -124,20 +124,20 @@ protected function getPortingWebhookConfigurationsDelete(): PortingWebhookConfig
124124
return $this->_portingWebhookConfigurationsDelete;
125125
}
126126

127-
protected function getSigningRequestConfigurations(): SigningRequestConfigurationList
127+
protected function getPortingWebhookConfigurationFetch(): PortingWebhookConfigurationFetchList
128128
{
129-
if (!$this->_signingRequestConfigurations) {
130-
$this->_signingRequestConfigurations = new SigningRequestConfigurationList($this);
129+
if (!$this->_portingWebhookConfigurationFetch) {
130+
$this->_portingWebhookConfigurationFetch = new PortingWebhookConfigurationFetchList($this);
131131
}
132-
return $this->_signingRequestConfigurations;
132+
return $this->_portingWebhookConfigurationFetch;
133133
}
134134

135-
protected function getWebhook(): WebhookList
135+
protected function getSigningRequestConfigurations(): SigningRequestConfigurationList
136136
{
137-
if (!$this->_webhook) {
138-
$this->_webhook = new WebhookList($this);
137+
if (!$this->_signingRequestConfigurations) {
138+
$this->_signingRequestConfigurations = new SigningRequestConfigurationList($this);
139139
}
140-
return $this->_webhook;
140+
return $this->_signingRequestConfigurations;
141141
}
142142

143143
/**

src/Twilio/Rest/Numbers/V1/WebhookInstance.php renamed to src/Twilio/Rest/Numbers/V1/PortingWebhookConfigurationFetchInstance.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
* @property \DateTime|null $portInTargetDateCreated
3333
* @property \DateTime|null $portOutTargetDateCreated
3434
*/
35-
class WebhookInstance extends InstanceResource
35+
class PortingWebhookConfigurationFetchInstance extends InstanceResource
3636
{
3737
/**
38-
* Initialize the WebhookInstance
38+
* Initialize the PortingWebhookConfigurationFetchInstance
3939
*
4040
* @param Version $version Version that contains the resource
4141
* @param mixed[] $payload The response payload
@@ -85,7 +85,7 @@ public function __get(string $name)
8585
*/
8686
public function __toString(): string
8787
{
88-
return '[Twilio.Numbers.V1.WebhookInstance]';
88+
return '[Twilio.Numbers.V1.PortingWebhookConfigurationFetchInstance]';
8989
}
9090
}
9191

src/Twilio/Rest/Numbers/V1/WebhookList.php renamed to src/Twilio/Rest/Numbers/V1/PortingWebhookConfigurationFetchList.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
use Twilio\Version;
2323

2424

25-
class WebhookList extends ListResource
25+
class PortingWebhookConfigurationFetchList extends ListResource
2626
{
2727
/**
28-
* Construct the WebhookList
28+
* Construct the PortingWebhookConfigurationFetchList
2929
*
3030
* @param Version $version Version that contains the resource
3131
*/
@@ -42,18 +42,18 @@ public function __construct(
4242
}
4343

4444
/**
45-
* Fetch the WebhookInstance
45+
* Fetch the PortingWebhookConfigurationFetchInstance
4646
*
47-
* @return WebhookInstance Fetched WebhookInstance
47+
* @return PortingWebhookConfigurationFetchInstance Fetched PortingWebhookConfigurationFetchInstance
4848
* @throws TwilioException When an HTTP error occurs.
4949
*/
50-
public function fetch(): WebhookInstance
50+
public function fetch(): PortingWebhookConfigurationFetchInstance
5151
{
5252

5353
$headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
5454
$payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
5555

56-
return new WebhookInstance(
56+
return new PortingWebhookConfigurationFetchInstance(
5757
$this->version,
5858
$payload
5959
);
@@ -67,6 +67,6 @@ public function fetch(): WebhookInstance
6767
*/
6868
public function __toString(): string
6969
{
70-
return '[Twilio.Numbers.V1.WebhookList]';
70+
return '[Twilio.Numbers.V1.PortingWebhookConfigurationFetchList]';
7171
}
7272
}

src/Twilio/Rest/Numbers/V1/WebhookPage.php renamed to src/Twilio/Rest/Numbers/V1/PortingWebhookConfigurationFetchPage.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
use Twilio\Page;
2020
use Twilio\Version;
2121

22-
class WebhookPage extends Page
22+
class PortingWebhookConfigurationFetchPage extends Page
2323
{
2424
/**
2525
* @param Version $version Version that contains the resource
@@ -36,11 +36,11 @@ public function __construct(Version $version, Response $response, array $solutio
3636

3737
/**
3838
* @param array $payload Payload response from the API
39-
* @return WebhookInstance \Twilio\Rest\Numbers\V1\WebhookInstance
39+
* @return PortingWebhookConfigurationFetchInstance \Twilio\Rest\Numbers\V1\PortingWebhookConfigurationFetchInstance
4040
*/
41-
public function buildInstance(array $payload): WebhookInstance
41+
public function buildInstance(array $payload): PortingWebhookConfigurationFetchInstance
4242
{
43-
return new WebhookInstance($this->version, $payload);
43+
return new PortingWebhookConfigurationFetchInstance($this->version, $payload);
4444
}
4545

4646
/**
@@ -50,6 +50,6 @@ public function buildInstance(array $payload): WebhookInstance
5050
*/
5151
public function __toString(): string
5252
{
53-
return '[Twilio.Numbers.V1.WebhookPage]';
53+
return '[Twilio.Numbers.V1.PortingWebhookConfigurationFetchPage]';
5454
}
5555
}

src/Twilio/Rest/Numbers/V2/HostedNumberOrderContext.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
namespace Twilio\Rest\Numbers\V2;
1919

2020
use Twilio\Exceptions\TwilioException;
21+
use Twilio\Options;
2122
use Twilio\Values;
2223
use Twilio\Version;
2324
use Twilio\InstanceContext;
@@ -81,6 +82,39 @@ public function fetch(): HostedNumberOrderInstance
8182
}
8283

8384

85+
/**
86+
* Update the HostedNumberOrderInstance
87+
*
88+
* @param string $status
89+
* @param array|Options $options Optional Arguments
90+
* @return HostedNumberOrderInstance Updated HostedNumberOrderInstance
91+
* @throws TwilioException When an HTTP error occurs.
92+
*/
93+
public function update(string $status, array $options = []): HostedNumberOrderInstance
94+
{
95+
96+
$options = new Values($options);
97+
98+
$data = Values::of([
99+
'Status' =>
100+
$status,
101+
'VerificationCallDelay' =>
102+
$options['verificationCallDelay'],
103+
'VerificationCallExtension' =>
104+
$options['verificationCallExtension'],
105+
]);
106+
107+
$headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
108+
$payload = $this->version->update('POST', $this->uri, [], $data, $headers);
109+
110+
return new HostedNumberOrderInstance(
111+
$this->version,
112+
$payload,
113+
$this->solution['sid']
114+
);
115+
}
116+
117+
84118
/**
85119
* Provide a friendly representation
86120
*

src/Twilio/Rest/Numbers/V2/HostedNumberOrderInstance.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
use Twilio\Exceptions\TwilioException;
2121
use Twilio\InstanceResource;
22+
use Twilio\Options;
2223
use Twilio\Values;
2324
use Twilio\Version;
2425
use Twilio\Deserialize;
@@ -45,6 +46,12 @@
4546
* @property string|null $contactPhoneNumber
4647
* @property string|null $bulkHostingRequestSid
4748
* @property string|null $nextStep
49+
* @property int $verificationAttempts
50+
* @property string[]|null $verificationCallSids
51+
* @property int $verificationCallDelay
52+
* @property string|null $verificationCallExtension
53+
* @property string|null $verificationCode
54+
* @property string $verificationType
4855
*/
4956
class HostedNumberOrderInstance extends InstanceResource
5057
{
@@ -80,6 +87,12 @@ public function __construct(Version $version, array $payload, string $sid = null
8087
'contactPhoneNumber' => Values::array_get($payload, 'contact_phone_number'),
8188
'bulkHostingRequestSid' => Values::array_get($payload, 'bulk_hosting_request_sid'),
8289
'nextStep' => Values::array_get($payload, 'next_step'),
90+
'verificationAttempts' => Values::array_get($payload, 'verification_attempts'),
91+
'verificationCallSids' => Values::array_get($payload, 'verification_call_sids'),
92+
'verificationCallDelay' => Values::array_get($payload, 'verification_call_delay'),
93+
'verificationCallExtension' => Values::array_get($payload, 'verification_call_extension'),
94+
'verificationCode' => Values::array_get($payload, 'verification_code'),
95+
'verificationType' => Values::array_get($payload, 'verification_type'),
8396
];
8497

8598
$this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
@@ -127,6 +140,20 @@ public function fetch(): HostedNumberOrderInstance
127140
return $this->proxy()->fetch();
128141
}
129142

143+
/**
144+
* Update the HostedNumberOrderInstance
145+
*
146+
* @param string $status
147+
* @param array|Options $options Optional Arguments
148+
* @return HostedNumberOrderInstance Updated HostedNumberOrderInstance
149+
* @throws TwilioException When an HTTP error occurs.
150+
*/
151+
public function update(string $status, array $options = []): HostedNumberOrderInstance
152+
{
153+
154+
return $this->proxy()->update($status, $options);
155+
}
156+
130157
/**
131158
* Magic getter to access properties
132159
*

0 commit comments

Comments
 (0)