Skip to content

Commit 92c7822

Browse files
committed
[Librarian] Regenerated @ 38fb28edc02f73b8635b45a5612c5ae33eab39fe
1 parent 0959531 commit 92c7822

24 files changed

+1079
-136
lines changed

CHANGES.md

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

4+
[2023-08-24] Version 7.9.0
5+
--------------------------
6+
**Api**
7+
- Add new property `RiskCheck` for SMS pumping protection feature only (public beta to be available soon): Include this parameter with a value of `disable` to skip any kind of risk check on the respective message request
8+
9+
**Flex**
10+
- Changing `sid<UO>` path param to `sid<UT>` in interaction channel participant update endpoint **(breaking change)**
11+
12+
**Messaging**
13+
- Add Channel Sender api
14+
- Fixing country code docs and removing Zipwhip references
15+
16+
**Numbers**
17+
- Request status changed in numbers/v2/BulkHostedNumberOrders **(breaking change)**
18+
- Add bulk hosting orders API under version `/v2
19+
20+
421
[2023-08-10] Version 7.8.0
522
--------------------------
623
**Insights**

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct(
5353
/**
5454
* Create the MessageInstance
5555
*
56-
* @param string $to The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/sms/channels#channel-addresses), e.g. `whatsapp:+15552229999`.
56+
* @param string $to The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`.
5757
* @param array|Options $options Optional Arguments
5858
* @return MessageInstance Created MessageInstance
5959
* @throws TwilioException When an HTTP error occurs.
@@ -98,6 +98,8 @@ public function create(string $to, array $options = []): MessageInstance
9898
Serialize::booleanToString($options['sendAsMms']),
9999
'ContentVariables' =>
100100
$options['contentVariables'],
101+
'RiskCheck' =>
102+
$options['riskCheck'],
101103
'From' =>
102104
$options['from'],
103105
'MessagingServiceSid' =>

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

Lines changed: 27 additions & 11 deletions
Large diffs are not rendered by default.

src/Twilio/Rest/Conversations/V1/Service/Conversation/ParticipantOptions.php

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

