Skip to content

Commit

Permalink
[Librarian] Regenerated @ a412066ed53a791734369f33f4b2f579662850b3 e4…
Browse files Browse the repository at this point in the history
…3180215d9b6a7f705d187446184940bb3dfac1
  • Loading branch information
twilio-dx committed Jul 2, 2024
1 parent 7b85c1a commit 5b849ea
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 26 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
twilio-php Changelog
====================

[2024-07-02] Version 8.2.2
--------------------------
**Intelligence**
- Deprecate account flag api.twilio-intelligence.v2


[2024-06-27] Version 8.2.1
--------------------------
**Library - Chore**
Expand Down
22 changes: 11 additions & 11 deletions src/Twilio/Rest/Numbers/V1.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
use Twilio\Rest\Numbers\V1\PortingPortabilityList;
use Twilio\Rest\Numbers\V1\PortingWebhookConfigurationList;
use Twilio\Rest\Numbers\V1\PortingWebhookConfigurationDeleteList;
use Twilio\Rest\Numbers\V1\PortingWebhookConfigurationFetchList;
use Twilio\Rest\Numbers\V1\SigningRequestConfigurationList;
use Twilio\Rest\Numbers\V1\WebhookList;
use Twilio\Version;

/**
Expand All @@ -37,8 +37,8 @@
* @property PortingPortabilityList $portingPortabilities
* @property PortingWebhookConfigurationList $portingWebhookConfigurations
* @property PortingWebhookConfigurationDeleteList $portingWebhookConfigurationsDelete
* @property PortingWebhookConfigurationFetchList $portingWebhookConfigurationFetch
* @property SigningRequestConfigurationList $signingRequestConfigurations
* @property WebhookList $webhook
* @method \Twilio\Rest\Numbers\V1\BulkEligibilityContext bulkEligibilities(string $requestId)
* @method \Twilio\Rest\Numbers\V1\PortingPortInContext portingPortIns(string $portInRequestSid)
* @method \Twilio\Rest\Numbers\V1\PortingPortInPhoneNumberContext portingPortInPhoneNumber(string $portInRequestSid, string $phoneNumberSid)
Expand All @@ -54,8 +54,8 @@ class V1 extends Version
protected $_portingPortabilities;
protected $_portingWebhookConfigurations;
protected $_portingWebhookConfigurationsDelete;
protected $_portingWebhookConfigurationFetch;
protected $_signingRequestConfigurations;
protected $_webhook;

/**
* Construct the V1 version of Numbers
Expand Down Expand Up @@ -124,14 +124,6 @@ protected function getPortingWebhookConfigurationsDelete(): PortingWebhookConfig
return $this->_portingWebhookConfigurationsDelete;
}

protected function getPortingWebhookConfigurationFetch(): PortingWebhookConfigurationFetchList
{
if (!$this->_portingWebhookConfigurationFetch) {
$this->_portingWebhookConfigurationFetch = new PortingWebhookConfigurationFetchList($this);
}
return $this->_portingWebhookConfigurationFetch;
}

protected function getSigningRequestConfigurations(): SigningRequestConfigurationList
{
if (!$this->_signingRequestConfigurations) {
Expand All @@ -140,6 +132,14 @@ protected function getSigningRequestConfigurations(): SigningRequestConfiguratio
return $this->_signingRequestConfigurations;
}

protected function getWebhook(): WebhookList
{
if (!$this->_webhook) {
$this->_webhook = new WebhookList($this);
}
return $this->_webhook;
}

/**
* Magic getter to lazy load root resources
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
* @property \DateTime|null $portInTargetDateCreated
* @property \DateTime|null $portOutTargetDateCreated
*/
class PortingWebhookConfigurationFetchInstance extends InstanceResource
class WebhookInstance extends InstanceResource
{
/**
* Initialize the PortingWebhookConfigurationFetchInstance
* Initialize the WebhookInstance
*
* @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
Expand Down Expand Up @@ -85,7 +85,7 @@ public function __get(string $name)
*/
public function __toString(): string
{
return '[Twilio.Numbers.V1.PortingWebhookConfigurationFetchInstance]';
return '[Twilio.Numbers.V1.WebhookInstance]';
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
use Twilio\Version;


class PortingWebhookConfigurationFetchList extends ListResource
class WebhookList extends ListResource
{
/**
* Construct the PortingWebhookConfigurationFetchList
* Construct the WebhookList
*
* @param Version $version Version that contains the resource
*/
Expand All @@ -42,18 +42,18 @@ public function __construct(
}

/**
* Fetch the PortingWebhookConfigurationFetchInstance
* Fetch the WebhookInstance
*
* @return PortingWebhookConfigurationFetchInstance Fetched PortingWebhookConfigurationFetchInstance
* @return WebhookInstance Fetched WebhookInstance
* @throws TwilioException When an HTTP error occurs.
*/
public function fetch(): PortingWebhookConfigurationFetchInstance
public function fetch(): WebhookInstance
{

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

return new PortingWebhookConfigurationFetchInstance(
return new WebhookInstance(
$this->version,
$payload
);
Expand All @@ -67,6 +67,6 @@ public function fetch(): PortingWebhookConfigurationFetchInstance
*/
public function __toString(): string
{
return '[Twilio.Numbers.V1.PortingWebhookConfigurationFetchList]';
return '[Twilio.Numbers.V1.WebhookList]';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Twilio\Page;
use Twilio\Version;

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

/**
* @param array $payload Payload response from the API
* @return PortingWebhookConfigurationFetchInstance \Twilio\Rest\Numbers\V1\PortingWebhookConfigurationFetchInstance
* @return WebhookInstance \Twilio\Rest\Numbers\V1\WebhookInstance
*/
public function buildInstance(array $payload): PortingWebhookConfigurationFetchInstance
public function buildInstance(array $payload): WebhookInstance
{
return new PortingWebhookConfigurationFetchInstance($this->version, $payload);
return new WebhookInstance($this->version, $payload);
}

/**
Expand All @@ -50,6 +50,6 @@ public function buildInstance(array $payload): PortingWebhookConfigurationFetchI
*/
public function __toString(): string
{
return '[Twilio.Numbers.V1.PortingWebhookConfigurationFetchPage]';
return '[Twilio.Numbers.V1.WebhookPage]';
}
}

0 comments on commit 5b849ea

Please sign in to comment.