Skip to content

Commit 513ca5c

Browse files
committed
[Librarian] Regenerated @ 93a2de5505384cb61be7440d3563d93d5cf980df 5146479cf5e06841f2d634d763cfd8acec49eb7e
1 parent e634588 commit 513ca5c

20 files changed

+5107
-18
lines changed

CHANGES.md

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

4+
[2024-06-27] Version 8.2.1
5+
--------------------------
6+
**Library - Chore**
7+
- [PR #811](https://github.com/twilio/twilio-php/pull/811): fix contentType check in post and put. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
8+
9+
**Api**
10+
- Add `transcription` resource
11+
- Add beta feature request managed cert
12+
13+
**Flex**
14+
- Changed mount name for flex_team v2 api
15+
16+
**Intelligence**
17+
- Add `X-Rate-Limit-Limit`, `X-Rate-Limit-Remaining`, and `X-Rate-Limit-Config` as Response Headers to Operator resources
18+
19+
**Numbers**
20+
- Added include_constraints query parameter to the Regulations API
21+
22+
**Twiml**
23+
- Add support for `<Transcription>` noun
24+
25+
426
[2024-06-18] Version 8.2.0
527
--------------------------
628
**Library - Chore**
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?php
2+
3+
/**
4+
* This code was generated by
5+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
6+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
7+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
8+
*
9+
* Twilio - Api
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\Api\V2010\Account\Call;
19+
20+
use Twilio\Exceptions\TwilioException;
21+
use Twilio\Values;
22+
use Twilio\Version;
23+
use Twilio\InstanceContext;
24+
25+
26+
class TranscriptionContext extends InstanceContext
27+
{
28+
/**
29+
* Initialize the TranscriptionContext
30+
*
31+
* @param Version $version Version that contains the resource
32+
* @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Transcription resource.
33+
* @param string $callSid The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Transcription resource is associated with.
34+
* @param string $sid The SID of the Transcription resource, or the `name` used when creating the resource
35+
*/
36+
public function __construct(
37+
Version $version,
38+
$accountSid,
39+
$callSid,
40+
$sid
41+
) {
42+
parent::__construct($version);
43+
44+
// Path Solution
45+
$this->solution = [
46+
'accountSid' =>
47+
$accountSid,
48+
'callSid' =>
49+
$callSid,
50+
'sid' =>
51+
$sid,
52+
];
53+
54+
$this->uri = '/Accounts/' . \rawurlencode($accountSid)
55+
.'/Calls/' . \rawurlencode($callSid)
56+
.'/Transcriptions/' . \rawurlencode($sid)
57+
.'.json';
58+
}
59+
60+
/**
61+
* Update the TranscriptionInstance
62+
*
63+
* @param string $status
64+
* @return TranscriptionInstance Updated TranscriptionInstance
65+
* @throws TwilioException When an HTTP error occurs.
66+
*/
67+
public function update(string $status): TranscriptionInstance
68+
{
69+
70+
$data = Values::of([
71+
'Status' =>
72+
$status,
73+
]);
74+
75+
$headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
76+
$payload = $this->version->update('POST', $this->uri, [], $data, $headers);
77+
78+
return new TranscriptionInstance(
79+
$this->version,
80+
$payload,
81+
$this->solution['accountSid'],
82+
$this->solution['callSid'],
83+
$this->solution['sid']
84+
);
85+
}
86+
87+
88+
/**
89+
* Provide a friendly representation
90+
*
91+
* @return string Machine friendly representation
92+
*/
93+
public function __toString(): string
94+
{
95+
$context = [];
96+
foreach ($this->solution as $key => $value) {
97+
$context[] = "$key=$value";
98+
}
99+
return '[Twilio.Api.V2010.TranscriptionContext ' . \implode(' ', $context) . ']';
100+
}
101+
}
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
<?php
2+
3+
/**
4+
* This code was generated by
5+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
6+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
7+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
8+
*
9+
* Twilio - Api
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\Api\V2010\Account\Call;
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 $sid
29+
* @property string|null $accountSid
30+
* @property string|null $callSid
31+
* @property string|null $name
32+
* @property string $status
33+
* @property \DateTime|null $dateUpdated
34+
* @property string|null $uri
35+
*/
36+
class TranscriptionInstance extends InstanceResource
37+
{
38+
/**
39+
* Initialize the TranscriptionInstance
40+
*
41+
* @param Version $version Version that contains the resource
42+
* @param mixed[] $payload The response payload
43+
* @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Transcription resource.
44+
* @param string $callSid The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Transcription resource is associated with.
45+
* @param string $sid The SID of the Transcription resource, or the `name` used when creating the resource
46+
*/
47+
public function __construct(Version $version, array $payload, string $accountSid, string $callSid, string $sid = null)
48+
{
49+
parent::__construct($version);
50+
51+
// Marshaled Properties
52+
$this->properties = [
53+
'sid' => Values::array_get($payload, 'sid'),
54+
'accountSid' => Values::array_get($payload, 'account_sid'),
55+
'callSid' => Values::array_get($payload, 'call_sid'),
56+
'name' => Values::array_get($payload, 'name'),
57+
'status' => Values::array_get($payload, 'status'),
58+
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
59+
'uri' => Values::array_get($payload, 'uri'),
60+
];
61+
62+
$this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid ?: $this->properties['sid'], ];
63+
}
64+
65+
/**
66+
* Generate an instance context for the instance, the context is capable of
67+
* performing various actions. All instance actions are proxied to the context
68+
*
69+
* @return TranscriptionContext Context for this TranscriptionInstance
70+
*/
71+
protected function proxy(): TranscriptionContext
72+
{
73+
if (!$this->context) {
74+
$this->context = new TranscriptionContext(
75+
$this->version,
76+
$this->solution['accountSid'],
77+
$this->solution['callSid'],
78+
$this->solution['sid']
79+
);
80+
}
81+
82+
return $this->context;
83+
}
84+
85+
/**
86+
* Update the TranscriptionInstance
87+
*
88+
* @param string $status
89+
* @return TranscriptionInstance Updated TranscriptionInstance
90+
* @throws TwilioException When an HTTP error occurs.
91+
*/
92+
public function update(string $status): TranscriptionInstance
93+
{
94+
95+
return $this->proxy()->update($status);
96+
}
97+
98+
/**
99+
* Magic getter to access properties
100+
*
101+
* @param string $name Property to access
102+
* @return mixed The requested property
103+
* @throws TwilioException For unknown properties
104+
*/
105+
public function __get(string $name)
106+
{
107+
if (\array_key_exists($name, $this->properties)) {
108+
return $this->properties[$name];
109+
}
110+
111+
if (\property_exists($this, '_' . $name)) {
112+
$method = 'get' . \ucfirst($name);
113+
return $this->$method();
114+
}
115+
116+
throw new TwilioException('Unknown property: ' . $name);
117+
}
118+
119+
/**
120+
* Provide a friendly representation
121+
*
122+
* @return string Machine friendly representation
123+
*/
124+
public function __toString(): string
125+
{
126+
$context = [];
127+
foreach ($this->solution as $key => $value) {
128+
$context[] = "$key=$value";
129+
}
130+
return '[Twilio.Api.V2010.TranscriptionInstance ' . \implode(' ', $context) . ']';
131+
}
132+
}
133+

0 commit comments

Comments
 (0)