src/Twilio/Rest/Media/V1/MediaProcessorList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public function __construct(
4747
/**
4848
* Create the MediaProcessorInstance
4949
*
50-
* @param string $extension The [Media Extension](/docs/live/api/media-extensions-overview) name or URL. Ex: `video-composer-v2`
51-
* @param string $extensionContext The context of the Media Extension, represented as a JSON dictionary. See the documentation for the specific [Media Extension](/docs/live/api/media-extensions-overview) you are using for more information about the context to send.
50+
* @param string $extension The [Media Extension](/docs/live/media-extensions-overview) name or URL. Ex: `video-composer-v2`
51+
* @param string $extensionContext The context of the Media Extension, represented as a JSON dictionary. See the documentation for the specific [Media Extension](/docs/live/media-extensions-overview) you are using for more information about the context to send.
5252
* @param array|Options $options Optional Arguments
5353
* @return MediaProcessorInstance Created MediaProcessorInstance
5454
* @throws TwilioException When an HTTP error occurs.

src/Twilio/Rest/Media/V1/MediaProcessorOptions.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
abstract class MediaProcessorOptions
2222
{
2323
/**
24-
* @param array $extensionEnvironment User-defined environment variables for the Media Extension, represented as a JSON dictionary of key/value strings. See the documentation for the specific [Media Extension](/docs/live/api/media-extensions-overview) you are using for more information about whether you need to provide this.
25-
* @param string $statusCallback The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/status-callbacks) for details.
24+
* @param array $extensionEnvironment User-defined environment variables for the Media Extension, represented as a JSON dictionary of key/value strings. See the documentation for the specific [Media Extension](/docs/live/media-extensions-overview) you are using for more information about whether you need to provide this.
25+
* @param string $statusCallback The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/api/status-callbacks) for details.
2626
* @param string $statusCallbackMethod The HTTP method Twilio should use to call the `status_callback` URL. Can be `POST` or `GET` and the default is `POST`.
2727
* @param int $maxDuration The maximum time, in seconds, that the MediaProcessor can run before automatically ends. The default value is 300 seconds, and the maximum value is 90000 seconds. Once this maximum duration is reached, Twilio will end the MediaProcessor, regardless of whether media is still streaming.
2828
* @return CreateMediaProcessorOptions Options builder
@@ -69,8 +69,8 @@ public static function read(
6969
class CreateMediaProcessorOptions extends Options
7070
{
7171
/**
72-
* @param array $extensionEnvironment User-defined environment variables for the Media Extension, represented as a JSON dictionary of key/value strings. See the documentation for the specific [Media Extension](/docs/live/api/media-extensions-overview) you are using for more information about whether you need to provide this.
73-
* @param string $statusCallback The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/status-callbacks) for details.
72+
* @param array $extensionEnvironment User-defined environment variables for the Media Extension, represented as a JSON dictionary of key/value strings. See the documentation for the specific [Media Extension](/docs/live/media-extensions-overview) you are using for more information about whether you need to provide this.
73+
* @param string $statusCallback The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/api/status-callbacks) for details.
7474
* @param string $statusCallbackMethod The HTTP method Twilio should use to call the `status_callback` URL. Can be `POST` or `GET` and the default is `POST`.
7575
* @param int $maxDuration The maximum time, in seconds, that the MediaProcessor can run before automatically ends. The default value is 300 seconds, and the maximum value is 90000 seconds. Once this maximum duration is reached, Twilio will end the MediaProcessor, regardless of whether media is still streaming.
7676
*/
@@ -89,9 +89,9 @@ public function __construct(
8989
}
9090

9191
/**
92-
* User-defined environment variables for the Media Extension, represented as a JSON dictionary of key/value strings. See the documentation for the specific [Media Extension](/docs/live/api/media-extensions-overview) you are using for more information about whether you need to provide this.
92+
* User-defined environment variables for the Media Extension, represented as a JSON dictionary of key/value strings. See the documentation for the specific [Media Extension](/docs/live/media-extensions-overview) you are using for more information about whether you need to provide this.
9393
*
94-
* @param array $extensionEnvironment User-defined environment variables for the Media Extension, represented as a JSON dictionary of key/value strings. See the documentation for the specific [Media Extension](/docs/live/api/media-extensions-overview) you are using for more information about whether you need to provide this.
94+
* @param array $extensionEnvironment User-defined environment variables for the Media Extension, represented as a JSON dictionary of key/value strings. See the documentation for the specific [Media Extension](/docs/live/media-extensions-overview) you are using for more information about whether you need to provide this.
9595
* @return $this Fluent Builder
9696
*/
9797
public function setExtensionEnvironment(array $extensionEnvironment): self
@@ -101,9 +101,9 @@ public function setExtensionEnvironment(array $extensionEnvironment): self
101101
}
102102

103103
/**
104-
* The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/status-callbacks) for details.
104+
* The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/api/status-callbacks) for details.
105105
*
106-
* @param string $statusCallback The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/status-callbacks) for details.
106+
* @param string $statusCallback The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/api/status-callbacks) for details.
107107
* @return $this Fluent Builder
108108
*/
109109
public function setStatusCallback(string $statusCallback): self

src/Twilio/Rest/Media/V1/PlayerStreamerOptions.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ abstract class PlayerStreamerOptions
2222
{
2323
/**
2424
* @param bool $video Specifies whether the PlayerStreamer is configured to stream video. Defaults to `true`.
25-
* @param string $statusCallback The URL to which Twilio will send asynchronous webhook requests for every PlayerStreamer event. See [Status Callbacks](/docs/live/status-callbacks) for more details.
25+
* @param string $statusCallback The URL to which Twilio will send asynchronous webhook requests for every PlayerStreamer event. See [Status Callbacks](/docs/live/api/status-callbacks) for more details.
2626
* @param string $statusCallbackMethod The HTTP method Twilio should use to call the `status_callback` URL. Can be `POST` or `GET` and the default is `POST`.
2727
* @param int $maxDuration The maximum time, in seconds, that the PlayerStreamer is active (`created` or `started`) before automatically ends. The default value is 300 seconds, and the maximum value is 90000 seconds. Once this maximum duration is reached, Twilio will end the PlayerStreamer, regardless of whether media is still streaming.
2828
* @return CreatePlayerStreamerOptions Options builder
@@ -70,7 +70,7 @@ class CreatePlayerStreamerOptions extends Options
7070
{
7171
/**
7272
* @param bool $video Specifies whether the PlayerStreamer is configured to stream video. Defaults to `true`.
73-
* @param string $statusCallback The URL to which Twilio will send asynchronous webhook requests for every PlayerStreamer event. See [Status Callbacks](/docs/live/status-callbacks) for more details.
73+
* @param string $statusCallback The URL to which Twilio will send asynchronous webhook requests for every PlayerStreamer event. See [Status Callbacks](/docs/live/api/status-callbacks) for more details.
7474
* @param string $statusCallbackMethod The HTTP method Twilio should use to call the `status_callback` URL. Can be `POST` or `GET` and the default is `POST`.
7575
* @param int $maxDuration The maximum time, in seconds, that the PlayerStreamer is active (`created` or `started`) before automatically ends. The default value is 300 seconds, and the maximum value is 90000 seconds. Once this maximum duration is reached, Twilio will end the PlayerStreamer, regardless of whether media is still streaming.
7676
*/
@@ -101,9 +101,9 @@ public function setVideo(bool $video): self
101101
}
102102

