Subiendo proyecto completo sin restricciones de git ignore
This commit is contained in:
94
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1.php
vendored
Normal file
94
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1.php
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports;
|
||||
|
||||
use Twilio\Domain;
|
||||
use Twilio\Exceptions\TwilioException;
|
||||
use Twilio\InstanceContext;
|
||||
use Twilio\Rest\Bulkexports\V1\ExportConfigurationList;
|
||||
use Twilio\Rest\Bulkexports\V1\ExportList;
|
||||
use Twilio\Version;
|
||||
|
||||
/**
|
||||
* @property ExportList $exports
|
||||
* @property ExportConfigurationList $exportConfiguration
|
||||
* @method \Twilio\Rest\Bulkexports\V1\ExportContext exports(string $resourceType)
|
||||
* @method \Twilio\Rest\Bulkexports\V1\ExportConfigurationContext exportConfiguration(string $resourceType)
|
||||
*/
|
||||
class V1 extends Version {
|
||||
protected $_exports;
|
||||
protected $_exportConfiguration;
|
||||
|
||||
/**
|
||||
* Construct the V1 version of Bulkexports
|
||||
*
|
||||
* @param Domain $domain Domain that contains the version
|
||||
*/
|
||||
public function __construct(Domain $domain) {
|
||||
parent::__construct($domain);
|
||||
$this->version = 'v1';
|
||||
}
|
||||
|
||||
protected function getExports(): ExportList {
|
||||
if (!$this->_exports) {
|
||||
$this->_exports = new ExportList($this);
|
||||
}
|
||||
return $this->_exports;
|
||||
}
|
||||
|
||||
protected function getExportConfiguration(): ExportConfigurationList {
|
||||
if (!$this->_exportConfiguration) {
|
||||
$this->_exportConfiguration = new ExportConfigurationList($this);
|
||||
}
|
||||
return $this->_exportConfiguration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic getter to lazy load root resources
|
||||
*
|
||||
* @param string $name Resource to return
|
||||
* @return \Twilio\ListResource The requested resource
|
||||
* @throws TwilioException For unknown resource
|
||||
*/
|
||||
public function __get(string $name) {
|
||||
$method = 'get' . \ucfirst($name);
|
||||
if (\method_exists($this, $method)) {
|
||||
return $this->$method();
|
||||
}
|
||||
|
||||
throw new TwilioException('Unknown resource ' . $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic caller to get resource contexts
|
||||
*
|
||||
* @param string $name Resource to return
|
||||
* @param array $arguments Context parameters
|
||||
* @return InstanceContext The requested resource context
|
||||
* @throws TwilioException For unknown resource
|
||||
*/
|
||||
public function __call(string $name, array $arguments): InstanceContext {
|
||||
$property = $this->$name;
|
||||
if (\method_exists($property, 'getContext')) {
|
||||
return \call_user_func_array(array($property, 'getContext'), $arguments);
|
||||
}
|
||||
|
||||
throw new TwilioException('Resource does not have a context');
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
return '[Twilio.Bulkexports.V1]';
|
||||
}
|
||||
}
|
||||
64
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/DayContext.php
vendored
Normal file
64
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/DayContext.php
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1\Export;
|
||||
|
||||
use Twilio\Exceptions\TwilioException;
|
||||
use Twilio\InstanceContext;
|
||||
use Twilio\Values;
|
||||
use Twilio\Version;
|
||||
|
||||
class DayContext extends InstanceContext {
|
||||
/**
|
||||
* Initialize the DayContext
|
||||
*
|
||||
* @param Version $version Version that contains the resource
|
||||
* @param string $resourceType The type of communication – Messages, Calls,
|
||||
* Conferences, and Participants
|
||||
* @param string $day The date of the data in the file
|
||||
*/
|
||||
public function __construct(Version $version, $resourceType, $day) {
|
||||
parent::__construct($version);
|
||||
|
||||
// Path Solution
|
||||
$this->solution = ['resourceType' => $resourceType, 'day' => $day, ];
|
||||
|
||||
$this->uri = '/Exports/' . \rawurlencode($resourceType) . '/Days/' . \rawurlencode($day) . '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the DayInstance
|
||||
*
|
||||
* @return DayInstance Fetched DayInstance
|
||||
* @throws TwilioException When an HTTP error occurs.
|
||||
*/
|
||||
public function fetch(): DayInstance {
|
||||
$payload = $this->version->fetch('GET', $this->uri);
|
||||
|
||||
return new DayInstance(
|
||||
$this->version,
|
||||
$payload,
|
||||
$this->solution['resourceType'],
|
||||
$this->solution['day']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
$context = [];
|
||||
foreach ($this->solution as $key => $value) {
|
||||
$context[] = "$key=$value";
|
||||
}
|
||||
return '[Twilio.Bulkexports.V1.DayContext ' . \implode(' ', $context) . ']';
|
||||
}
|
||||
}
|
||||
111
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/DayInstance.php
vendored
Normal file
111
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/DayInstance.php
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1\Export;
|
||||
|
||||
use Twilio\Exceptions\TwilioException;
|
||||
use Twilio\InstanceResource;
|
||||
use Twilio\Values;
|
||||
use Twilio\Version;
|
||||
|
||||
/**
|
||||
* @property string $redirectTo
|
||||
* @property string $day
|
||||
* @property int $size
|
||||
* @property string $createDate
|
||||
* @property string $friendlyName
|
||||
* @property string $resourceType
|
||||
*/
|
||||
class DayInstance extends InstanceResource {
|
||||
/**
|
||||
* Initialize the DayInstance
|
||||
*
|
||||
* @param Version $version Version that contains the resource
|
||||
* @param mixed[] $payload The response payload
|
||||
* @param string $resourceType The type of communication – Messages, Calls,
|
||||
* Conferences, and Participants
|
||||
* @param string $day The date of the data in the file
|
||||
*/
|
||||
public function __construct(Version $version, array $payload, string $resourceType, string $day = null) {
|
||||
parent::__construct($version);
|
||||
|
||||
// Marshaled Properties
|
||||
$this->properties = [
|
||||
'redirectTo' => Values::array_get($payload, 'redirect_to'),
|
||||
'day' => Values::array_get($payload, 'day'),
|
||||
'size' => Values::array_get($payload, 'size'),
|
||||
'createDate' => Values::array_get($payload, 'create_date'),
|
||||
'friendlyName' => Values::array_get($payload, 'friendly_name'),
|
||||
'resourceType' => Values::array_get($payload, 'resource_type'),
|
||||
];
|
||||
|
||||
$this->solution = ['resourceType' => $resourceType, 'day' => $day ?: $this->properties['day'], ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate an instance context for the instance, the context is capable of
|
||||
* performing various actions. All instance actions are proxied to the context
|
||||
*
|
||||
* @return DayContext Context for this DayInstance
|
||||
*/
|
||||
protected function proxy(): DayContext {
|
||||
if (!$this->context) {
|
||||
$this->context = new DayContext(
|
||||
$this->version,
|
||||
$this->solution['resourceType'],
|
||||
$this->solution['day']
|
||||
);
|
||||
}
|
||||
|
||||
return $this->context;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the DayInstance
|
||||
*
|
||||
* @return DayInstance Fetched DayInstance
|
||||
* @throws TwilioException When an HTTP error occurs.
|
||||
*/
|
||||
public function fetch(): DayInstance {
|
||||
return $this->proxy()->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic getter to access properties
|
||||
*
|
||||
* @param string $name Property to access
|
||||
* @return mixed The requested property
|
||||
* @throws TwilioException For unknown properties
|
||||
*/
|
||||
public function __get(string $name) {
|
||||
if (\array_key_exists($name, $this->properties)) {
|
||||
return $this->properties[$name];
|
||||
}
|
||||
|
||||
if (\property_exists($this, '_' . $name)) {
|
||||
$method = 'get' . \ucfirst($name);
|
||||
return $this->$method();
|
||||
}
|
||||
|
||||
throw new TwilioException('Unknown property: ' . $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
$context = [];
|
||||
foreach ($this->solution as $key => $value) {
|
||||
$context[] = "$key=$value";
|
||||
}
|
||||
return '[Twilio.Bulkexports.V1.DayInstance ' . \implode(' ', $context) . ']';
|
||||
}
|
||||
}
|
||||
129
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/DayList.php
vendored
Normal file
129
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/DayList.php
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1\Export;
|
||||
|
||||
use Twilio\ListResource;
|
||||
use Twilio\Stream;
|
||||
use Twilio\Values;
|
||||
use Twilio\Version;
|
||||
|
||||
class DayList extends ListResource {
|
||||
/**
|
||||
* Construct the DayList
|
||||
*
|
||||
* @param Version $version Version that contains the resource
|
||||
* @param string $resourceType The type of communication – Messages, Calls,
|
||||
* Conferences, and Participants
|
||||
*/
|
||||
public function __construct(Version $version, string $resourceType) {
|
||||
parent::__construct($version);
|
||||
|
||||
// Path Solution
|
||||
$this->solution = ['resourceType' => $resourceType, ];
|
||||
|
||||
$this->uri = '/Exports/' . \rawurlencode($resourceType) . '/Days';
|
||||
}
|
||||
|
||||
/**
|
||||
* Streams DayInstance records from the API as a generator stream.
|
||||
* This operation lazily loads records as efficiently as possible until the
|
||||
* limit
|
||||
* is reached.
|
||||
* The results are returned as a generator, so this operation is memory
|
||||
* efficient.
|
||||
*
|
||||
* @param int $limit Upper limit for the number of records to return. stream()
|
||||
* guarantees to never return more than limit. Default is no
|
||||
* limit
|
||||
* @param mixed $pageSize Number of records to fetch per request, when not set
|
||||
* will use the default value of 50 records. If no
|
||||
* page_size is defined but a limit is defined, stream()
|
||||
* will attempt to read the limit with the most
|
||||
* efficient page size, i.e. min(limit, 1000)
|
||||
* @return Stream stream of results
|
||||
*/
|
||||
public function stream(int $limit = null, $pageSize = null): Stream {
|
||||
$limits = $this->version->readLimits($limit, $pageSize);
|
||||
|
||||
$page = $this->page($limits['pageSize']);
|
||||
|
||||
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads DayInstance records from the API as a list.
|
||||
* Unlike stream(), this operation is eager and will load `limit` records into
|
||||
* memory before returning.
|
||||
*
|
||||
* @param int $limit Upper limit for the number of records to return. read()
|
||||
* guarantees to never return more than limit. Default is no
|
||||
* limit
|
||||
* @param mixed $pageSize Number of records to fetch per request, when not set
|
||||
* will use the default value of 50 records. If no
|
||||
* page_size is defined but a limit is defined, read()
|
||||
* will attempt to read the limit with the most
|
||||
* efficient page size, i.e. min(limit, 1000)
|
||||
* @return DayInstance[] Array of results
|
||||
*/
|
||||
public function read(int $limit = null, $pageSize = null): array {
|
||||
return \iterator_to_array($this->stream($limit, $pageSize), false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single page of DayInstance records from the API.
|
||||
* Request is executed immediately
|
||||
*
|
||||
* @param mixed $pageSize Number of records to return, defaults to 50
|
||||
* @param string $pageToken PageToken provided by the API
|
||||
* @param mixed $pageNumber Page Number, this value is simply for client state
|
||||
* @return DayPage Page of DayInstance
|
||||
*/
|
||||
public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DayPage {
|
||||
$params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]);
|
||||
|
||||
$response = $this->version->page('GET', $this->uri, $params);
|
||||
|
||||
return new DayPage($this->version, $response, $this->solution);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a specific page of DayInstance records from the API.
|
||||
* Request is executed immediately
|
||||
*
|
||||
* @param string $targetUrl API-generated URL for the requested results page
|
||||
* @return DayPage Page of DayInstance
|
||||
*/
|
||||
public function getPage(string $targetUrl): DayPage {
|
||||
$response = $this->version->getDomain()->getClient()->request(
|
||||
'GET',
|
||||
$targetUrl
|
||||
);
|
||||
|
||||
return new DayPage($this->version, $response, $this->solution);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a DayContext
|
||||
*
|
||||
* @param string $day The date of the data in the file
|
||||
*/
|
||||
public function getContext(string $day): DayContext {
|
||||
return new DayContext($this->version, $this->solution['resourceType'], $day);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
return '[Twilio.Bulkexports.V1.DayList]';
|
||||
}
|
||||
}
|
||||
45
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/DayPage.php
vendored
Normal file
45
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/DayPage.php
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1\Export;
|
||||
|
||||
use Twilio\Http\Response;
|
||||
use Twilio\Page;
|
||||
use Twilio\Version;
|
||||
|
||||
class DayPage extends Page {
|
||||
/**
|
||||
* @param Version $version Version that contains the resource
|
||||
* @param Response $response Response from the API
|
||||
* @param array $solution The context solution
|
||||
*/
|
||||
public function __construct(Version $version, Response $response, array $solution) {
|
||||
parent::__construct($version, $response);
|
||||
|
||||
// Path Solution
|
||||
$this->solution = $solution;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $payload Payload response from the API
|
||||
* @return DayInstance \Twilio\Rest\Bulkexports\V1\Export\DayInstance
|
||||
*/
|
||||
public function buildInstance(array $payload): DayInstance {
|
||||
return new DayInstance($this->version, $payload, $this->solution['resourceType']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
return '[Twilio.Bulkexports.V1.DayPage]';
|
||||
}
|
||||
}
|
||||
88
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobInstance.php
vendored
Normal file
88
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobInstance.php
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1\Export;
|
||||
|
||||
use Twilio\Exceptions\TwilioException;
|
||||
use Twilio\InstanceResource;
|
||||
use Twilio\Values;
|
||||
use Twilio\Version;
|
||||
|
||||
/**
|
||||
* @property string $friendlyName
|
||||
* @property string $resourceType
|
||||
* @property string $startDay
|
||||
* @property string $endDay
|
||||
* @property string $webhookUrl
|
||||
* @property string $webhookMethod
|
||||
* @property string $email
|
||||
* @property string $jobSid
|
||||
* @property array $details
|
||||
* @property string $jobQueuePosition
|
||||
* @property string $estimatedCompletionTime
|
||||
*/
|
||||
class ExportCustomJobInstance extends InstanceResource {
|
||||
/**
|
||||
* Initialize the ExportCustomJobInstance
|
||||
*
|
||||
* @param Version $version Version that contains the resource
|
||||
* @param mixed[] $payload The response payload
|
||||
* @param string $resourceType The type of communication – Messages, Calls,
|
||||
* Conferences, and Participants
|
||||
*/
|
||||
public function __construct(Version $version, array $payload, string $resourceType) {
|
||||
parent::__construct($version);
|
||||
|
||||
// Marshaled Properties
|
||||
$this->properties = [
|
||||
'friendlyName' => Values::array_get($payload, 'friendly_name'),
|
||||
'resourceType' => Values::array_get($payload, 'resource_type'),
|
||||
'startDay' => Values::array_get($payload, 'start_day'),
|
||||
'endDay' => Values::array_get($payload, 'end_day'),
|
||||
'webhookUrl' => Values::array_get($payload, 'webhook_url'),
|
||||
'webhookMethod' => Values::array_get($payload, 'webhook_method'),
|
||||
'email' => Values::array_get($payload, 'email'),
|
||||
'jobSid' => Values::array_get($payload, 'job_sid'),
|
||||
'details' => Values::array_get($payload, 'details'),
|
||||
'jobQueuePosition' => Values::array_get($payload, 'job_queue_position'),
|
||||
'estimatedCompletionTime' => Values::array_get($payload, 'estimated_completion_time'),
|
||||
];
|
||||
|
||||
$this->solution = ['resourceType' => $resourceType, ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic getter to access properties
|
||||
*
|
||||
* @param string $name Property to access
|
||||
* @return mixed The requested property
|
||||
* @throws TwilioException For unknown properties
|
||||
*/
|
||||
public function __get(string $name) {
|
||||
if (\array_key_exists($name, $this->properties)) {
|
||||
return $this->properties[$name];
|
||||
}
|
||||
|
||||
if (\property_exists($this, '_' . $name)) {
|
||||
$method = 'get' . \ucfirst($name);
|
||||
return $this->$method();
|
||||
}
|
||||
|
||||
throw new TwilioException('Unknown property: ' . $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
return '[Twilio.Bulkexports.V1.ExportCustomJobInstance]';
|
||||
}
|
||||
}
|
||||
153
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobList.php
vendored
Normal file
153
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobList.php
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1\Export;
|
||||
|
||||
use Twilio\Exceptions\TwilioException;
|
||||
use Twilio\ListResource;
|
||||
use Twilio\Options;
|
||||
use Twilio\Stream;
|
||||
use Twilio\Values;
|
||||
use Twilio\Version;
|
||||
|
||||
class ExportCustomJobList extends ListResource {
|
||||
/**
|
||||
* Construct the ExportCustomJobList
|
||||
*
|
||||
* @param Version $version Version that contains the resource
|
||||
* @param string $resourceType The type of communication – Messages, Calls,
|
||||
* Conferences, and Participants
|
||||
*/
|
||||
public function __construct(Version $version, string $resourceType) {
|
||||
parent::__construct($version);
|
||||
|
||||
// Path Solution
|
||||
$this->solution = ['resourceType' => $resourceType, ];
|
||||
|
||||
$this->uri = '/Exports/' . \rawurlencode($resourceType) . '/Jobs';
|
||||
}
|
||||
|
||||
/**
|
||||
* Streams ExportCustomJobInstance records from the API as a generator stream.
|
||||
* This operation lazily loads records as efficiently as possible until the
|
||||
* limit
|
||||
* is reached.
|
||||
* The results are returned as a generator, so this operation is memory
|
||||
* efficient.
|
||||
*
|
||||
* @param int $limit Upper limit for the number of records to return. stream()
|
||||
* guarantees to never return more than limit. Default is no
|
||||
* limit
|
||||
* @param mixed $pageSize Number of records to fetch per request, when not set
|
||||
* will use the default value of 50 records. If no
|
||||
* page_size is defined but a limit is defined, stream()
|
||||
* will attempt to read the limit with the most
|
||||
* efficient page size, i.e. min(limit, 1000)
|
||||
* @return Stream stream of results
|
||||
*/
|
||||
public function stream(int $limit = null, $pageSize = null): Stream {
|
||||
$limits = $this->version->readLimits($limit, $pageSize);
|
||||
|
||||
$page = $this->page($limits['pageSize']);
|
||||
|
||||
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads ExportCustomJobInstance records from the API as a list.
|
||||
* Unlike stream(), this operation is eager and will load `limit` records into
|
||||
* memory before returning.
|
||||
*
|
||||
* @param int $limit Upper limit for the number of records to return. read()
|
||||
* guarantees to never return more than limit. Default is no
|
||||
* limit
|
||||
* @param mixed $pageSize Number of records to fetch per request, when not set
|
||||
* will use the default value of 50 records. If no
|
||||
* page_size is defined but a limit is defined, read()
|
||||
* will attempt to read the limit with the most
|
||||
* efficient page size, i.e. min(limit, 1000)
|
||||
* @return ExportCustomJobInstance[] Array of results
|
||||
*/
|
||||
public function read(int $limit = null, $pageSize = null): array {
|
||||
return \iterator_to_array($this->stream($limit, $pageSize), false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single page of ExportCustomJobInstance records from the API.
|
||||
* Request is executed immediately
|
||||
*
|
||||
* @param mixed $pageSize Number of records to return, defaults to 50
|
||||
* @param string $pageToken PageToken provided by the API
|
||||
* @param mixed $pageNumber Page Number, this value is simply for client state
|
||||
* @return ExportCustomJobPage Page of ExportCustomJobInstance
|
||||
*/
|
||||
public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ExportCustomJobPage {
|
||||
$params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]);
|
||||
|
||||
$response = $this->version->page('GET', $this->uri, $params);
|
||||
|
||||
return new ExportCustomJobPage($this->version, $response, $this->solution);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a specific page of ExportCustomJobInstance records from the API.
|
||||
* Request is executed immediately
|
||||
*
|
||||
* @param string $targetUrl API-generated URL for the requested results page
|
||||
* @return ExportCustomJobPage Page of ExportCustomJobInstance
|
||||
*/
|
||||
public function getPage(string $targetUrl): ExportCustomJobPage {
|
||||
$response = $this->version->getDomain()->getClient()->request(
|
||||
'GET',
|
||||
$targetUrl
|
||||
);
|
||||
|
||||
return new ExportCustomJobPage($this->version, $response, $this->solution);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the ExportCustomJobInstance
|
||||
*
|
||||
* @param string $startDay The start day for the custom export specified as a
|
||||
* string in the format of yyyy-mm-dd
|
||||
* @param string $endDay The end day for the custom export specified as a
|
||||
* string in the format of yyyy-mm-dd. End day is
|
||||
* inclusive and must be 2 days earlier than the current
|
||||
* UTC day.
|
||||
* @param string $friendlyName The friendly name specified when creating the job
|
||||
* @param array|Options $options Optional Arguments
|
||||
* @return ExportCustomJobInstance Created ExportCustomJobInstance
|
||||
* @throws TwilioException When an HTTP error occurs.
|
||||
*/
|
||||
public function create(string $startDay, string $endDay, string $friendlyName, array $options = []): ExportCustomJobInstance {
|
||||
$options = new Values($options);
|
||||
|
||||
$data = Values::of([
|
||||
'StartDay' => $startDay,
|
||||
'EndDay' => $endDay,
|
||||
'FriendlyName' => $friendlyName,
|
||||
'WebhookUrl' => $options['webhookUrl'],
|
||||
'WebhookMethod' => $options['webhookMethod'],
|
||||
'Email' => $options['email'],
|
||||
]);
|
||||
|
||||
$payload = $this->version->create('POST', $this->uri, [], $data);
|
||||
|
||||
return new ExportCustomJobInstance($this->version, $payload, $this->solution['resourceType']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
return '[Twilio.Bulkexports.V1.ExportCustomJobList]';
|
||||
}
|
||||
}
|
||||
96
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobOptions.php
vendored
Normal file
96
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobOptions.php
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1\Export;
|
||||
|
||||
use Twilio\Options;
|
||||
use Twilio\Values;
|
||||
|
||||
abstract class ExportCustomJobOptions {
|
||||
/**
|
||||
* @param string $webhookUrl The optional webhook url called on completion of
|
||||
* the job. If this is supplied, `WebhookMethod` must
|
||||
* also be supplied.
|
||||
* @param string $webhookMethod This is the method used to call the webhook on
|
||||
* completion of the job. If this is supplied,
|
||||
* `WebhookUrl` must also be supplied.
|
||||
* @param string $email The optional email to send the completion notification
|
||||
* to
|
||||
* @return CreateExportCustomJobOptions Options builder
|
||||
*/
|
||||
public static function create(string $webhookUrl = Values::NONE, string $webhookMethod = Values::NONE, string $email = Values::NONE): CreateExportCustomJobOptions {
|
||||
return new CreateExportCustomJobOptions($webhookUrl, $webhookMethod, $email);
|
||||
}
|
||||
}
|
||||
|
||||
class CreateExportCustomJobOptions extends Options {
|
||||
/**
|
||||
* @param string $webhookUrl The optional webhook url called on completion of
|
||||
* the job. If this is supplied, `WebhookMethod` must
|
||||
* also be supplied.
|
||||
* @param string $webhookMethod This is the method used to call the webhook on
|
||||
* completion of the job. If this is supplied,
|
||||
* `WebhookUrl` must also be supplied.
|
||||
* @param string $email The optional email to send the completion notification
|
||||
* to
|
||||
*/
|
||||
public function __construct(string $webhookUrl = Values::NONE, string $webhookMethod = Values::NONE, string $email = Values::NONE) {
|
||||
$this->options['webhookUrl'] = $webhookUrl;
|
||||
$this->options['webhookMethod'] = $webhookMethod;
|
||||
$this->options['email'] = $email;
|
||||
}
|
||||
|
||||
/**
|
||||
* The optional webhook url called on completion of the job. If this is supplied, `WebhookMethod` must also be supplied. If you set neither webhook nor email, you will have to check your job's status manually.
|
||||
*
|
||||
* @param string $webhookUrl The optional webhook url called on completion of
|
||||
* the job. If this is supplied, `WebhookMethod` must
|
||||
* also be supplied.
|
||||
* @return $this Fluent Builder
|
||||
*/
|
||||
public function setWebhookUrl(string $webhookUrl): self {
|
||||
$this->options['webhookUrl'] = $webhookUrl;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the method used to call the webhook on completion of the job. If this is supplied, `WebhookUrl` must also be supplied.
|
||||
*
|
||||
* @param string $webhookMethod This is the method used to call the webhook on
|
||||
* completion of the job. If this is supplied,
|
||||
* `WebhookUrl` must also be supplied.
|
||||
* @return $this Fluent Builder
|
||||
*/
|
||||
public function setWebhookMethod(string $webhookMethod): self {
|
||||
$this->options['webhookMethod'] = $webhookMethod;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The optional email to send the completion notification to. You can set both webhook, and email, or one or the other. If you set neither, the job will run but you will have to query to determine your job's status.
|
||||
*
|
||||
* @param string $email The optional email to send the completion notification
|
||||
* to
|
||||
* @return $this Fluent Builder
|
||||
*/
|
||||
public function setEmail(string $email): self {
|
||||
$this->options['email'] = $email;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
$options = \http_build_query(Values::of($this->options), '', ' ');
|
||||
return '[Twilio.Bulkexports.V1.CreateExportCustomJobOptions ' . $options . ']';
|
||||
}
|
||||
}
|
||||
45
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobPage.php
vendored
Normal file
45
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobPage.php
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1\Export;
|
||||
|
||||
use Twilio\Http\Response;
|
||||
use Twilio\Page;
|
||||
use Twilio\Version;
|
||||
|
||||
class ExportCustomJobPage extends Page {
|
||||
/**
|
||||
* @param Version $version Version that contains the resource
|
||||
* @param Response $response Response from the API
|
||||
* @param array $solution The context solution
|
||||
*/
|
||||
public function __construct(Version $version, Response $response, array $solution) {
|
||||
parent::__construct($version, $response);
|
||||
|
||||
// Path Solution
|
||||
$this->solution = $solution;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $payload Payload response from the API
|
||||
* @return ExportCustomJobInstance \Twilio\Rest\Bulkexports\V1\Export\ExportCustomJobInstance
|
||||
*/
|
||||
public function buildInstance(array $payload): ExportCustomJobInstance {
|
||||
return new ExportCustomJobInstance($this->version, $payload, $this->solution['resourceType']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
return '[Twilio.Bulkexports.V1.ExportCustomJobPage]';
|
||||
}
|
||||
}
|
||||
68
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/JobContext.php
vendored
Normal file
68
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/JobContext.php
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1\Export;
|
||||
|
||||
use Twilio\Exceptions\TwilioException;
|
||||
use Twilio\InstanceContext;
|
||||
use Twilio\Values;
|
||||
use Twilio\Version;
|
||||
|
||||
class JobContext extends InstanceContext {
|
||||
/**
|
||||
* Initialize the JobContext
|
||||
*
|
||||
* @param Version $version Version that contains the resource
|
||||
* @param string $jobSid The unique string that that we created to identify the
|
||||
* Bulk Export job
|
||||
*/
|
||||
public function __construct(Version $version, $jobSid) {
|
||||
parent::__construct($version);
|
||||
|
||||
// Path Solution
|
||||
$this->solution = ['jobSid' => $jobSid, ];
|
||||
|
||||
$this->uri = '/Exports/Jobs/' . \rawurlencode($jobSid) . '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the JobInstance
|
||||
*
|
||||
* @return JobInstance Fetched JobInstance
|
||||
* @throws TwilioException When an HTTP error occurs.
|
||||
*/
|
||||
public function fetch(): JobInstance {
|
||||
$payload = $this->version->fetch('GET', $this->uri);
|
||||
|
||||
return new JobInstance($this->version, $payload, $this->solution['jobSid']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the JobInstance
|
||||
*
|
||||
* @return bool True if delete succeeds, false otherwise
|
||||
* @throws TwilioException When an HTTP error occurs.
|
||||
*/
|
||||
public function delete(): bool {
|
||||
return $this->version->delete('DELETE', $this->uri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
$context = [];
|
||||
foreach ($this->solution as $key => $value) {
|
||||
$context[] = "$key=$value";
|
||||
}
|
||||
return '[Twilio.Bulkexports.V1.JobContext ' . \implode(' ', $context) . ']';
|
||||
}
|
||||
}
|
||||
128
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/JobInstance.php
vendored
Normal file
128
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/JobInstance.php
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1\Export;
|
||||
|
||||
use Twilio\Exceptions\TwilioException;
|
||||
use Twilio\InstanceResource;
|
||||
use Twilio\Values;
|
||||
use Twilio\Version;
|
||||
|
||||
/**
|
||||
* @property string $resourceType
|
||||
* @property string $friendlyName
|
||||
* @property array $details
|
||||
* @property string $startDay
|
||||
* @property string $endDay
|
||||
* @property string $jobSid
|
||||
* @property string $webhookUrl
|
||||
* @property string $webhookMethod
|
||||
* @property string $email
|
||||
* @property string $url
|
||||
* @property string $jobQueuePosition
|
||||
* @property string $estimatedCompletionTime
|
||||
*/
|
||||
class JobInstance extends InstanceResource {
|
||||
/**
|
||||
* Initialize the JobInstance
|
||||
*
|
||||
* @param Version $version Version that contains the resource
|
||||
* @param mixed[] $payload The response payload
|
||||
* @param string $jobSid The unique string that that we created to identify the
|
||||
* Bulk Export job
|
||||
*/
|
||||
public function __construct(Version $version, array $payload, string $jobSid = null) {
|
||||
parent::__construct($version);
|
||||
|
||||
// Marshaled Properties
|
||||
$this->properties = [
|
||||
'resourceType' => Values::array_get($payload, 'resource_type'),
|
||||
'friendlyName' => Values::array_get($payload, 'friendly_name'),
|
||||
'details' => Values::array_get($payload, 'details'),
|
||||
'startDay' => Values::array_get($payload, 'start_day'),
|
||||
'endDay' => Values::array_get($payload, 'end_day'),
|
||||
'jobSid' => Values::array_get($payload, 'job_sid'),
|
||||
'webhookUrl' => Values::array_get($payload, 'webhook_url'),
|
||||
'webhookMethod' => Values::array_get($payload, 'webhook_method'),
|
||||
'email' => Values::array_get($payload, 'email'),
|
||||
'url' => Values::array_get($payload, 'url'),
|
||||
'jobQueuePosition' => Values::array_get($payload, 'job_queue_position'),
|
||||
'estimatedCompletionTime' => Values::array_get($payload, 'estimated_completion_time'),
|
||||
];
|
||||
|
||||
$this->solution = ['jobSid' => $jobSid ?: $this->properties['jobSid'], ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate an instance context for the instance, the context is capable of
|
||||
* performing various actions. All instance actions are proxied to the context
|
||||
*
|
||||
* @return JobContext Context for this JobInstance
|
||||
*/
|
||||
protected function proxy(): JobContext {
|
||||
if (!$this->context) {
|
||||
$this->context = new JobContext($this->version, $this->solution['jobSid']);
|
||||
}
|
||||
|
||||
return $this->context;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the JobInstance
|
||||
*
|
||||
* @return JobInstance Fetched JobInstance
|
||||
* @throws TwilioException When an HTTP error occurs.
|
||||
*/
|
||||
public function fetch(): JobInstance {
|
||||
return $this->proxy()->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the JobInstance
|
||||
*
|
||||
* @return bool True if delete succeeds, false otherwise
|
||||
* @throws TwilioException When an HTTP error occurs.
|
||||
*/
|
||||
public function delete(): bool {
|
||||
return $this->proxy()->delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic getter to access properties
|
||||
*
|
||||
* @param string $name Property to access
|
||||
* @return mixed The requested property
|
||||
* @throws TwilioException For unknown properties
|
||||
*/
|
||||
public function __get(string $name) {
|
||||
if (\array_key_exists($name, $this->properties)) {
|
||||
return $this->properties[$name];
|
||||
}
|
||||
|
||||
if (\property_exists($this, '_' . $name)) {
|
||||
$method = 'get' . \ucfirst($name);
|
||||
return $this->$method();
|
||||
}
|
||||
|
||||
throw new TwilioException('Unknown property: ' . $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
$context = [];
|
||||
foreach ($this->solution as $key => $value) {
|
||||
$context[] = "$key=$value";
|
||||
}
|
||||
return '[Twilio.Bulkexports.V1.JobInstance ' . \implode(' ', $context) . ']';
|
||||
}
|
||||
}
|
||||
46
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/JobList.php
vendored
Normal file
46
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/JobList.php
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1\Export;
|
||||
|
||||
use Twilio\ListResource;
|
||||
use Twilio\Version;
|
||||
|
||||
class JobList extends ListResource {
|
||||
/**
|
||||
* Construct the JobList
|
||||
*
|
||||
* @param Version $version Version that contains the resource
|
||||
*/
|
||||
public function __construct(Version $version) {
|
||||
parent::__construct($version);
|
||||
|
||||
// Path Solution
|
||||
$this->solution = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a JobContext
|
||||
*
|
||||
* @param string $jobSid The unique string that that we created to identify the
|
||||
* Bulk Export job
|
||||
*/
|
||||
public function getContext(string $jobSid): JobContext {
|
||||
return new JobContext($this->version, $jobSid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
return '[Twilio.Bulkexports.V1.JobList]';
|
||||
}
|
||||
}
|
||||
45
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/JobPage.php
vendored
Normal file
45
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/Export/JobPage.php
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1\Export;
|
||||
|
||||
use Twilio\Http\Response;
|
||||
use Twilio\Page;
|
||||
use Twilio\Version;
|
||||
|
||||
class JobPage extends Page {
|
||||
/**
|
||||
* @param Version $version Version that contains the resource
|
||||
* @param Response $response Response from the API
|
||||
* @param array $solution The context solution
|
||||
*/
|
||||
public function __construct(Version $version, Response $response, array $solution) {
|
||||
parent::__construct($version, $response);
|
||||
|
||||
// Path Solution
|
||||
$this->solution = $solution;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $payload Payload response from the API
|
||||
* @return JobInstance \Twilio\Rest\Bulkexports\V1\Export\JobInstance
|
||||
*/
|
||||
public function buildInstance(array $payload): JobInstance {
|
||||
return new JobInstance($this->version, $payload);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
return '[Twilio.Bulkexports.V1.JobPage]';
|
||||
}
|
||||
}
|
||||
81
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationContext.php
vendored
Normal file
81
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationContext.php
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1;
|
||||
|
||||
use Twilio\Exceptions\TwilioException;
|
||||
use Twilio\InstanceContext;
|
||||
use Twilio\Options;
|
||||
use Twilio\Serialize;
|
||||
use Twilio\Values;
|
||||
use Twilio\Version;
|
||||
|
||||
class ExportConfigurationContext extends InstanceContext {
|
||||
/**
|
||||
* Initialize the ExportConfigurationContext
|
||||
*
|
||||
* @param Version $version Version that contains the resource
|
||||
* @param string $resourceType The type of communication – Messages, Calls,
|
||||
* Conferences, and Participants
|
||||
*/
|
||||
public function __construct(Version $version, $resourceType) {
|
||||
parent::__construct($version);
|
||||
|
||||
// Path Solution
|
||||
$this->solution = ['resourceType' => $resourceType, ];
|
||||
|
||||
$this->uri = '/Exports/' . \rawurlencode($resourceType) . '/Configuration';
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the ExportConfigurationInstance
|
||||
*
|
||||
* @return ExportConfigurationInstance Fetched ExportConfigurationInstance
|
||||
* @throws TwilioException When an HTTP error occurs.
|
||||
*/
|
||||
public function fetch(): ExportConfigurationInstance {
|
||||
$payload = $this->version->fetch('GET', $this->uri);
|
||||
|
||||
return new ExportConfigurationInstance($this->version, $payload, $this->solution['resourceType']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the ExportConfigurationInstance
|
||||
*
|
||||
* @param array|Options $options Optional Arguments
|
||||
* @return ExportConfigurationInstance Updated ExportConfigurationInstance
|
||||
* @throws TwilioException When an HTTP error occurs.
|
||||
*/
|
||||
public function update(array $options = []): ExportConfigurationInstance {
|
||||
$options = new Values($options);
|
||||
|
||||
$data = Values::of([
|
||||
'Enabled' => Serialize::booleanToString($options['enabled']),
|
||||
'WebhookUrl' => $options['webhookUrl'],
|
||||
'WebhookMethod' => $options['webhookMethod'],
|
||||
]);
|
||||
|
||||
$payload = $this->version->update('POST', $this->uri, [], $data);
|
||||
|
||||
return new ExportConfigurationInstance($this->version, $payload, $this->solution['resourceType']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
$context = [];
|
||||
foreach ($this->solution as $key => $value) {
|
||||
$context[] = "$key=$value";
|
||||
}
|
||||
return '[Twilio.Bulkexports.V1.ExportConfigurationContext ' . \implode(' ', $context) . ']';
|
||||
}
|
||||
}
|
||||
117
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationInstance.php
vendored
Normal file
117
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationInstance.php
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1;
|
||||
|
||||
use Twilio\Exceptions\TwilioException;
|
||||
use Twilio\InstanceResource;
|
||||
use Twilio\Options;
|
||||
use Twilio\Values;
|
||||
use Twilio\Version;
|
||||
|
||||
/**
|
||||
* @property bool $enabled
|
||||
* @property string $webhookUrl
|
||||
* @property string $webhookMethod
|
||||
* @property string $resourceType
|
||||
* @property string $url
|
||||
*/
|
||||
class ExportConfigurationInstance extends InstanceResource {
|
||||
/**
|
||||
* Initialize the ExportConfigurationInstance
|
||||
*
|
||||
* @param Version $version Version that contains the resource
|
||||
* @param mixed[] $payload The response payload
|
||||
* @param string $resourceType The type of communication – Messages, Calls,
|
||||
* Conferences, and Participants
|
||||
*/
|
||||
public function __construct(Version $version, array $payload, string $resourceType = null) {
|
||||
parent::__construct($version);
|
||||
|
||||
// Marshaled Properties
|
||||
$this->properties = [
|
||||
'enabled' => Values::array_get($payload, 'enabled'),
|
||||
'webhookUrl' => Values::array_get($payload, 'webhook_url'),
|
||||
'webhookMethod' => Values::array_get($payload, 'webhook_method'),
|
||||
'resourceType' => Values::array_get($payload, 'resource_type'),
|
||||
'url' => Values::array_get($payload, 'url'),
|
||||
];
|
||||
|
||||
$this->solution = ['resourceType' => $resourceType ?: $this->properties['resourceType'], ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate an instance context for the instance, the context is capable of
|
||||
* performing various actions. All instance actions are proxied to the context
|
||||
*
|
||||
* @return ExportConfigurationContext Context for this
|
||||
* ExportConfigurationInstance
|
||||
*/
|
||||
protected function proxy(): ExportConfigurationContext {
|
||||
if (!$this->context) {
|
||||
$this->context = new ExportConfigurationContext($this->version, $this->solution['resourceType']);
|
||||
}
|
||||
|
||||
return $this->context;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the ExportConfigurationInstance
|
||||
*
|
||||
* @return ExportConfigurationInstance Fetched ExportConfigurationInstance
|
||||
* @throws TwilioException When an HTTP error occurs.
|
||||
*/
|
||||
public function fetch(): ExportConfigurationInstance {
|
||||
return $this->proxy()->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the ExportConfigurationInstance
|
||||
*
|
||||
* @param array|Options $options Optional Arguments
|
||||
* @return ExportConfigurationInstance Updated ExportConfigurationInstance
|
||||
* @throws TwilioException When an HTTP error occurs.
|
||||
*/
|
||||
public function update(array $options = []): ExportConfigurationInstance {
|
||||
return $this->proxy()->update($options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic getter to access properties
|
||||
*
|
||||
* @param string $name Property to access
|
||||
* @return mixed The requested property
|
||||
* @throws TwilioException For unknown properties
|
||||
*/
|
||||
public function __get(string $name) {
|
||||
if (\array_key_exists($name, $this->properties)) {
|
||||
return $this->properties[$name];
|
||||
}
|
||||
|
||||
if (\property_exists($this, '_' . $name)) {
|
||||
$method = 'get' . \ucfirst($name);
|
||||
return $this->$method();
|
||||
}
|
||||
|
||||
throw new TwilioException('Unknown property: ' . $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
$context = [];
|
||||
foreach ($this->solution as $key => $value) {
|
||||
$context[] = "$key=$value";
|
||||
}
|
||||
return '[Twilio.Bulkexports.V1.ExportConfigurationInstance ' . \implode(' ', $context) . ']';
|
||||
}
|
||||
}
|
||||
46
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationList.php
vendored
Normal file
46
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationList.php
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1;
|
||||
|
||||
use Twilio\ListResource;
|
||||
use Twilio\Version;
|
||||
|
||||
class ExportConfigurationList extends ListResource {
|
||||
/**
|
||||
* Construct the ExportConfigurationList
|
||||
*
|
||||
* @param Version $version Version that contains the resource
|
||||
*/
|
||||
public function __construct(Version $version) {
|
||||
parent::__construct($version);
|
||||
|
||||
// Path Solution
|
||||
$this->solution = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a ExportConfigurationContext
|
||||
*
|
||||
* @param string $resourceType The type of communication – Messages, Calls,
|
||||
* Conferences, and Participants
|
||||
*/
|
||||
public function getContext(string $resourceType): ExportConfigurationContext {
|
||||
return new ExportConfigurationContext($this->version, $resourceType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
return '[Twilio.Bulkexports.V1.ExportConfigurationList]';
|
||||
}
|
||||
}
|
||||
81
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationOptions.php
vendored
Normal file
81
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationOptions.php
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1;
|
||||
|
||||
use Twilio\Options;
|
||||
use Twilio\Values;
|
||||
|
||||
abstract class ExportConfigurationOptions {
|
||||
/**
|
||||
* @param bool $enabled Whether files are automatically generated
|
||||
* @param string $webhookUrl URL targeted at export
|
||||
* @param string $webhookMethod Whether to GET or POST to the webhook url
|
||||
* @return UpdateExportConfigurationOptions Options builder
|
||||
*/
|
||||
public static function update(bool $enabled = Values::NONE, string $webhookUrl = Values::NONE, string $webhookMethod = Values::NONE): UpdateExportConfigurationOptions {
|
||||
return new UpdateExportConfigurationOptions($enabled, $webhookUrl, $webhookMethod);
|
||||
}
|
||||
}
|
||||
|
||||
class UpdateExportConfigurationOptions extends Options {
|
||||
/**
|
||||
* @param bool $enabled Whether files are automatically generated
|
||||
* @param string $webhookUrl URL targeted at export
|
||||
* @param string $webhookMethod Whether to GET or POST to the webhook url
|
||||
*/
|
||||
public function __construct(bool $enabled = Values::NONE, string $webhookUrl = Values::NONE, string $webhookMethod = Values::NONE) {
|
||||
$this->options['enabled'] = $enabled;
|
||||
$this->options['webhookUrl'] = $webhookUrl;
|
||||
$this->options['webhookMethod'] = $webhookMethod;
|
||||
}
|
||||
|
||||
/**
|
||||
* If true, Twilio will automatically generate every day's file when the day is over.
|
||||
*
|
||||
* @param bool $enabled Whether files are automatically generated
|
||||
* @return $this Fluent Builder
|
||||
*/
|
||||
public function setEnabled(bool $enabled): self {
|
||||
$this->options['enabled'] = $enabled;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores the URL destination for the method specified in webhook_method.
|
||||
*
|
||||
* @param string $webhookUrl URL targeted at export
|
||||
* @return $this Fluent Builder
|
||||
*/
|
||||
public function setWebhookUrl(string $webhookUrl): self {
|
||||
$this->options['webhookUrl'] = $webhookUrl;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url
|
||||
*
|
||||
* @param string $webhookMethod Whether to GET or POST to the webhook url
|
||||
* @return $this Fluent Builder
|
||||
*/
|
||||
public function setWebhookMethod(string $webhookMethod): self {
|
||||
$this->options['webhookMethod'] = $webhookMethod;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
$options = \http_build_query(Values::of($this->options), '', ' ');
|
||||
return '[Twilio.Bulkexports.V1.UpdateExportConfigurationOptions ' . $options . ']';
|
||||
}
|
||||
}
|
||||
45
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationPage.php
vendored
Normal file
45
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationPage.php
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1;
|
||||
|
||||
use Twilio\Http\Response;
|
||||
use Twilio\Page;
|
||||
use Twilio\Version;
|
||||
|
||||
class ExportConfigurationPage extends Page {
|
||||
/**
|
||||
* @param Version $version Version that contains the resource
|
||||
* @param Response $response Response from the API
|
||||
* @param array $solution The context solution
|
||||
*/
|
||||
public function __construct(Version $version, Response $response, array $solution) {
|
||||
parent::__construct($version, $response);
|
||||
|
||||
// Path Solution
|
||||
$this->solution = $solution;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $payload Payload response from the API
|
||||
* @return ExportConfigurationInstance \Twilio\Rest\Bulkexports\V1\ExportConfigurationInstance
|
||||
*/
|
||||
public function buildInstance(array $payload): ExportConfigurationInstance {
|
||||
return new ExportConfigurationInstance($this->version, $payload);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
return '[Twilio.Bulkexports.V1.ExportConfigurationPage]';
|
||||
}
|
||||
}
|
||||
124
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportContext.php
vendored
Normal file
124
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportContext.php
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1;
|
||||
|
||||
use Twilio\Exceptions\TwilioException;
|
||||
use Twilio\InstanceContext;
|
||||
use Twilio\ListResource;
|
||||
use Twilio\Rest\Bulkexports\V1\Export\DayList;
|
||||
use Twilio\Rest\Bulkexports\V1\Export\ExportCustomJobList;
|
||||
use Twilio\Values;
|
||||
use Twilio\Version;
|
||||
|
||||
/**
|
||||
* @property DayList $days
|
||||
* @property ExportCustomJobList $exportCustomJobs
|
||||
* @method \Twilio\Rest\Bulkexports\V1\Export\DayContext days(string $day)
|
||||
*/
|
||||
class ExportContext extends InstanceContext {
|
||||
protected $_days;
|
||||
protected $_exportCustomJobs;
|
||||
|
||||
/**
|
||||
* Initialize the ExportContext
|
||||
*
|
||||
* @param Version $version Version that contains the resource
|
||||
* @param string $resourceType The type of communication – Messages, Calls,
|
||||
* Conferences, and Participants
|
||||
*/
|
||||
public function __construct(Version $version, $resourceType) {
|
||||
parent::__construct($version);
|
||||
|
||||
// Path Solution
|
||||
$this->solution = ['resourceType' => $resourceType, ];
|
||||
|
||||
$this->uri = '/Exports/' . \rawurlencode($resourceType) . '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the ExportInstance
|
||||
*
|
||||
* @return ExportInstance Fetched ExportInstance
|
||||
* @throws TwilioException When an HTTP error occurs.
|
||||
*/
|
||||
public function fetch(): ExportInstance {
|
||||
$payload = $this->version->fetch('GET', $this->uri);
|
||||
|
||||
return new ExportInstance($this->version, $payload, $this->solution['resourceType']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Access the days
|
||||
*/
|
||||
protected function getDays(): DayList {
|
||||
if (!$this->_days) {
|
||||
$this->_days = new DayList($this->version, $this->solution['resourceType']);
|
||||
}
|
||||
|
||||
return $this->_days;
|
||||
}
|
||||
|
||||
/**
|
||||
* Access the exportCustomJobs
|
||||
*/
|
||||
protected function getExportCustomJobs(): ExportCustomJobList {
|
||||
if (!$this->_exportCustomJobs) {
|
||||
$this->_exportCustomJobs = new ExportCustomJobList($this->version, $this->solution['resourceType']);
|
||||
}
|
||||
|
||||
return $this->_exportCustomJobs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic getter to lazy load subresources
|
||||
*
|
||||
* @param string $name Subresource to return
|
||||
* @return ListResource The requested subresource
|
||||
* @throws TwilioException For unknown subresources
|
||||
*/
|
||||
public function __get(string $name): ListResource {
|
||||
if (\property_exists($this, '_' . $name)) {
|
||||
$method = 'get' . \ucfirst($name);
|
||||
return $this->$method();
|
||||
}
|
||||
|
||||
throw new TwilioException('Unknown subresource ' . $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic caller to get resource contexts
|
||||
*
|
||||
* @param string $name Resource to return
|
||||
* @param array $arguments Context parameters
|
||||
* @return InstanceContext The requested resource context
|
||||
* @throws TwilioException For unknown resource
|
||||
*/
|
||||
public function __call(string $name, array $arguments): InstanceContext {
|
||||
$property = $this->$name;
|
||||
if (\method_exists($property, 'getContext')) {
|
||||
return \call_user_func_array(array($property, 'getContext'), $arguments);
|
||||
}
|
||||
|
||||
throw new TwilioException('Resource does not have a context');
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
$context = [];
|
||||
foreach ($this->solution as $key => $value) {
|
||||
$context[] = "$key=$value";
|
||||
}
|
||||
return '[Twilio.Bulkexports.V1.ExportContext ' . \implode(' ', $context) . ']';
|
||||
}
|
||||
}
|
||||
119
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportInstance.php
vendored
Normal file
119
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportInstance.php
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1;
|
||||
|
||||
use Twilio\Exceptions\TwilioException;
|
||||
use Twilio\InstanceResource;
|
||||
use Twilio\Rest\Bulkexports\V1\Export\DayList;
|
||||
use Twilio\Rest\Bulkexports\V1\Export\ExportCustomJobList;
|
||||
use Twilio\Values;
|
||||
use Twilio\Version;
|
||||
|
||||
/**
|
||||
* @property string $resourceType
|
||||
* @property string $url
|
||||
* @property array $links
|
||||
*/
|
||||
class ExportInstance extends InstanceResource {
|
||||
protected $_days;
|
||||
protected $_exportCustomJobs;
|
||||
|
||||
/**
|
||||
* Initialize the ExportInstance
|
||||
*
|
||||
* @param Version $version Version that contains the resource
|
||||
* @param mixed[] $payload The response payload
|
||||
* @param string $resourceType The type of communication – Messages, Calls,
|
||||
* Conferences, and Participants
|
||||
*/
|
||||
public function __construct(Version $version, array $payload, string $resourceType = null) {
|
||||
parent::__construct($version);
|
||||
|
||||
// Marshaled Properties
|
||||
$this->properties = [
|
||||
'resourceType' => Values::array_get($payload, 'resource_type'),
|
||||
'url' => Values::array_get($payload, 'url'),
|
||||
'links' => Values::array_get($payload, 'links'),
|
||||
];
|
||||
|
||||
$this->solution = ['resourceType' => $resourceType ?: $this->properties['resourceType'], ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate an instance context for the instance, the context is capable of
|
||||
* performing various actions. All instance actions are proxied to the context
|
||||
*
|
||||
* @return ExportContext Context for this ExportInstance
|
||||
*/
|
||||
protected function proxy(): ExportContext {
|
||||
if (!$this->context) {
|
||||
$this->context = new ExportContext($this->version, $this->solution['resourceType']);
|
||||
}
|
||||
|
||||
return $this->context;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the ExportInstance
|
||||
*
|
||||
* @return ExportInstance Fetched ExportInstance
|
||||
* @throws TwilioException When an HTTP error occurs.
|
||||
*/
|
||||
public function fetch(): ExportInstance {
|
||||
return $this->proxy()->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Access the days
|
||||
*/
|
||||
protected function getDays(): DayList {
|
||||
return $this->proxy()->days;
|
||||
}
|
||||
|
||||
/**
|
||||
* Access the exportCustomJobs
|
||||
*/
|
||||
protected function getExportCustomJobs(): ExportCustomJobList {
|
||||
return $this->proxy()->exportCustomJobs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic getter to access properties
|
||||
*
|
||||
* @param string $name Property to access
|
||||
* @return mixed The requested property
|
||||
* @throws TwilioException For unknown properties
|
||||
*/
|
||||
public function __get(string $name) {
|
||||
if (\array_key_exists($name, $this->properties)) {
|
||||
return $this->properties[$name];
|
||||
}
|
||||
|
||||
if (\property_exists($this, '_' . $name)) {
|
||||
$method = 'get' . \ucfirst($name);
|
||||
return $this->$method();
|
||||
}
|
||||
|
||||
throw new TwilioException('Unknown property: ' . $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
$context = [];
|
||||
foreach ($this->solution as $key => $value) {
|
||||
$context[] = "$key=$value";
|
||||
}
|
||||
return '[Twilio.Bulkexports.V1.ExportInstance ' . \implode(' ', $context) . ']';
|
||||
}
|
||||
}
|
||||
99
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportList.php
vendored
Normal file
99
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportList.php
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1;
|
||||
|
||||
use Twilio\Exceptions\TwilioException;
|
||||
use Twilio\InstanceContext;
|
||||
use Twilio\ListResource;
|
||||
use Twilio\Rest\Bulkexports\V1\Export\JobList;
|
||||
use Twilio\Version;
|
||||
|
||||
/**
|
||||
* @property JobList $jobs
|
||||
* @method \Twilio\Rest\Bulkexports\V1\Export\JobContext jobs(string $jobSid)
|
||||
*/
|
||||
class ExportList extends ListResource {
|
||||
protected $_jobs = null;
|
||||
|
||||
/**
|
||||
* Construct the ExportList
|
||||
*
|
||||
* @param Version $version Version that contains the resource
|
||||
*/
|
||||
public function __construct(Version $version) {
|
||||
parent::__construct($version);
|
||||
|
||||
// Path Solution
|
||||
$this->solution = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Access the jobs
|
||||
*/
|
||||
protected function getJobs(): JobList {
|
||||
if (!$this->_jobs) {
|
||||
$this->_jobs = new JobList($this->version);
|
||||
}
|
||||
|
||||
return $this->_jobs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a ExportContext
|
||||
*
|
||||
* @param string $resourceType The type of communication – Messages, Calls,
|
||||
* Conferences, and Participants
|
||||
*/
|
||||
public function getContext(string $resourceType): ExportContext {
|
||||
return new ExportContext($this->version, $resourceType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic getter to lazy load subresources
|
||||
*
|
||||
* @param string $name Subresource to return
|
||||
* @return \Twilio\ListResource The requested subresource
|
||||
* @throws TwilioException For unknown subresources
|
||||
*/
|
||||
public function __get(string $name) {
|
||||
if (\property_exists($this, '_' . $name)) {
|
||||
$method = 'get' . \ucfirst($name);
|
||||
return $this->$method();
|
||||
}
|
||||
|
||||
throw new TwilioException('Unknown subresource ' . $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic caller to get resource contexts
|
||||
*
|
||||
* @param string $name Resource to return
|
||||
* @param array $arguments Context parameters
|
||||
* @return InstanceContext The requested resource context
|
||||
* @throws TwilioException For unknown resource
|
||||
*/
|
||||
public function __call(string $name, array $arguments): InstanceContext {
|
||||
$property = $this->$name;
|
||||
if (\method_exists($property, 'getContext')) {
|
||||
return \call_user_func_array(array($property, 'getContext'), $arguments);
|
||||
}
|
||||
|
||||
throw new TwilioException('Resource does not have a context');
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
return '[Twilio.Bulkexports.V1.ExportList]';
|
||||
}
|
||||
}
|
||||
45
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportPage.php
vendored
Normal file
45
vendor/twilio/sdk/src/Twilio/Rest/Bulkexports/V1/ExportPage.php
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* \ / _ _ _| _ _
|
||||
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
||||
* / /
|
||||
*/
|
||||
|
||||
namespace Twilio\Rest\Bulkexports\V1;
|
||||
|
||||
use Twilio\Http\Response;
|
||||
use Twilio\Page;
|
||||
use Twilio\Version;
|
||||
|
||||
class ExportPage extends Page {
|
||||
/**
|
||||
* @param Version $version Version that contains the resource
|
||||
* @param Response $response Response from the API
|
||||
* @param array $solution The context solution
|
||||
*/
|
||||
public function __construct(Version $version, Response $response, array $solution) {
|
||||
parent::__construct($version, $response);
|
||||
|
||||
// Path Solution
|
||||
$this->solution = $solution;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $payload Payload response from the API
|
||||
* @return ExportInstance \Twilio\Rest\Bulkexports\V1\ExportInstance
|
||||
*/
|
||||
public function buildInstance(array $payload): ExportInstance {
|
||||
return new ExportInstance($this->version, $payload);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a friendly representation
|
||||
*
|
||||
* @return string Machine friendly representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
return '[Twilio.Bulkexports.V1.ExportPage]';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user