103103
/**
104-
* The URL to which Twilio will send asynchronous webhook requests for every PlayerStreamer event. See [Status Callbacks](/docs/live/status-callbacks) for more details.
104+
* The URL to which Twilio will send asynchronous webhook requests for every PlayerStreamer event. See [Status Callbacks](/docs/live/api/status-callbacks) for more details.
105105
*
106-
* @param string $statusCallback The URL to which Twilio will send asynchronous webhook requests for every PlayerStreamer event. See [Status Callbacks](/docs/live/status-callbacks) for more details.
106+
* @param string $statusCallback The URL to which Twilio will send asynchronous webhook requests for every PlayerStreamer event. See [Status Callbacks](/docs/live/api/status-callbacks) for more details.
107107
* @return $this Fluent Builder
108108
*/
109109
public function setStatusCallback(string $statusCallback): self
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<?php
2+
3+
/**
4+
* This code was generated by
5+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
6+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
7+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
8+
*
9+
* Twilio - Messaging
10+
* This is the public Twilio REST API.
11+
*
12+
* NOTE: This class is auto generated by OpenAPI Generator.
13+
* https://openapi-generator.tech
14+
* Do not edit the class manually.
15+
*/
16+
17+
18+
namespace Twilio\Rest\Messaging\V1\Service;
19+
20+
use Twilio\Exceptions\TwilioException;
21+
use Twilio\Version;
22+
use Twilio\InstanceContext;
23+
24+
25+
class ChannelSenderContext extends InstanceContext
26+
{
27+
/**
28+
* Initialize the ChannelSenderContext
29+
*
30+
* @param Version $version Version that contains the resource
31+
* @param string $messagingServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the resource from.
32+
* @param string $sid The SID of the ChannelSender resource to fetch.
33+
*/
34+
public function __construct(
35+
Version $version,
36+
$messagingServiceSid,
37+
$sid
38+
) {
39+
parent::__construct($version);
40+
41+
// Path Solution
42+
$this->solution = [
43+
'messagingServiceSid' =>
44+
$messagingServiceSid,
45+
'sid' =>
46+
$sid,
47+
];
48+
49+
$this->uri = '/Services/' . \rawurlencode($messagingServiceSid)
50+
.'/ChannelSenders/' . \rawurlencode($sid)
51+
.'';
52+
}
53+
54+
/**
55+
* Fetch the ChannelSenderInstance
56+
*
57+
* @return ChannelSenderInstance Fetched ChannelSenderInstance
58+
* @throws TwilioException When an HTTP error occurs.
59+
*/
60+
public function fetch(): ChannelSenderInstance
61+
{
62+
63+
$payload = $this->version->fetch('GET', $this->uri);
64+
65+
return new ChannelSenderInstance(
66+
$this->version,
67+
$payload,
68+
$this->solution['messagingServiceSid'],
69+
$this->solution['sid']
70+
);
71+
}
72+
73+
74+
/**
75+
* Provide a friendly representation
76+
*
77+
* @return string Machine friendly representation
78+
*/
79+
public function __toString(): string
80+
{
81+
$context = [];
82+
foreach ($this->solution as $key => $value) {
83+
$context[] = "$key=$value";
84+
}
85+
return '[Twilio.Messaging.V1.ChannelSenderContext ' . \implode(' ', $context) . ']';
86+
}
87+
}
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
<?php
2+
3+
/**
4+
* This code was generated by
5+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
6+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
7+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
8+
*
9+
* Twilio - Messaging
10+
* This is the public Twilio REST API.
11+
*
12+
* NOTE: This class is auto generated by OpenAPI Generator.
13+
* https://openapi-generator.tech
14+
* Do not edit the class manually.
15+
*/
16+
17+
18+
namespace Twilio\Rest\Messaging\V1\Service;
19+
20+
use Twilio\Exceptions\TwilioException;
21+
use Twilio\InstanceResource;
22+
use Twilio\Values;
23+
use Twilio\Version;
24+
use Twilio\Deserialize;
25+
26+
27+
/**
28+
* @property string|null $accountSid
29+
* @property string|null $messagingServiceSid
30+
* @property string|null $sid
31+
* @property string|null $sender
32+
* @property string|null $senderType
33+
* @property string|null $countryCode
34+
* @property \DateTime|null $dateCreated
35+
* @property \DateTime|null $dateUpdated
36+
* @property string|null $url
37+
*/
38+
class ChannelSenderInstance extends InstanceResource
39+
{
40+
/**
41+
* Initialize the ChannelSenderInstance
42+
*
43+
* @param Version $version Version that contains the resource
44+
* @param mixed[] $payload The response payload
45+
* @param string $messagingServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the resource from.
46+
* @param string $sid The SID of the ChannelSender resource to fetch.
47+
*/
48+
public function __construct(Version $version, array $payload, string $messagingServiceSid, string $sid = null)
49+
{
50+
parent::__construct($version);
51+
52+
// Marshaled Properties
53+
$this->properties = [
54+
'accountSid' => Values::array_get($payload, 'account_sid'),
55+
'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'),
56+
'sid' => Values::array_get($payload, 'sid'),
57+
'sender' => Values::array_get($payload, 'sender'),
58+
'senderType' => Values::array_get($payload, 'sender_type'),
59+
'countryCode' => Values::array_get($payload, 'country_code'),
60+
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
61+
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
62+
'url' => Values::array_get($payload, 'url'),
63+
];
64+
65+
$this->solution = ['messagingServiceSid' => $messagingServiceSid, 'sid' => $sid ?: $this->properties['sid'], ];
66+
}
67+
68+
/**
69+
* Generate an instance context for the instance, the context is capable of
70+
* performing various actions. All instance actions are proxied to the context
71+
*
72+
* @return ChannelSenderContext Context for this ChannelSenderInstance
73+
*/
74+
protected function proxy(): ChannelSenderContext
75+
{
76+
if (!$this->context) {
77+
$this->context = new ChannelSenderContext(
78+
$this->version,
79+
$this->solution['messagingServiceSid'],
80+
$this->solution['sid']
81+
);
82+
}
83+
84+
return $this->context;
85+
}
86+
87+
/**
88+
* Fetch the ChannelSenderInstance
89+
*
90+
* @return ChannelSenderInstance Fetched ChannelSenderInstance
91+
* @throws TwilioException When an HTTP error occurs.
92+
*/
93+
public function fetch(): ChannelSenderInstance
94+
{
95+
96+
return $this->proxy()->fetch();
97+
}
98+
99+
/**
100+
* Magic getter to access properties
101+
*
102+
* @param string $name Property to access
103+
* @return mixed The requested property
104+
* @throws TwilioException For unknown properties
105+
*/
106+
public function __get(string $name)
107+
{
108+
if (\array_key_exists($name, $this->properties)) {
109+
return $this->properties[$name];
110+
}
111+
112+
if (\property_exists($this, '_' . $name)) {
113+
$method = 'get' . \ucfirst($name);
114+
return $this->$method();
115+
}
116+
117+
throw new TwilioException('Unknown property: ' . $name);
118+
}
119+
120+
/**
121+
* Provide a friendly representation
122+
*
123+
* @return string Machine friendly representation
124+
*/
125+
public function __toString(): string
126+
{
127+
$context = [];
128+
foreach ($this->solution as $key => $value) {
129+
$context[] = "$key=$value";
130+
}
131+
return '[Twilio.Messaging.V1.ChannelSenderInstance ' . \implode(' ', $context) . ']';
132+
}
133+
}
134+

0 commit comments

Comments
 (0)