One Hat Cyber Team
Your IP:
216.73.216.30
Server IP:
198.54.114.155
Server:
Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
5.6.40
Create File
|
Create Folder
Execute
Dir :
~
/
proc
/
self
/
cwd
/
View File Name :
Api.tar
ApiInterface.php 0000644 00000000524 15107333771 0007617 0 ustar 00 <?php namespace League\Glide\Api; interface ApiInterface { /** * Perform image manipulations. * * @param string $source Source image binary data. * @param array $params The manipulation params. * * @return string Manipulated image binary data. */ public function run($source, array $params); } Api.php 0000644 00000004640 15107333771 0006001 0 ustar 00 <?php namespace League\Glide\Api; use Intervention\Image\ImageManager; use InvalidArgumentException; use League\Glide\Manipulators\ManipulatorInterface; class Api implements ApiInterface { /** * Intervention image manager. * * @var ImageManager */ protected $imageManager; /** * Collection of manipulators. * * @var array */ protected $manipulators; /** * Create API instance. * * @param ImageManager $imageManager Intervention image manager. * @param array $manipulators Collection of manipulators. */ public function __construct(ImageManager $imageManager, array $manipulators) { $this->setImageManager($imageManager); $this->setManipulators($manipulators); } /** * Set the image manager. * * @param ImageManager $imageManager Intervention image manager. * * @return void */ public function setImageManager(ImageManager $imageManager) { $this->imageManager = $imageManager; } /** * Get the image manager. * * @return ImageManager Intervention image manager. */ public function getImageManager() { return $this->imageManager; } /** * Set the manipulators. * * @param array $manipulators Collection of manipulators. * * @return void */ public function setManipulators(array $manipulators) { foreach ($manipulators as $manipulator) { if (!($manipulator instanceof ManipulatorInterface)) { throw new InvalidArgumentException('Not a valid manipulator.'); } } $this->manipulators = $manipulators; } /** * Get the manipulators. * * @return array Collection of manipulators. */ public function getManipulators() { return $this->manipulators; } /** * Perform image manipulations. * * @param string $source Source image binary data. * @param array $params The manipulation params. * * @return string Manipulated image binary data. */ public function run($source, array $params) { $image = $this->imageManager->make($source); foreach ($this->manipulators as $manipulator) { $manipulator->setParams($params); $image = $manipulator->run($image); } return $image->getEncoded(); } } V2010.php 0000644 00000024426 15111163776 0006005 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api; use Twilio\Domain; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Rest\Api\V2010\AccountContext; use Twilio\Rest\Api\V2010\AccountInstance; use Twilio\Rest\Api\V2010\AccountList; use Twilio\Version; /** * @property AccountList $accounts * @method \Twilio\Rest\Api\V2010\AccountContext accounts(string $sid) * @property AccountContext $account * @property \Twilio\Rest\Api\V2010\Account\AddressList $addresses * @property \Twilio\Rest\Api\V2010\Account\ApplicationList $applications * @property \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList $authorizedConnectApps * @property \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList $availablePhoneNumbers * @property \Twilio\Rest\Api\V2010\Account\BalanceList $balance * @property \Twilio\Rest\Api\V2010\Account\CallList $calls * @property \Twilio\Rest\Api\V2010\Account\ConferenceList $conferences * @property \Twilio\Rest\Api\V2010\Account\ConnectAppList $connectApps * @property \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList $incomingPhoneNumbers * @property \Twilio\Rest\Api\V2010\Account\KeyList $keys * @property \Twilio\Rest\Api\V2010\Account\MessageList $messages * @property \Twilio\Rest\Api\V2010\Account\NewKeyList $newKeys * @property \Twilio\Rest\Api\V2010\Account\NewSigningKeyList $newSigningKeys * @property \Twilio\Rest\Api\V2010\Account\NotificationList $notifications * @property \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList $outgoingCallerIds * @property \Twilio\Rest\Api\V2010\Account\QueueList $queues * @property \Twilio\Rest\Api\V2010\Account\RecordingList $recordings * @property \Twilio\Rest\Api\V2010\Account\SigningKeyList $signingKeys * @property \Twilio\Rest\Api\V2010\Account\SipList $sip * @property \Twilio\Rest\Api\V2010\Account\ShortCodeList $shortCodes * @property \Twilio\Rest\Api\V2010\Account\TokenList $tokens * @property \Twilio\Rest\Api\V2010\Account\TranscriptionList $transcriptions * @property \Twilio\Rest\Api\V2010\Account\UsageList $usage * @property \Twilio\Rest\Api\V2010\Account\ValidationRequestList $validationRequests * @method \Twilio\Rest\Api\V2010\Account\AddressContext addresses(string $sid) * @method \Twilio\Rest\Api\V2010\Account\ApplicationContext applications(string $sid) * @method \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppContext authorizedConnectApps(string $connectAppSid) * @method \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryContext availablePhoneNumbers(string $countryCode) * @method \Twilio\Rest\Api\V2010\Account\CallContext calls(string $sid) * @method \Twilio\Rest\Api\V2010\Account\ConferenceContext conferences(string $sid) * @method \Twilio\Rest\Api\V2010\Account\ConnectAppContext connectApps(string $sid) * @method \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberContext incomingPhoneNumbers(string $sid) * @method \Twilio\Rest\Api\V2010\Account\KeyContext keys(string $sid) * @method \Twilio\Rest\Api\V2010\Account\MessageContext messages(string $sid) * @method \Twilio\Rest\Api\V2010\Account\NotificationContext notifications(string $sid) * @method \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdContext outgoingCallerIds(string $sid) * @method \Twilio\Rest\Api\V2010\Account\QueueContext queues(string $sid) * @method \Twilio\Rest\Api\V2010\Account\RecordingContext recordings(string $sid) * @method \Twilio\Rest\Api\V2010\Account\SigningKeyContext signingKeys(string $sid) * @method \Twilio\Rest\Api\V2010\Account\ShortCodeContext shortCodes(string $sid) * @method \Twilio\Rest\Api\V2010\Account\TranscriptionContext transcriptions(string $sid) */ class V2010 extends Version { protected $_accounts; protected $_account = null; protected $_addresses = null; protected $_applications = null; protected $_authorizedConnectApps = null; protected $_availablePhoneNumbers = null; protected $_balance = null; protected $_calls = null; protected $_conferences = null; protected $_connectApps = null; protected $_incomingPhoneNumbers = null; protected $_keys = null; protected $_messages = null; protected $_newKeys = null; protected $_newSigningKeys = null; protected $_notifications = null; protected $_outgoingCallerIds = null; protected $_queues = null; protected $_recordings = null; protected $_signingKeys = null; protected $_sip = null; protected $_shortCodes = null; protected $_tokens = null; protected $_transcriptions = null; protected $_usage = null; protected $_validationRequests = null; /** * Construct the V2010 version of Api * * @param Domain $domain Domain that contains the version */ public function __construct(Domain $domain) { parent::__construct($domain); $this->version = '2010-04-01'; } protected function getAccounts(): AccountList { if (!$this->_accounts) { $this->_accounts = new AccountList($this); } return $this->_accounts; } /** * @return AccountContext Account provided as the authenticating account */ protected function getAccount(): AccountContext { if (!$this->_account) { $this->_account = new AccountContext( $this, $this->domain->getClient()->getAccountSid() ); } return $this->_account; } /** * Setter to override the primary account * * @param AccountContext|AccountInstance $account account to use as the primary * account */ public function setAccount($account): void { $this->_account = $account; } protected function getAddresses(): \Twilio\Rest\Api\V2010\Account\AddressList { return $this->account->addresses; } protected function getApplications(): \Twilio\Rest\Api\V2010\Account\ApplicationList { return $this->account->applications; } protected function getAuthorizedConnectApps(): \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList { return $this->account->authorizedConnectApps; } protected function getAvailablePhoneNumbers(): \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList { return $this->account->availablePhoneNumbers; } protected function getBalance(): \Twilio\Rest\Api\V2010\Account\BalanceList { return $this->account->balance; } protected function getCalls(): \Twilio\Rest\Api\V2010\Account\CallList { return $this->account->calls; } protected function getConferences(): \Twilio\Rest\Api\V2010\Account\ConferenceList { return $this->account->conferences; } protected function getConnectApps(): \Twilio\Rest\Api\V2010\Account\ConnectAppList { return $this->account->connectApps; } protected function getIncomingPhoneNumbers(): \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList { return $this->account->incomingPhoneNumbers; } protected function getKeys(): \Twilio\Rest\Api\V2010\Account\KeyList { return $this->account->keys; } protected function getMessages(): \Twilio\Rest\Api\V2010\Account\MessageList { return $this->account->messages; } protected function getNewKeys(): \Twilio\Rest\Api\V2010\Account\NewKeyList { return $this->account->newKeys; } protected function getNewSigningKeys(): \Twilio\Rest\Api\V2010\Account\NewSigningKeyList { return $this->account->newSigningKeys; } protected function getNotifications(): \Twilio\Rest\Api\V2010\Account\NotificationList { return $this->account->notifications; } protected function getOutgoingCallerIds(): \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList { return $this->account->outgoingCallerIds; } protected function getQueues(): \Twilio\Rest\Api\V2010\Account\QueueList { return $this->account->queues; } protected function getRecordings(): \Twilio\Rest\Api\V2010\Account\RecordingList { return $this->account->recordings; } protected function getSigningKeys(): \Twilio\Rest\Api\V2010\Account\SigningKeyList { return $this->account->signingKeys; } protected function getSip(): \Twilio\Rest\Api\V2010\Account\SipList { return $this->account->sip; } protected function getShortCodes(): \Twilio\Rest\Api\V2010\Account\ShortCodeList { return $this->account->shortCodes; } protected function getTokens(): \Twilio\Rest\Api\V2010\Account\TokenList { return $this->account->tokens; } protected function getTranscriptions(): \Twilio\Rest\Api\V2010\Account\TranscriptionList { return $this->account->transcriptions; } protected function getUsage(): \Twilio\Rest\Api\V2010\Account\UsageList { return $this->account->usage; } protected function getValidationRequests(): \Twilio\Rest\Api\V2010\Account\ValidationRequestList { return $this->account->validationRequests; } /** * 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.Api.V2010]'; } } V2010/AccountPage.php 0000644 00000002171 15111163777 0010170 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class AccountPage 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 AccountInstance \Twilio\Rest\Api\V2010\AccountInstance */ public function buildInstance(array $payload): AccountInstance { return new AccountInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AccountPage]'; } } V2010/AccountContext.php 0000644 00000034527 15111163777 0010752 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\AddressList; use Twilio\Rest\Api\V2010\Account\ApplicationList; use Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList; use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList; use Twilio\Rest\Api\V2010\Account\BalanceList; use Twilio\Rest\Api\V2010\Account\CallList; use Twilio\Rest\Api\V2010\Account\ConferenceList; use Twilio\Rest\Api\V2010\Account\ConnectAppList; use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList; use Twilio\Rest\Api\V2010\Account\KeyList; use Twilio\Rest\Api\V2010\Account\MessageList; use Twilio\Rest\Api\V2010\Account\NewKeyList; use Twilio\Rest\Api\V2010\Account\NewSigningKeyList; use Twilio\Rest\Api\V2010\Account\NotificationList; use Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList; use Twilio\Rest\Api\V2010\Account\QueueList; use Twilio\Rest\Api\V2010\Account\RecordingList; use Twilio\Rest\Api\V2010\Account\ShortCodeList; use Twilio\Rest\Api\V2010\Account\SigningKeyList; use Twilio\Rest\Api\V2010\Account\SipList; use Twilio\Rest\Api\V2010\Account\TokenList; use Twilio\Rest\Api\V2010\Account\TranscriptionList; use Twilio\Rest\Api\V2010\Account\UsageList; use Twilio\Rest\Api\V2010\Account\ValidationRequestList; use Twilio\Values; use Twilio\Version; /** * @property AddressList $addresses * @property ApplicationList $applications * @property AuthorizedConnectAppList $authorizedConnectApps * @property AvailablePhoneNumberCountryList $availablePhoneNumbers * @property BalanceList $balance * @property CallList $calls * @property ConferenceList $conferences * @property ConnectAppList $connectApps * @property IncomingPhoneNumberList $incomingPhoneNumbers * @property KeyList $keys * @property MessageList $messages * @property NewKeyList $newKeys * @property NewSigningKeyList $newSigningKeys * @property NotificationList $notifications * @property OutgoingCallerIdList $outgoingCallerIds * @property QueueList $queues * @property RecordingList $recordings * @property SigningKeyList $signingKeys * @property SipList $sip * @property ShortCodeList $shortCodes * @property TokenList $tokens * @property TranscriptionList $transcriptions * @property UsageList $usage * @property ValidationRequestList $validationRequests * @method \Twilio\Rest\Api\V2010\Account\AddressContext addresses(string $sid) * @method \Twilio\Rest\Api\V2010\Account\ApplicationContext applications(string $sid) * @method \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppContext authorizedConnectApps(string $connectAppSid) * @method \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryContext availablePhoneNumbers(string $countryCode) * @method \Twilio\Rest\Api\V2010\Account\CallContext calls(string $sid) * @method \Twilio\Rest\Api\V2010\Account\ConferenceContext conferences(string $sid) * @method \Twilio\Rest\Api\V2010\Account\ConnectAppContext connectApps(string $sid) * @method \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberContext incomingPhoneNumbers(string $sid) * @method \Twilio\Rest\Api\V2010\Account\KeyContext keys(string $sid) * @method \Twilio\Rest\Api\V2010\Account\MessageContext messages(string $sid) * @method \Twilio\Rest\Api\V2010\Account\NotificationContext notifications(string $sid) * @method \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdContext outgoingCallerIds(string $sid) * @method \Twilio\Rest\Api\V2010\Account\QueueContext queues(string $sid) * @method \Twilio\Rest\Api\V2010\Account\RecordingContext recordings(string $sid) * @method \Twilio\Rest\Api\V2010\Account\SigningKeyContext signingKeys(string $sid) * @method \Twilio\Rest\Api\V2010\Account\ShortCodeContext shortCodes(string $sid) * @method \Twilio\Rest\Api\V2010\Account\TranscriptionContext transcriptions(string $sid) */ class AccountContext extends InstanceContext { protected $_addresses; protected $_applications; protected $_authorizedConnectApps; protected $_availablePhoneNumbers; protected $_balance; protected $_calls; protected $_conferences; protected $_connectApps; protected $_incomingPhoneNumbers; protected $_keys; protected $_messages; protected $_newKeys; protected $_newSigningKeys; protected $_notifications; protected $_outgoingCallerIds; protected $_queues; protected $_recordings; protected $_signingKeys; protected $_sip; protected $_shortCodes; protected $_tokens; protected $_transcriptions; protected $_usage; protected $_validationRequests; /** * Initialize the AccountContext * * @param Version $version Version that contains the resource * @param string $sid Fetch by unique Account Sid */ public function __construct(Version $version, $sid) { parent::__construct($version); // Path Solution $this->solution = ['sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($sid) . '.json'; } /** * Fetch the AccountInstance * * @return AccountInstance Fetched AccountInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AccountInstance { $payload = $this->version->fetch('GET', $this->uri); return new AccountInstance($this->version, $payload, $this->solution['sid']); } /** * Update the AccountInstance * * @param array|Options $options Optional Arguments * @return AccountInstance Updated AccountInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AccountInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], 'Status' => $options['status'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new AccountInstance($this->version, $payload, $this->solution['sid']); } /** * Access the addresses */ protected function getAddresses(): AddressList { if (!$this->_addresses) { $this->_addresses = new AddressList($this->version, $this->solution['sid']); } return $this->_addresses; } /** * Access the applications */ protected function getApplications(): ApplicationList { if (!$this->_applications) { $this->_applications = new ApplicationList($this->version, $this->solution['sid']); } return $this->_applications; } /** * Access the authorizedConnectApps */ protected function getAuthorizedConnectApps(): AuthorizedConnectAppList { if (!$this->_authorizedConnectApps) { $this->_authorizedConnectApps = new AuthorizedConnectAppList( $this->version, $this->solution['sid'] ); } return $this->_authorizedConnectApps; } /** * Access the availablePhoneNumbers */ protected function getAvailablePhoneNumbers(): AvailablePhoneNumberCountryList { if (!$this->_availablePhoneNumbers) { $this->_availablePhoneNumbers = new AvailablePhoneNumberCountryList( $this->version, $this->solution['sid'] ); } return $this->_availablePhoneNumbers; } /** * Access the balance */ protected function getBalance(): BalanceList { if (!$this->_balance) { $this->_balance = new BalanceList($this->version, $this->solution['sid']); } return $this->_balance; } /** * Access the calls */ protected function getCalls(): CallList { if (!$this->_calls) { $this->_calls = new CallList($this->version, $this->solution['sid']); } return $this->_calls; } /** * Access the conferences */ protected function getConferences(): ConferenceList { if (!$this->_conferences) { $this->_conferences = new ConferenceList($this->version, $this->solution['sid']); } return $this->_conferences; } /** * Access the connectApps */ protected function getConnectApps(): ConnectAppList { if (!$this->_connectApps) { $this->_connectApps = new ConnectAppList($this->version, $this->solution['sid']); } return $this->_connectApps; } /** * Access the incomingPhoneNumbers */ protected function getIncomingPhoneNumbers(): IncomingPhoneNumberList { if (!$this->_incomingPhoneNumbers) { $this->_incomingPhoneNumbers = new IncomingPhoneNumberList($this->version, $this->solution['sid']); } return $this->_incomingPhoneNumbers; } /** * Access the keys */ protected function getKeys(): KeyList { if (!$this->_keys) { $this->_keys = new KeyList($this->version, $this->solution['sid']); } return $this->_keys; } /** * Access the messages */ protected function getMessages(): MessageList { if (!$this->_messages) { $this->_messages = new MessageList($this->version, $this->solution['sid']); } return $this->_messages; } /** * Access the newKeys */ protected function getNewKeys(): NewKeyList { if (!$this->_newKeys) { $this->_newKeys = new NewKeyList($this->version, $this->solution['sid']); } return $this->_newKeys; } /** * Access the newSigningKeys */ protected function getNewSigningKeys(): NewSigningKeyList { if (!$this->_newSigningKeys) { $this->_newSigningKeys = new NewSigningKeyList($this->version, $this->solution['sid']); } return $this->_newSigningKeys; } /** * Access the notifications */ protected function getNotifications(): NotificationList { if (!$this->_notifications) { $this->_notifications = new NotificationList($this->version, $this->solution['sid']); } return $this->_notifications; } /** * Access the outgoingCallerIds */ protected function getOutgoingCallerIds(): OutgoingCallerIdList { if (!$this->_outgoingCallerIds) { $this->_outgoingCallerIds = new OutgoingCallerIdList($this->version, $this->solution['sid']); } return $this->_outgoingCallerIds; } /** * Access the queues */ protected function getQueues(): QueueList { if (!$this->_queues) { $this->_queues = new QueueList($this->version, $this->solution['sid']); } return $this->_queues; } /** * Access the recordings */ protected function getRecordings(): RecordingList { if (!$this->_recordings) { $this->_recordings = new RecordingList($this->version, $this->solution['sid']); } return $this->_recordings; } /** * Access the signingKeys */ protected function getSigningKeys(): SigningKeyList { if (!$this->_signingKeys) { $this->_signingKeys = new SigningKeyList($this->version, $this->solution['sid']); } return $this->_signingKeys; } /** * Access the sip */ protected function getSip(): SipList { if (!$this->_sip) { $this->_sip = new SipList($this->version, $this->solution['sid']); } return $this->_sip; } /** * Access the shortCodes */ protected function getShortCodes(): ShortCodeList { if (!$this->_shortCodes) { $this->_shortCodes = new ShortCodeList($this->version, $this->solution['sid']); } return $this->_shortCodes; } /** * Access the tokens */ protected function getTokens(): TokenList { if (!$this->_tokens) { $this->_tokens = new TokenList($this->version, $this->solution['sid']); } return $this->_tokens; } /** * Access the transcriptions */ protected function getTranscriptions(): TranscriptionList { if (!$this->_transcriptions) { $this->_transcriptions = new TranscriptionList($this->version, $this->solution['sid']); } return $this->_transcriptions; } /** * Access the usage */ protected function getUsage(): UsageList { if (!$this->_usage) { $this->_usage = new UsageList($this->version, $this->solution['sid']); } return $this->_usage; } /** * Access the validationRequests */ protected function getValidationRequests(): ValidationRequestList { if (!$this->_validationRequests) { $this->_validationRequests = new ValidationRequestList($this->version, $this->solution['sid']); } return $this->_validationRequests; } /** * 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.Api.V2010.AccountContext ' . \implode(' ', $context) . ']'; } } V2010/AccountOptions.php 0000644 00000012017 15111164000 0010723 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010; use Twilio\Options; use Twilio\Values; abstract class AccountOptions { /** * @param string $friendlyName A human readable description of the account * @return CreateAccountOptions Options builder */ public static function create(string $friendlyName = Values::NONE): CreateAccountOptions { return new CreateAccountOptions($friendlyName); } /** * @param string $friendlyName FriendlyName to filter on * @param string $status Status to filter on * @return ReadAccountOptions Options builder */ public static function read(string $friendlyName = Values::NONE, string $status = Values::NONE): ReadAccountOptions { return new ReadAccountOptions($friendlyName, $status); } /** * @param string $friendlyName FriendlyName to update * @param string $status Status to update the Account with * @return UpdateAccountOptions Options builder */ public static function update(string $friendlyName = Values::NONE, string $status = Values::NONE): UpdateAccountOptions { return new UpdateAccountOptions($friendlyName, $status); } } class CreateAccountOptions extends Options { /** * @param string $friendlyName A human readable description of the account */ public function __construct(string $friendlyName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; } /** * A human readable description of the account to create, defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}` * * @param string $friendlyName A human readable description of the account * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; 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.Api.V2010.CreateAccountOptions ' . $options . ']'; } } class ReadAccountOptions extends Options { /** * @param string $friendlyName FriendlyName to filter on * @param string $status Status to filter on */ public function __construct(string $friendlyName = Values::NONE, string $status = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['status'] = $status; } /** * Only return the Account resources with friendly names that exactly match this name. * * @param string $friendlyName FriendlyName to filter on * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Only return Account resources with the given status. Can be `closed`, `suspended` or `active`. * * @param string $status Status to filter on * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; 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.Api.V2010.ReadAccountOptions ' . $options . ']'; } } class UpdateAccountOptions extends Options { /** * @param string $friendlyName FriendlyName to update * @param string $status Status to update the Account with */ public function __construct(string $friendlyName = Values::NONE, string $status = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['status'] = $status; } /** * Update the human-readable description of this Account * * @param string $friendlyName FriendlyName to update * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Alter the status of this account: use `closed` to irreversibly close this account, `suspended` to temporarily suspend it, or `active` to reactivate it. * * @param string $status Status to update the Account with * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; 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.Api.V2010.UpdateAccountOptions ' . $options . ']'; } } V2010/AccountList.php 0000644 00000013013 15111164000 0010200 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class AccountList extends ListResource { /** * Construct the AccountList * * @param Version $version Version that contains the resource */ public function __construct(Version $version) { parent::__construct($version); // Path Solution $this->solution = []; $this->uri = '/Accounts.json'; } /** * Create the AccountInstance * * @param array|Options $options Optional Arguments * @return AccountInstance Created AccountInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): AccountInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AccountInstance($this->version, $payload); } /** * Streams AccountInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AccountInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 AccountInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of AccountInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 AccountPage Page of AccountInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AccountPage { $options = new Values($options); $params = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Status' => $options['status'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AccountPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AccountInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AccountPage Page of AccountInstance */ public function getPage(string $targetUrl): AccountPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AccountPage($this->version, $response, $this->solution); } /** * Constructs a AccountContext * * @param string $sid Fetch by unique Account Sid */ public function getContext(string $sid): AccountContext { return new AccountContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AccountList]'; } } V2010/Account/AuthorizedConnectAppList.php 0000644 00000012052 15111164001 0014274 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class AuthorizedConnectAppList extends ListResource { /** * Construct the AuthorizedConnectAppList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AuthorizedConnectApps.json'; } /** * Streams AuthorizedConnectAppInstance 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 AuthorizedConnectAppInstance 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 AuthorizedConnectAppInstance[] 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 AuthorizedConnectAppInstance 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 AuthorizedConnectAppPage Page of AuthorizedConnectAppInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AuthorizedConnectAppPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AuthorizedConnectAppPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AuthorizedConnectAppInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AuthorizedConnectAppPage Page of AuthorizedConnectAppInstance */ public function getPage(string $targetUrl): AuthorizedConnectAppPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AuthorizedConnectAppPage($this->version, $response, $this->solution); } /** * Constructs a AuthorizedConnectAppContext * * @param string $connectAppSid The SID of the Connect App to fetch */ public function getContext(string $connectAppSid): AuthorizedConnectAppContext { return new AuthorizedConnectAppContext( $this->version, $this->solution['accountSid'], $connectAppSid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthorizedConnectAppList]'; } } V2010/Account/BalanceList.php 0000644 00000002511 15111164001 0011527 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Values; use Twilio\Version; class BalanceList extends ListResource { /** * Construct the BalanceList * * @param Version $version Version that contains the resource * @param string $accountSid Account Sid. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Balance.json'; } /** * Fetch the BalanceInstance * * @return BalanceInstance Fetched BalanceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BalanceInstance { $payload = $this->version->fetch('GET', $this->uri); return new BalanceInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.BalanceList]'; } } V2010/Account/CallContext.php 0000644 00000022605 15111164001 0011574 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\Call\EventList; use Twilio\Rest\Api\V2010\Account\Call\FeedbackList; use Twilio\Rest\Api\V2010\Account\Call\NotificationList; use Twilio\Rest\Api\V2010\Account\Call\PaymentList; use Twilio\Rest\Api\V2010\Account\Call\RecordingList; use Twilio\Rest\Api\V2010\Account\Call\SiprecList; use Twilio\Rest\Api\V2010\Account\Call\StreamList; use Twilio\Rest\Api\V2010\Account\Call\UserDefinedMessageList; use Twilio\Rest\Api\V2010\Account\Call\UserDefinedMessageSubscriptionList; use Twilio\Values; use Twilio\Version; /** * @property RecordingList $recordings * @property NotificationList $notifications * @property FeedbackList $feedback * @property EventList $events * @property PaymentList $payments * @property SiprecList $siprec * @property StreamList $streams * @property UserDefinedMessageSubscriptionList $userDefinedMessageSubscriptions * @property UserDefinedMessageList $userDefinedMessages * @method \Twilio\Rest\Api\V2010\Account\Call\RecordingContext recordings(string $sid) * @method \Twilio\Rest\Api\V2010\Account\Call\NotificationContext notifications(string $sid) * @method \Twilio\Rest\Api\V2010\Account\Call\FeedbackContext feedback() * @method \Twilio\Rest\Api\V2010\Account\Call\PaymentContext payments(string $sid) * @method \Twilio\Rest\Api\V2010\Account\Call\SiprecContext siprec(string $sid) * @method \Twilio\Rest\Api\V2010\Account\Call\StreamContext streams(string $sid) * @method \Twilio\Rest\Api\V2010\Account\Call\UserDefinedMessageSubscriptionContext userDefinedMessageSubscriptions(string $sid) */ class CallContext extends InstanceContext { protected $_recordings; protected $_notifications; protected $_feedback; protected $_events; protected $_payments; protected $_siprec; protected $_streams; protected $_userDefinedMessageSubscriptions; protected $_userDefinedMessages; /** * Initialize the CallContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the * resource(s) to fetch * @param string $sid The SID of the Call resource to fetch */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($sid) . '.json'; } /** * Delete the CallInstance * * @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); } /** * Fetch the CallInstance * * @return CallInstance Fetched CallInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CallInstance { $payload = $this->version->fetch('GET', $this->uri); return new CallInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the CallInstance * * @param array|Options $options Optional Arguments * @return CallInstance Updated CallInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CallInstance { $options = new Values($options); $data = Values::of([ 'Url' => $options['url'], 'Method' => $options['method'], 'Status' => $options['status'], 'FallbackUrl' => $options['fallbackUrl'], 'FallbackMethod' => $options['fallbackMethod'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'Twiml' => $options['twiml'], 'TimeLimit' => $options['timeLimit'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new CallInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Access the recordings */ protected function getRecordings(): RecordingList { if (!$this->_recordings) { $this->_recordings = new RecordingList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_recordings; } /** * Access the notifications */ protected function getNotifications(): NotificationList { if (!$this->_notifications) { $this->_notifications = new NotificationList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_notifications; } /** * Access the feedback */ protected function getFeedback(): FeedbackList { if (!$this->_feedback) { $this->_feedback = new FeedbackList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_feedback; } /** * Access the events */ protected function getEvents(): EventList { if (!$this->_events) { $this->_events = new EventList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_events; } /** * Access the payments */ protected function getPayments(): PaymentList { if (!$this->_payments) { $this->_payments = new PaymentList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_payments; } /** * Access the siprec */ protected function getSiprec(): SiprecList { if (!$this->_siprec) { $this->_siprec = new SiprecList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_siprec; } /** * Access the streams */ protected function getStreams(): StreamList { if (!$this->_streams) { $this->_streams = new StreamList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_streams; } /** * Access the userDefinedMessageSubscriptions */ protected function getUserDefinedMessageSubscriptions(): UserDefinedMessageSubscriptionList { if (!$this->_userDefinedMessageSubscriptions) { $this->_userDefinedMessageSubscriptions = new UserDefinedMessageSubscriptionList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_userDefinedMessageSubscriptions; } /** * Access the userDefinedMessages */ protected function getUserDefinedMessages(): UserDefinedMessageList { if (!$this->_userDefinedMessages) { $this->_userDefinedMessages = new UserDefinedMessageList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_userDefinedMessages; } /** * 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.Api.V2010.CallContext ' . \implode(' ', $context) . ']'; } } V2010/Account/TranscriptionContext.php 0000644 00000004141 15111164001 0013553 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; class TranscriptionContext extends InstanceContext { /** * Initialize the TranscriptionContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Transcriptions/' . \rawurlencode($sid) . '.json'; } /** * Fetch the TranscriptionInstance * * @return TranscriptionInstance Fetched TranscriptionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TranscriptionInstance { $payload = $this->version->fetch('GET', $this->uri); return new TranscriptionInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the TranscriptionInstance * * @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.Api.V2010.TranscriptionContext ' . \implode(' ', $context) . ']'; } } V2010/Account/UsageList.php 0000644 00000005631 15111164002 0011255 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Rest\Api\V2010\Account\Usage\RecordList; use Twilio\Rest\Api\V2010\Account\Usage\TriggerList; use Twilio\Version; /** * @property RecordList $records * @property TriggerList $triggers * @method \Twilio\Rest\Api\V2010\Account\Usage\TriggerContext triggers(string $sid) */ class UsageList extends ListResource { protected $_records = null; protected $_triggers = null; /** * Construct the UsageList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; } /** * Access the records */ protected function getRecords(): RecordList { if (!$this->_records) { $this->_records = new RecordList($this->version, $this->solution['accountSid']); } return $this->_records; } /** * Access the triggers */ protected function getTriggers(): TriggerList { if (!$this->_triggers) { $this->_triggers = new TriggerList($this->version, $this->solution['accountSid']); } return $this->_triggers; } /** * 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.Api.V2010.UsageList]'; } } V2010/Account/Conference/ParticipantList.php 0000644 00000023745 15111164002 0014544 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Conference; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class ParticipantList extends ListResource { /** * Construct the ParticipantList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $conferenceSid The SID of the conference the participant is in */ public function __construct(Version $version, string $accountSid, string $conferenceSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'conferenceSid' => $conferenceSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences/' . \rawurlencode($conferenceSid) . '/Participants.json'; } /** * Create the ParticipantInstance * * @param string $from The phone number, Client identifier, or username portion * of SIP address that made this call. * @param string $to The phone number, SIP address or Client identifier that * received this call. * @param array|Options $options Optional Arguments * @return ParticipantInstance Created ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $from, string $to, array $options = []): ParticipantInstance { $options = new Values($options); $data = Values::of([ 'From' => $from, 'To' => $to, 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'StatusCallbackEvent' => Serialize::map($options['statusCallbackEvent'], function($e) { return $e; }), 'Label' => $options['label'], 'Timeout' => $options['timeout'], 'Record' => Serialize::booleanToString($options['record']), 'Muted' => Serialize::booleanToString($options['muted']), 'Beep' => $options['beep'], 'StartConferenceOnEnter' => Serialize::booleanToString($options['startConferenceOnEnter']), 'EndConferenceOnExit' => Serialize::booleanToString($options['endConferenceOnExit']), 'WaitUrl' => $options['waitUrl'], 'WaitMethod' => $options['waitMethod'], 'EarlyMedia' => Serialize::booleanToString($options['earlyMedia']), 'MaxParticipants' => $options['maxParticipants'], 'ConferenceRecord' => $options['conferenceRecord'], 'ConferenceTrim' => $options['conferenceTrim'], 'ConferenceStatusCallback' => $options['conferenceStatusCallback'], 'ConferenceStatusCallbackMethod' => $options['conferenceStatusCallbackMethod'], 'ConferenceStatusCallbackEvent' => Serialize::map($options['conferenceStatusCallbackEvent'], function($e) { return $e; }), 'RecordingChannels' => $options['recordingChannels'], 'RecordingStatusCallback' => $options['recordingStatusCallback'], 'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'], 'SipAuthUsername' => $options['sipAuthUsername'], 'SipAuthPassword' => $options['sipAuthPassword'], 'Region' => $options['region'], 'ConferenceRecordingStatusCallback' => $options['conferenceRecordingStatusCallback'], 'ConferenceRecordingStatusCallbackMethod' => $options['conferenceRecordingStatusCallbackMethod'], 'RecordingStatusCallbackEvent' => Serialize::map($options['recordingStatusCallbackEvent'], function($e) { return $e; }), 'ConferenceRecordingStatusCallbackEvent' => Serialize::map($options['conferenceRecordingStatusCallbackEvent'], function($e) { return $e; }), 'Coaching' => Serialize::booleanToString($options['coaching']), 'CallSidToCoach' => $options['callSidToCoach'], 'JitterBufferSize' => $options['jitterBufferSize'], 'Byoc' => $options['byoc'], 'CallerId' => $options['callerId'], 'CallReason' => $options['callReason'], 'RecordingTrack' => $options['recordingTrack'], 'TimeLimit' => $options['timeLimit'], 'MachineDetection' => $options['machineDetection'], 'MachineDetectionTimeout' => $options['machineDetectionTimeout'], 'MachineDetectionSpeechThreshold' => $options['machineDetectionSpeechThreshold'], 'MachineDetectionSpeechEndThreshold' => $options['machineDetectionSpeechEndThreshold'], 'MachineDetectionSilenceTimeout' => $options['machineDetectionSilenceTimeout'], 'AmdStatusCallback' => $options['amdStatusCallback'], 'AmdStatusCallbackMethod' => $options['amdStatusCallbackMethod'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ParticipantInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['conferenceSid'] ); } /** * Streams ParticipantInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ParticipantInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 ParticipantInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ParticipantInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 ParticipantPage Page of ParticipantInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ParticipantPage { $options = new Values($options); $params = Values::of([ 'Muted' => Serialize::booleanToString($options['muted']), 'Hold' => Serialize::booleanToString($options['hold']), 'Coaching' => Serialize::booleanToString($options['coaching']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ParticipantPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ParticipantInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ParticipantPage Page of ParticipantInstance */ public function getPage(string $targetUrl): ParticipantPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ParticipantPage($this->version, $response, $this->solution); } /** * Constructs a ParticipantContext * * @param string $callSid The Call SID or URL encoded label of the participant * to fetch */ public function getContext(string $callSid): ParticipantContext { return new ParticipantContext( $this->version, $this->solution['accountSid'], $this->solution['conferenceSid'], $callSid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ParticipantList]'; } } V2010/Account/Conference/RecordingList.php 0000644 00000013335 15111164002 0014174 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Conference; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class RecordingList extends ListResource { /** * Construct the RecordingList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $conferenceSid The Conference SID that identifies the * conference associated with the recording */ public function __construct(Version $version, string $accountSid, string $conferenceSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'conferenceSid' => $conferenceSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences/' . \rawurlencode($conferenceSid) . '/Recordings.json'; } /** * Streams RecordingInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RecordingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 RecordingInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of RecordingInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 RecordingPage Page of RecordingInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RecordingPage { $options = new Values($options); $params = Values::of([ 'DateCreated<' => Serialize::iso8601Date($options['dateCreatedBefore']), 'DateCreated' => Serialize::iso8601Date($options['dateCreated']), 'DateCreated>' => Serialize::iso8601Date($options['dateCreatedAfter']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RecordingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RecordingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RecordingPage Page of RecordingInstance */ public function getPage(string $targetUrl): RecordingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RecordingPage($this->version, $response, $this->solution); } /** * Constructs a RecordingContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): RecordingContext { return new RecordingContext( $this->version, $this->solution['accountSid'], $this->solution['conferenceSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.RecordingList]'; } } V2010/Account/Conference/ParticipantInstance.php 0000644 00000012270 15111164002 0015364 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Conference; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $callSid * @property string $label * @property string $callSidToCoach * @property bool $coaching * @property string $conferenceSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property bool $endConferenceOnExit * @property bool $muted * @property bool $hold * @property bool $startConferenceOnEnter * @property string $status * @property string $uri */ class ParticipantInstance extends InstanceResource { /** * Initialize the ParticipantInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $conferenceSid The SID of the conference the participant is in * @param string $callSid The Call SID or URL encoded label of the participant * to fetch */ public function __construct(Version $version, array $payload, string $accountSid, string $conferenceSid, string $callSid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'label' => Values::array_get($payload, 'label'), 'callSidToCoach' => Values::array_get($payload, 'call_sid_to_coach'), 'coaching' => Values::array_get($payload, 'coaching'), 'conferenceSid' => Values::array_get($payload, 'conference_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'endConferenceOnExit' => Values::array_get($payload, 'end_conference_on_exit'), 'muted' => Values::array_get($payload, 'muted'), 'hold' => Values::array_get($payload, 'hold'), 'startConferenceOnEnter' => Values::array_get($payload, 'start_conference_on_enter'), 'status' => Values::array_get($payload, 'status'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'conferenceSid' => $conferenceSid, 'callSid' => $callSid ?: $this->properties['callSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ParticipantContext Context for this ParticipantInstance */ protected function proxy(): ParticipantContext { if (!$this->context) { $this->context = new ParticipantContext( $this->version, $this->solution['accountSid'], $this->solution['conferenceSid'], $this->solution['callSid'] ); } return $this->context; } /** * Fetch the ParticipantInstance * * @return ParticipantInstance Fetched ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ParticipantInstance { return $this->proxy()->fetch(); } /** * Update the ParticipantInstance * * @param array|Options $options Optional Arguments * @return ParticipantInstance Updated ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ParticipantInstance { return $this->proxy()->update($options); } /** * Delete the ParticipantInstance * * @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.Api.V2010.ParticipantInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Conference/RecordingOptions.php 0000644 00000012425 15111164003 0014714 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Conference; use Twilio\Options; use Twilio\Values; abstract class RecordingOptions { /** * @param string $pauseBehavior Whether to record during a pause * @return UpdateRecordingOptions Options builder */ public static function update(string $pauseBehavior = Values::NONE): UpdateRecordingOptions { return new UpdateRecordingOptions($pauseBehavior); } /** * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to * read * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to * read * @return ReadRecordingOptions Options builder */ public static function read(string $dateCreatedBefore = Values::NONE, string $dateCreated = Values::NONE, string $dateCreatedAfter = Values::NONE): ReadRecordingOptions { return new ReadRecordingOptions($dateCreatedBefore, $dateCreated, $dateCreatedAfter); } } class UpdateRecordingOptions extends Options { /** * @param string $pauseBehavior Whether to record during a pause */ public function __construct(string $pauseBehavior = Values::NONE) { $this->options['pauseBehavior'] = $pauseBehavior; } /** * Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. * * @param string $pauseBehavior Whether to record during a pause * @return $this Fluent Builder */ public function setPauseBehavior(string $pauseBehavior): self { $this->options['pauseBehavior'] = $pauseBehavior; 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.Api.V2010.UpdateRecordingOptions ' . $options . ']'; } } class ReadRecordingOptions extends Options { /** * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to * read * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to * read */ public function __construct(string $dateCreatedBefore = Values::NONE, string $dateCreated = Values::NONE, string $dateCreatedAfter = Values::NONE) { $this->options['dateCreatedBefore'] = $dateCreatedBefore; $this->options['dateCreated'] = $dateCreated; $this->options['dateCreatedAfter'] = $dateCreatedAfter; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. * * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to * read * @return $this Fluent Builder */ public function setDateCreatedBefore(string $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. * * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read * @return $this Fluent Builder */ public function setDateCreated(string $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. * * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to * read * @return $this Fluent Builder */ public function setDateCreatedAfter(string $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; 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.Api.V2010.ReadRecordingOptions ' . $options . ']'; } } V2010/Account/Conference/RecordingContext.php 0000644 00000006171 15111164003 0014706 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Conference; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Values; use Twilio\Version; class RecordingContext extends InstanceContext { /** * Initialize the RecordingContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $conferenceSid Fetch by unique Conference SID for the recording * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $conferenceSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'conferenceSid' => $conferenceSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences/' . \rawurlencode($conferenceSid) . '/Recordings/' . \rawurlencode($sid) . '.json'; } /** * Update the RecordingInstance * * @param string $status The new status of the recording * @param array|Options $options Optional Arguments * @return RecordingInstance Updated RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status, array $options = []): RecordingInstance { $options = new Values($options); $data = Values::of(['Status' => $status, 'PauseBehavior' => $options['pauseBehavior'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RecordingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['conferenceSid'], $this->solution['sid'] ); } /** * Fetch the RecordingInstance * * @return RecordingInstance Fetched RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RecordingInstance { $payload = $this->version->fetch('GET', $this->uri); return new RecordingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['conferenceSid'], $this->solution['sid'] ); } /** * Delete the RecordingInstance * * @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.Api.V2010.RecordingContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Conference/ParticipantContext.php 0000644 00000007701 15111164003 0015250 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Conference; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Serialize; use Twilio\Values; use Twilio\Version; class ParticipantContext extends InstanceContext { /** * Initialize the ParticipantContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $conferenceSid The SID of the conference with the participant * to fetch * @param string $callSid The Call SID or URL encoded label of the participant * to fetch */ public function __construct(Version $version, $accountSid, $conferenceSid, $callSid) { parent::__construct($version); // Path Solution $this->solution = [ 'accountSid' => $accountSid, 'conferenceSid' => $conferenceSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences/' . \rawurlencode($conferenceSid) . '/Participants/' . \rawurlencode($callSid) . '.json'; } /** * Fetch the ParticipantInstance * * @return ParticipantInstance Fetched ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ParticipantInstance { $payload = $this->version->fetch('GET', $this->uri); return new ParticipantInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['conferenceSid'], $this->solution['callSid'] ); } /** * Update the ParticipantInstance * * @param array|Options $options Optional Arguments * @return ParticipantInstance Updated ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ParticipantInstance { $options = new Values($options); $data = Values::of([ 'Muted' => Serialize::booleanToString($options['muted']), 'Hold' => Serialize::booleanToString($options['hold']), 'HoldUrl' => $options['holdUrl'], 'HoldMethod' => $options['holdMethod'], 'AnnounceUrl' => $options['announceUrl'], 'AnnounceMethod' => $options['announceMethod'], 'WaitUrl' => $options['waitUrl'], 'WaitMethod' => $options['waitMethod'], 'BeepOnExit' => Serialize::booleanToString($options['beepOnExit']), 'EndConferenceOnExit' => Serialize::booleanToString($options['endConferenceOnExit']), 'Coaching' => Serialize::booleanToString($options['coaching']), 'CallSidToCoach' => $options['callSidToCoach'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ParticipantInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['conferenceSid'], $this->solution['callSid'] ); } /** * Delete the ParticipantInstance * * @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.Api.V2010.ParticipantContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Conference/RecordingInstance.php 0000644 00000012766 15111164003 0015035 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Conference; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property string $callSid * @property string $conferenceSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property \DateTime $startTime * @property string $duration * @property string $sid * @property string $price * @property string $priceUnit * @property string $status * @property int $channels * @property string $source * @property int $errorCode * @property array $encryptionDetails * @property string $uri */ class RecordingInstance extends InstanceResource { /** * Initialize the RecordingInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $conferenceSid The Conference SID that identifies the * conference associated with the recording * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $conferenceSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'callSid' => Values::array_get($payload, 'call_sid'), 'conferenceSid' => Values::array_get($payload, 'conference_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'duration' => Values::array_get($payload, 'duration'), 'sid' => Values::array_get($payload, 'sid'), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'status' => Values::array_get($payload, 'status'), 'channels' => Values::array_get($payload, 'channels'), 'source' => Values::array_get($payload, 'source'), 'errorCode' => Values::array_get($payload, 'error_code'), 'encryptionDetails' => Values::array_get($payload, 'encryption_details'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'conferenceSid' => $conferenceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RecordingContext Context for this RecordingInstance */ protected function proxy(): RecordingContext { if (!$this->context) { $this->context = new RecordingContext( $this->version, $this->solution['accountSid'], $this->solution['conferenceSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the RecordingInstance * * @param string $status The new status of the recording * @param array|Options $options Optional Arguments * @return RecordingInstance Updated RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status, array $options = []): RecordingInstance { return $this->proxy()->update($status, $options); } /** * Fetch the RecordingInstance * * @return RecordingInstance Fetched RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RecordingInstance { return $this->proxy()->fetch(); } /** * Delete the RecordingInstance * * @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.Api.V2010.RecordingInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Conference/ParticipantOptions.php 0000644 00000164715 15111164004 0015271 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Conference; use Twilio\Options; use Twilio\Values; abstract class ParticipantOptions { /** * @param bool $muted Whether the participant should be muted * @param bool $hold Whether the participant should be on hold * @param string $holdUrl The URL we call using the `hold_method` for music * that plays when the participant is on hold * @param string $holdMethod The HTTP method we should use to call hold_url * @param string $announceUrl The URL we call using the `announce_method` for * an announcement to the participant * @param string $announceMethod The HTTP method we should use to call * announce_url * @param string $waitUrl The URL we call using the `wait_method` for the music * to play while participants are waiting for the * conference to start * @param string $waitMethod The HTTP method we should use to call `wait_url` * @param bool $beepOnExit Whether to play a notification beep to the * conference when the participant exit * @param bool $endConferenceOnExit Whether to end the conference when the * participant leaves * @param bool $coaching Indicates if the participant changed to coach * @param string $callSidToCoach The SID of the participant who is being * `coached` * @return UpdateParticipantOptions Options builder */ public static function update(bool $muted = Values::NONE, bool $hold = Values::NONE, string $holdUrl = Values::NONE, string $holdMethod = Values::NONE, string $announceUrl = Values::NONE, string $announceMethod = Values::NONE, string $waitUrl = Values::NONE, string $waitMethod = Values::NONE, bool $beepOnExit = Values::NONE, bool $endConferenceOnExit = Values::NONE, bool $coaching = Values::NONE, string $callSidToCoach = Values::NONE): UpdateParticipantOptions { return new UpdateParticipantOptions($muted, $hold, $holdUrl, $holdMethod, $announceUrl, $announceMethod, $waitUrl, $waitMethod, $beepOnExit, $endConferenceOnExit, $coaching, $callSidToCoach); } /** * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod The HTTP method we should use to call * `status_callback` * @param string[] $statusCallbackEvent Set state change events that will * trigger a callback * @param string $label The label of this participant * @param int $timeout he number of seconds that we should wait for an answer * @param bool $record Whether to record the participant and their conferences * @param bool $muted Whether to mute the agent * @param string $beep Whether to play a notification beep to the conference * when the participant joins * @param bool $startConferenceOnEnter Whether the conference starts when the * participant joins the conference * @param bool $endConferenceOnExit Whether to end the conference when the * participant leaves * @param string $waitUrl URL that hosts pre-conference hold music * @param string $waitMethod The HTTP method we should use to call `wait_url` * @param bool $earlyMedia Whether agents can hear the state of the outbound * call * @param int $maxParticipants The maximum number of agent conference * participants * @param string $conferenceRecord Whether to record the conference the * participant is joining * @param string $conferenceTrim Whether to trim leading and trailing silence * from your recorded conference audio files * @param string $conferenceStatusCallback The callback URL for conference * events * @param string $conferenceStatusCallbackMethod HTTP method for requesting * `conference_status_callback` * URL * @param string[] $conferenceStatusCallbackEvent The conference state changes * that should generate a call * to * `conference_status_callback` * @param string $recordingChannels Specify `mono` or `dual` recording channels * @param string $recordingStatusCallback The URL that we should call using the * `recording_status_callback_method` * when the recording status changes * @param string $recordingStatusCallbackMethod The HTTP method we should use * when we call * `recording_status_callback` * @param string $sipAuthUsername The SIP username used for authentication * @param string $sipAuthPassword The SIP password for authentication * @param string $region The region where we should mix the conference audio * @param string $conferenceRecordingStatusCallback The URL we should call * using the * `conference_recording_status_callback_method` when the conference recording is available * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we * should use to call * `conference_recording_status_callback` * @param string[] $recordingStatusCallbackEvent The recording state changes * that should generate a call to * `recording_status_callback` * @param string[] $conferenceRecordingStatusCallbackEvent The conference * recording state * changes that should * generate a call to * `conference_recording_status_callback` * @param bool $coaching Indicates if the participant changed to coach * @param string $callSidToCoach The SID of the participant who is being * `coached` * @param string $jitterBufferSize Jitter Buffer size for the connecting * participant * @param string $byoc BYOC trunk SID (Beta) * @param string $callerId The phone number, Client identifier, or username * portion of SIP address that made this call. * @param string $callReason Reason for the call (Branded Calls Beta) * @param string $recordingTrack The track(s) to record * @param int $timeLimit The maximum duration of the call in seconds. * @param string $machineDetection Enable machine detection or end of greeting * detection * @param int $machineDetectionTimeout Number of seconds to wait for machine * detection * @param int $machineDetectionSpeechThreshold Number of milliseconds for * measuring stick for the length * of the speech activity * @param int $machineDetectionSpeechEndThreshold Number of milliseconds of * silence after speech activity * @param int $machineDetectionSilenceTimeout Number of milliseconds of initial * silence * @param string $amdStatusCallback The URL we should call to send amd status * information to your application * @param string $amdStatusCallbackMethod HTTP Method to use with * amd_status_callback * @return CreateParticipantOptions Options builder */ public static function create(string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, array $statusCallbackEvent = Values::ARRAY_NONE, string $label = Values::NONE, int $timeout = Values::NONE, bool $record = Values::NONE, bool $muted = Values::NONE, string $beep = Values::NONE, bool $startConferenceOnEnter = Values::NONE, bool $endConferenceOnExit = Values::NONE, string $waitUrl = Values::NONE, string $waitMethod = Values::NONE, bool $earlyMedia = Values::NONE, int $maxParticipants = Values::NONE, string $conferenceRecord = Values::NONE, string $conferenceTrim = Values::NONE, string $conferenceStatusCallback = Values::NONE, string $conferenceStatusCallbackMethod = Values::NONE, array $conferenceStatusCallbackEvent = Values::ARRAY_NONE, string $recordingChannels = Values::NONE, string $recordingStatusCallback = Values::NONE, string $recordingStatusCallbackMethod = Values::NONE, string $sipAuthUsername = Values::NONE, string $sipAuthPassword = Values::NONE, string $region = Values::NONE, string $conferenceRecordingStatusCallback = Values::NONE, string $conferenceRecordingStatusCallbackMethod = Values::NONE, array $recordingStatusCallbackEvent = Values::ARRAY_NONE, array $conferenceRecordingStatusCallbackEvent = Values::ARRAY_NONE, bool $coaching = Values::NONE, string $callSidToCoach = Values::NONE, string $jitterBufferSize = Values::NONE, string $byoc = Values::NONE, string $callerId = Values::NONE, string $callReason = Values::NONE, string $recordingTrack = Values::NONE, int $timeLimit = Values::NONE, string $machineDetection = Values::NONE, int $machineDetectionTimeout = Values::NONE, int $machineDetectionSpeechThreshold = Values::NONE, int $machineDetectionSpeechEndThreshold = Values::NONE, int $machineDetectionSilenceTimeout = Values::NONE, string $amdStatusCallback = Values::NONE, string $amdStatusCallbackMethod = Values::NONE): CreateParticipantOptions { return new CreateParticipantOptions($statusCallback, $statusCallbackMethod, $statusCallbackEvent, $label, $timeout, $record, $muted, $beep, $startConferenceOnEnter, $endConferenceOnExit, $waitUrl, $waitMethod, $earlyMedia, $maxParticipants, $conferenceRecord, $conferenceTrim, $conferenceStatusCallback, $conferenceStatusCallbackMethod, $conferenceStatusCallbackEvent, $recordingChannels, $recordingStatusCallback, $recordingStatusCallbackMethod, $sipAuthUsername, $sipAuthPassword, $region, $conferenceRecordingStatusCallback, $conferenceRecordingStatusCallbackMethod, $recordingStatusCallbackEvent, $conferenceRecordingStatusCallbackEvent, $coaching, $callSidToCoach, $jitterBufferSize, $byoc, $callerId, $callReason, $recordingTrack, $timeLimit, $machineDetection, $machineDetectionTimeout, $machineDetectionSpeechThreshold, $machineDetectionSpeechEndThreshold, $machineDetectionSilenceTimeout, $amdStatusCallback, $amdStatusCallbackMethod); } /** * @param bool $muted Whether to return only participants that are muted * @param bool $hold Whether to return only participants that are on hold * @param bool $coaching Whether to return only participants who are coaching * another call * @return ReadParticipantOptions Options builder */ public static function read(bool $muted = Values::NONE, bool $hold = Values::NONE, bool $coaching = Values::NONE): ReadParticipantOptions { return new ReadParticipantOptions($muted, $hold, $coaching); } } class UpdateParticipantOptions extends Options { /** * @param bool $muted Whether the participant should be muted * @param bool $hold Whether the participant should be on hold * @param string $holdUrl The URL we call using the `hold_method` for music * that plays when the participant is on hold * @param string $holdMethod The HTTP method we should use to call hold_url * @param string $announceUrl The URL we call using the `announce_method` for * an announcement to the participant * @param string $announceMethod The HTTP method we should use to call * announce_url * @param string $waitUrl The URL we call using the `wait_method` for the music * to play while participants are waiting for the * conference to start * @param string $waitMethod The HTTP method we should use to call `wait_url` * @param bool $beepOnExit Whether to play a notification beep to the * conference when the participant exit * @param bool $endConferenceOnExit Whether to end the conference when the * participant leaves * @param bool $coaching Indicates if the participant changed to coach * @param string $callSidToCoach The SID of the participant who is being * `coached` */ public function __construct(bool $muted = Values::NONE, bool $hold = Values::NONE, string $holdUrl = Values::NONE, string $holdMethod = Values::NONE, string $announceUrl = Values::NONE, string $announceMethod = Values::NONE, string $waitUrl = Values::NONE, string $waitMethod = Values::NONE, bool $beepOnExit = Values::NONE, bool $endConferenceOnExit = Values::NONE, bool $coaching = Values::NONE, string $callSidToCoach = Values::NONE) { $this->options['muted'] = $muted; $this->options['hold'] = $hold; $this->options['holdUrl'] = $holdUrl; $this->options['holdMethod'] = $holdMethod; $this->options['announceUrl'] = $announceUrl; $this->options['announceMethod'] = $announceMethod; $this->options['waitUrl'] = $waitUrl; $this->options['waitMethod'] = $waitMethod; $this->options['beepOnExit'] = $beepOnExit; $this->options['endConferenceOnExit'] = $endConferenceOnExit; $this->options['coaching'] = $coaching; $this->options['callSidToCoach'] = $callSidToCoach; } /** * Whether the participant should be muted. Can be `true` or `false`. `true` will mute the participant, and `false` will un-mute them. Anything value other than `true` or `false` is interpreted as `false`. * * @param bool $muted Whether the participant should be muted * @return $this Fluent Builder */ public function setMuted(bool $muted): self { $this->options['muted'] = $muted; return $this; } /** * Whether the participant should be on hold. Can be: `true` or `false`. `true` puts the participant on hold, and `false` lets them rejoin the conference. * * @param bool $hold Whether the participant should be on hold * @return $this Fluent Builder */ public function setHold(bool $hold): self { $this->options['hold'] = $hold; return $this; } /** * The URL we call using the `hold_method` for music that plays when the participant is on hold. The URL may return an MP3 file, a WAV file, or a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>` verbs. * * @param string $holdUrl The URL we call using the `hold_method` for music * that plays when the participant is on hold * @return $this Fluent Builder */ public function setHoldUrl(string $holdUrl): self { $this->options['holdUrl'] = $holdUrl; return $this; } /** * The HTTP method we should use to call `hold_url`. Can be: `GET` or `POST` and the default is `GET`. * * @param string $holdMethod The HTTP method we should use to call hold_url * @return $this Fluent Builder */ public function setHoldMethod(string $holdMethod): self { $this->options['holdMethod'] = $holdMethod; return $this; } /** * The URL we call using the `announce_method` for an announcement to the participant. The URL may return an MP3 file, a WAV file, or a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>` verbs. * * @param string $announceUrl The URL we call using the `announce_method` for * an announcement to the participant * @return $this Fluent Builder */ public function setAnnounceUrl(string $announceUrl): self { $this->options['announceUrl'] = $announceUrl; return $this; } /** * The HTTP method we should use to call `announce_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $announceMethod The HTTP method we should use to call * announce_url * @return $this Fluent Builder */ public function setAnnounceMethod(string $announceMethod): self { $this->options['announceMethod'] = $announceMethod; return $this; } /** * The URL we call using the `wait_method` for the music to play while participants are waiting for the conference to start. The URL may return an MP3 file, a WAV file, or a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>` verbs. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). * * @param string $waitUrl The URL we call using the `wait_method` for the music * to play while participants are waiting for the * conference to start * @return $this Fluent Builder */ public function setWaitUrl(string $waitUrl): self { $this->options['waitUrl'] = $waitUrl; return $this; } /** * The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. * * @param string $waitMethod The HTTP method we should use to call `wait_url` * @return $this Fluent Builder */ public function setWaitMethod(string $waitMethod): self { $this->options['waitMethod'] = $waitMethod; return $this; } /** * Whether to play a notification beep to the conference when the participant exits. Can be: `true` or `false`. * * @param bool $beepOnExit Whether to play a notification beep to the * conference when the participant exit * @return $this Fluent Builder */ public function setBeepOnExit(bool $beepOnExit): self { $this->options['beepOnExit'] = $beepOnExit; return $this; } /** * Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. * * @param bool $endConferenceOnExit Whether to end the conference when the * participant leaves * @return $this Fluent Builder */ public function setEndConferenceOnExit(bool $endConferenceOnExit): self { $this->options['endConferenceOnExit'] = $endConferenceOnExit; return $this; } /** * Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. * * @param bool $coaching Indicates if the participant changed to coach * @return $this Fluent Builder */ public function setCoaching(bool $coaching): self { $this->options['coaching'] = $coaching; return $this; } /** * The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. * * @param string $callSidToCoach The SID of the participant who is being * `coached` * @return $this Fluent Builder */ public function setCallSidToCoach(string $callSidToCoach): self { $this->options['callSidToCoach'] = $callSidToCoach; 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.Api.V2010.UpdateParticipantOptions ' . $options . ']'; } } class CreateParticipantOptions extends Options { /** * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod The HTTP method we should use to call * `status_callback` * @param string[] $statusCallbackEvent Set state change events that will * trigger a callback * @param string $label The label of this participant * @param int $timeout he number of seconds that we should wait for an answer * @param bool $record Whether to record the participant and their conferences * @param bool $muted Whether to mute the agent * @param string $beep Whether to play a notification beep to the conference * when the participant joins * @param bool $startConferenceOnEnter Whether the conference starts when the * participant joins the conference * @param bool $endConferenceOnExit Whether to end the conference when the * participant leaves * @param string $waitUrl URL that hosts pre-conference hold music * @param string $waitMethod The HTTP method we should use to call `wait_url` * @param bool $earlyMedia Whether agents can hear the state of the outbound * call * @param int $maxParticipants The maximum number of agent conference * participants * @param string $conferenceRecord Whether to record the conference the * participant is joining * @param string $conferenceTrim Whether to trim leading and trailing silence * from your recorded conference audio files * @param string $conferenceStatusCallback The callback URL for conference * events * @param string $conferenceStatusCallbackMethod HTTP method for requesting * `conference_status_callback` * URL * @param string[] $conferenceStatusCallbackEvent The conference state changes * that should generate a call * to * `conference_status_callback` * @param string $recordingChannels Specify `mono` or `dual` recording channels * @param string $recordingStatusCallback The URL that we should call using the * `recording_status_callback_method` * when the recording status changes * @param string $recordingStatusCallbackMethod The HTTP method we should use * when we call * `recording_status_callback` * @param string $sipAuthUsername The SIP username used for authentication * @param string $sipAuthPassword The SIP password for authentication * @param string $region The region where we should mix the conference audio * @param string $conferenceRecordingStatusCallback The URL we should call * using the * `conference_recording_status_callback_method` when the conference recording is available * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we * should use to call * `conference_recording_status_callback` * @param string[] $recordingStatusCallbackEvent The recording state changes * that should generate a call to * `recording_status_callback` * @param string[] $conferenceRecordingStatusCallbackEvent The conference * recording state * changes that should * generate a call to * `conference_recording_status_callback` * @param bool $coaching Indicates if the participant changed to coach * @param string $callSidToCoach The SID of the participant who is being * `coached` * @param string $jitterBufferSize Jitter Buffer size for the connecting * participant * @param string $byoc BYOC trunk SID (Beta) * @param string $callerId The phone number, Client identifier, or username * portion of SIP address that made this call. * @param string $callReason Reason for the call (Branded Calls Beta) * @param string $recordingTrack The track(s) to record * @param int $timeLimit The maximum duration of the call in seconds. * @param string $machineDetection Enable machine detection or end of greeting * detection * @param int $machineDetectionTimeout Number of seconds to wait for machine * detection * @param int $machineDetectionSpeechThreshold Number of milliseconds for * measuring stick for the length * of the speech activity * @param int $machineDetectionSpeechEndThreshold Number of milliseconds of * silence after speech activity * @param int $machineDetectionSilenceTimeout Number of milliseconds of initial * silence * @param string $amdStatusCallback The URL we should call to send amd status * information to your application * @param string $amdStatusCallbackMethod HTTP Method to use with * amd_status_callback */ public function __construct(string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, array $statusCallbackEvent = Values::ARRAY_NONE, string $label = Values::NONE, int $timeout = Values::NONE, bool $record = Values::NONE, bool $muted = Values::NONE, string $beep = Values::NONE, bool $startConferenceOnEnter = Values::NONE, bool $endConferenceOnExit = Values::NONE, string $waitUrl = Values::NONE, string $waitMethod = Values::NONE, bool $earlyMedia = Values::NONE, int $maxParticipants = Values::NONE, string $conferenceRecord = Values::NONE, string $conferenceTrim = Values::NONE, string $conferenceStatusCallback = Values::NONE, string $conferenceStatusCallbackMethod = Values::NONE, array $conferenceStatusCallbackEvent = Values::ARRAY_NONE, string $recordingChannels = Values::NONE, string $recordingStatusCallback = Values::NONE, string $recordingStatusCallbackMethod = Values::NONE, string $sipAuthUsername = Values::NONE, string $sipAuthPassword = Values::NONE, string $region = Values::NONE, string $conferenceRecordingStatusCallback = Values::NONE, string $conferenceRecordingStatusCallbackMethod = Values::NONE, array $recordingStatusCallbackEvent = Values::ARRAY_NONE, array $conferenceRecordingStatusCallbackEvent = Values::ARRAY_NONE, bool $coaching = Values::NONE, string $callSidToCoach = Values::NONE, string $jitterBufferSize = Values::NONE, string $byoc = Values::NONE, string $callerId = Values::NONE, string $callReason = Values::NONE, string $recordingTrack = Values::NONE, int $timeLimit = Values::NONE, string $machineDetection = Values::NONE, int $machineDetectionTimeout = Values::NONE, int $machineDetectionSpeechThreshold = Values::NONE, int $machineDetectionSpeechEndThreshold = Values::NONE, int $machineDetectionSilenceTimeout = Values::NONE, string $amdStatusCallback = Values::NONE, string $amdStatusCallbackMethod = Values::NONE) { $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['statusCallbackEvent'] = $statusCallbackEvent; $this->options['label'] = $label; $this->options['timeout'] = $timeout; $this->options['record'] = $record; $this->options['muted'] = $muted; $this->options['beep'] = $beep; $this->options['startConferenceOnEnter'] = $startConferenceOnEnter; $this->options['endConferenceOnExit'] = $endConferenceOnExit; $this->options['waitUrl'] = $waitUrl; $this->options['waitMethod'] = $waitMethod; $this->options['earlyMedia'] = $earlyMedia; $this->options['maxParticipants'] = $maxParticipants; $this->options['conferenceRecord'] = $conferenceRecord; $this->options['conferenceTrim'] = $conferenceTrim; $this->options['conferenceStatusCallback'] = $conferenceStatusCallback; $this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod; $this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent; $this->options['recordingChannels'] = $recordingChannels; $this->options['recordingStatusCallback'] = $recordingStatusCallback; $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; $this->options['sipAuthUsername'] = $sipAuthUsername; $this->options['sipAuthPassword'] = $sipAuthPassword; $this->options['region'] = $region; $this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback; $this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod; $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent; $this->options['conferenceRecordingStatusCallbackEvent'] = $conferenceRecordingStatusCallbackEvent; $this->options['coaching'] = $coaching; $this->options['callSidToCoach'] = $callSidToCoach; $this->options['jitterBufferSize'] = $jitterBufferSize; $this->options['byoc'] = $byoc; $this->options['callerId'] = $callerId; $this->options['callReason'] = $callReason; $this->options['recordingTrack'] = $recordingTrack; $this->options['timeLimit'] = $timeLimit; $this->options['machineDetection'] = $machineDetection; $this->options['machineDetectionTimeout'] = $machineDetectionTimeout; $this->options['machineDetectionSpeechThreshold'] = $machineDetectionSpeechThreshold; $this->options['machineDetectionSpeechEndThreshold'] = $machineDetectionSpeechEndThreshold; $this->options['machineDetectionSilenceTimeout'] = $machineDetectionSilenceTimeout; $this->options['amdStatusCallback'] = $amdStatusCallback; $this->options['amdStatusCallbackMethod'] = $amdStatusCallbackMethod; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` and `POST` and defaults to `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * `status_callback` * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The conference state changes that should generate a call to `status_callback`. Can be: `initiated`, `ringing`, `answered`, and `completed`. Separate multiple values with a space. The default value is `completed`. * * @param string[] $statusCallbackEvent Set state change events that will * trigger a callback * @return $this Fluent Builder */ public function setStatusCallbackEvent(array $statusCallbackEvent): self { $this->options['statusCallbackEvent'] = $statusCallbackEvent; return $this; } /** * A label for this participant. If one is supplied, it may subsequently be used to fetch, update or delete the participant. * * @param string $label The label of this participant * @return $this Fluent Builder */ public function setLabel(string $label): self { $this->options['label'] = $label; return $this; } /** * The number of seconds that we should allow the phone to ring before assuming there is no answer. Can be an integer between `5` and `600`, inclusive. The default value is `60`. We always add a 5-second timeout buffer to outgoing calls, so value of 10 would result in an actual timeout that was closer to 15 seconds. * * @param int $timeout he number of seconds that we should wait for an answer * @return $this Fluent Builder */ public function setTimeout(int $timeout): self { $this->options['timeout'] = $timeout; return $this; } /** * Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`. * * @param bool $record Whether to record the participant and their conferences * @return $this Fluent Builder */ public function setRecord(bool $record): self { $this->options['record'] = $record; return $this; } /** * Whether the agent is muted in the conference. Can be `true` or `false` and the default is `false`. * * @param bool $muted Whether to mute the agent * @return $this Fluent Builder */ public function setMuted(bool $muted): self { $this->options['muted'] = $muted; return $this; } /** * Whether to play a notification beep to the conference when the participant joins. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. * * @param string $beep Whether to play a notification beep to the conference * when the participant joins * @return $this Fluent Builder */ public function setBeep(string $beep): self { $this->options['beep'] = $beep; return $this; } /** * Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. * * @param bool $startConferenceOnEnter Whether the conference starts when the * participant joins the conference * @return $this Fluent Builder */ public function setStartConferenceOnEnter(bool $startConferenceOnEnter): self { $this->options['startConferenceOnEnter'] = $startConferenceOnEnter; return $this; } /** * Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. * * @param bool $endConferenceOnExit Whether to end the conference when the * participant leaves * @return $this Fluent Builder */ public function setEndConferenceOnExit(bool $endConferenceOnExit): self { $this->options['endConferenceOnExit'] = $endConferenceOnExit; return $this; } /** * The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). * * @param string $waitUrl URL that hosts pre-conference hold music * @return $this Fluent Builder */ public function setWaitUrl(string $waitUrl): self { $this->options['waitUrl'] = $waitUrl; return $this; } /** * The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. * * @param string $waitMethod The HTTP method we should use to call `wait_url` * @return $this Fluent Builder */ public function setWaitMethod(string $waitMethod): self { $this->options['waitMethod'] = $waitMethod; return $this; } /** * Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`. * * @param bool $earlyMedia Whether agents can hear the state of the outbound * call * @return $this Fluent Builder */ public function setEarlyMedia(bool $earlyMedia): self { $this->options['earlyMedia'] = $earlyMedia; return $this; } /** * The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. * * @param int $maxParticipants The maximum number of agent conference * participants * @return $this Fluent Builder */ public function setMaxParticipants(int $maxParticipants): self { $this->options['maxParticipants'] = $maxParticipants; return $this; } /** * Whether to record the conference the participant is joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. * * @param string $conferenceRecord Whether to record the conference the * participant is joining * @return $this Fluent Builder */ public function setConferenceRecord(string $conferenceRecord): self { $this->options['conferenceRecord'] = $conferenceRecord; return $this; } /** * Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. * * @param string $conferenceTrim Whether to trim leading and trailing silence * from your recorded conference audio files * @return $this Fluent Builder */ public function setConferenceTrim(string $conferenceTrim): self { $this->options['conferenceTrim'] = $conferenceTrim; return $this; } /** * The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. * * @param string $conferenceStatusCallback The callback URL for conference * events * @return $this Fluent Builder */ public function setConferenceStatusCallback(string $conferenceStatusCallback): self { $this->options['conferenceStatusCallback'] = $conferenceStatusCallback; return $this; } /** * The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $conferenceStatusCallbackMethod HTTP method for requesting * `conference_status_callback` * URL * @return $this Fluent Builder */ public function setConferenceStatusCallbackMethod(string $conferenceStatusCallbackMethod): self { $this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod; return $this; } /** * The conference state changes that should generate a call to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `modify`, `speaker`, and `announcement`. Separate multiple values with a space. Defaults to `start end`. * * @param string[] $conferenceStatusCallbackEvent The conference state changes * that should generate a call * to * `conference_status_callback` * @return $this Fluent Builder */ public function setConferenceStatusCallbackEvent(array $conferenceStatusCallbackEvent): self { $this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent; return $this; } /** * The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. * * @param string $recordingChannels Specify `mono` or `dual` recording channels * @return $this Fluent Builder */ public function setRecordingChannels(string $recordingChannels): self { $this->options['recordingChannels'] = $recordingChannels; return $this; } /** * The URL that we should call using the `recording_status_callback_method` when the recording status changes. * * @param string $recordingStatusCallback The URL that we should call using the * `recording_status_callback_method` * when the recording status changes * @return $this Fluent Builder */ public function setRecordingStatusCallback(string $recordingStatusCallback): self { $this->options['recordingStatusCallback'] = $recordingStatusCallback; return $this; } /** * The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $recordingStatusCallbackMethod The HTTP method we should use * when we call * `recording_status_callback` * @return $this Fluent Builder */ public function setRecordingStatusCallbackMethod(string $recordingStatusCallbackMethod): self { $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; return $this; } /** * The SIP username used for authentication. * * @param string $sipAuthUsername The SIP username used for authentication * @return $this Fluent Builder */ public function setSipAuthUsername(string $sipAuthUsername): self { $this->options['sipAuthUsername'] = $sipAuthUsername; return $this; } /** * The SIP password for authentication. * * @param string $sipAuthPassword The SIP password for authentication * @return $this Fluent Builder */ public function setSipAuthPassword(string $sipAuthPassword): self { $this->options['sipAuthPassword'] = $sipAuthPassword; return $this; } /** * The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. * * @param string $region The region where we should mix the conference audio * @return $this Fluent Builder */ public function setRegion(string $region): self { $this->options['region'] = $region; return $this; } /** * The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. * * @param string $conferenceRecordingStatusCallback The URL we should call * using the * `conference_recording_status_callback_method` when the conference recording is available * @return $this Fluent Builder */ public function setConferenceRecordingStatusCallback(string $conferenceRecordingStatusCallback): self { $this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback; return $this; } /** * The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we * should use to call * `conference_recording_status_callback` * @return $this Fluent Builder */ public function setConferenceRecordingStatusCallbackMethod(string $conferenceRecordingStatusCallbackMethod): self { $this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod; return $this; } /** * The recording state changes that should generate a call to `recording_status_callback`. Can be: `started`, `in-progress`, `paused`, `resumed`, `stopped`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'`. * * @param string[] $recordingStatusCallbackEvent The recording state changes * that should generate a call to * `recording_status_callback` * @return $this Fluent Builder */ public function setRecordingStatusCallbackEvent(array $recordingStatusCallbackEvent): self { $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent; return $this; } /** * The conference recording state changes that generate a call to `conference_recording_status_callback`. Can be: `in-progress`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'` * * @param string[] $conferenceRecordingStatusCallbackEvent The conference * recording state * changes that should * generate a call to * `conference_recording_status_callback` * @return $this Fluent Builder */ public function setConferenceRecordingStatusCallbackEvent(array $conferenceRecordingStatusCallbackEvent): self { $this->options['conferenceRecordingStatusCallbackEvent'] = $conferenceRecordingStatusCallbackEvent; return $this; } /** * Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. * * @param bool $coaching Indicates if the participant changed to coach * @return $this Fluent Builder */ public function setCoaching(bool $coaching): self { $this->options['coaching'] = $coaching; return $this; } /** * The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. * * @param string $callSidToCoach The SID of the participant who is being * `coached` * @return $this Fluent Builder */ public function setCallSidToCoach(string $callSidToCoach): self { $this->options['callSidToCoach'] = $callSidToCoach; return $this; } /** * Jitter buffer size for the connecting participant. Twilio will use this setting to apply Jitter Buffer before participant's audio is mixed into the conference. Can be: `off`, `small`, `medium`, and `large`. Default to `large`. * * @param string $jitterBufferSize Jitter Buffer size for the connecting * participant * @return $this Fluent Builder */ public function setJitterBufferSize(string $jitterBufferSize): self { $this->options['jitterBufferSize'] = $jitterBufferSize; return $this; } /** * The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta) * * @param string $byoc BYOC trunk SID (Beta) * @return $this Fluent Builder */ public function setByoc(string $byoc): self { $this->options['byoc'] = $byoc; return $this; } /** * The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `callerId` must also be a phone number. If `to` is sip address, this value of `callerId` should be a username portion to be used to populate the From header that is passed to the SIP endpoint. * * @param string $callerId The phone number, Client identifier, or username * portion of SIP address that made this call. * @return $this Fluent Builder */ public function setCallerId(string $callerId): self { $this->options['callerId'] = $callerId; return $this; } /** * The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta) * * @param string $callReason Reason for the call (Branded Calls Beta) * @return $this Fluent Builder */ public function setCallReason(string $callReason): self { $this->options['callReason'] = $callReason; return $this; } /** * The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is sent from Twilio. `both` records the audio that is received and sent by Twilio. * * @param string $recordingTrack The track(s) to record * @return $this Fluent Builder */ public function setRecordingTrack(string $recordingTrack): self { $this->options['recordingTrack'] = $recordingTrack; return $this; } /** * The maximum duration of the call in seconds. Constraints depend on account and configuration. * * @param int $timeLimit The maximum duration of the call in seconds. * @return $this Fluent Builder */ public function setTimeLimit(int $timeLimit): self { $this->options['timeLimit'] = $timeLimit; return $this; } /** * Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. If `send_digits` is provided, this parameter is ignored. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection). * * @param string $machineDetection Enable machine detection or end of greeting * detection * @return $this Fluent Builder */ public function setMachineDetection(string $machineDetection): self { $this->options['machineDetection'] = $machineDetection; return $this; } /** * The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds. * * @param int $machineDetectionTimeout Number of seconds to wait for machine * detection * @return $this Fluent Builder */ public function setMachineDetectionTimeout(int $machineDetectionTimeout): self { $this->options['machineDetectionTimeout'] = $machineDetectionTimeout; return $this; } /** * The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400. * * @param int $machineDetectionSpeechThreshold Number of milliseconds for * measuring stick for the length * of the speech activity * @return $this Fluent Builder */ public function setMachineDetectionSpeechThreshold(int $machineDetectionSpeechThreshold): self { $this->options['machineDetectionSpeechThreshold'] = $machineDetectionSpeechThreshold; return $this; } /** * The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200. * * @param int $machineDetectionSpeechEndThreshold Number of milliseconds of * silence after speech activity * @return $this Fluent Builder */ public function setMachineDetectionSpeechEndThreshold(int $machineDetectionSpeechEndThreshold): self { $this->options['machineDetectionSpeechEndThreshold'] = $machineDetectionSpeechEndThreshold; return $this; } /** * The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000. * * @param int $machineDetectionSilenceTimeout Number of milliseconds of initial * silence * @return $this Fluent Builder */ public function setMachineDetectionSilenceTimeout(int $machineDetectionSilenceTimeout): self { $this->options['machineDetectionSilenceTimeout'] = $machineDetectionSilenceTimeout; return $this; } /** * The URL that we should call using the `amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax. * * @param string $amdStatusCallback The URL we should call to send amd status * information to your application * @return $this Fluent Builder */ public function setAmdStatusCallback(string $amdStatusCallback): self { $this->options['amdStatusCallback'] = $amdStatusCallback; return $this; } /** * The HTTP method we should use when calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. * * @param string $amdStatusCallbackMethod HTTP Method to use with * amd_status_callback * @return $this Fluent Builder */ public function setAmdStatusCallbackMethod(string $amdStatusCallbackMethod): self { $this->options['amdStatusCallbackMethod'] = $amdStatusCallbackMethod; 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.Api.V2010.CreateParticipantOptions ' . $options . ']'; } } class ReadParticipantOptions extends Options { /** * @param bool $muted Whether to return only participants that are muted * @param bool $hold Whether to return only participants that are on hold * @param bool $coaching Whether to return only participants who are coaching * another call */ public function __construct(bool $muted = Values::NONE, bool $hold = Values::NONE, bool $coaching = Values::NONE) { $this->options['muted'] = $muted; $this->options['hold'] = $hold; $this->options['coaching'] = $coaching; } /** * Whether to return only participants that are muted. Can be: `true` or `false`. * * @param bool $muted Whether to return only participants that are muted * @return $this Fluent Builder */ public function setMuted(bool $muted): self { $this->options['muted'] = $muted; return $this; } /** * Whether to return only participants that are on hold. Can be: `true` or `false`. * * @param bool $hold Whether to return only participants that are on hold * @return $this Fluent Builder */ public function setHold(bool $hold): self { $this->options['hold'] = $hold; return $this; } /** * Whether to return only participants who are coaching another call. Can be: `true` or `false`. * * @param bool $coaching Whether to return only participants who are coaching * another call * @return $this Fluent Builder */ public function setCoaching(bool $coaching): self { $this->options['coaching'] = $coaching; 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.Api.V2010.ReadParticipantOptions ' . $options . ']'; } } V2010/Account/Conference/RecordingPage.php 0000644 00000002446 15111164007 0014143 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Conference; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class RecordingPage 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 RecordingInstance \Twilio\Rest\Api\V2010\Account\Conference\RecordingInstance */ public function buildInstance(array $payload): RecordingInstance { return new RecordingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['conferenceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.RecordingPage]'; } } V2010/Account/Conference/ParticipantPage.php 0000644 00000002462 15111164010 0014475 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Conference; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class ParticipantPage 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 ParticipantInstance \Twilio\Rest\Api\V2010\Account\Conference\ParticipantInstance */ public function buildInstance(array $payload): ParticipantInstance { return new ParticipantInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['conferenceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ParticipantPage]'; } } V2010/Account/SigningKeyContext.php 0000644 00000005221 15111164010 0012763 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Values; use Twilio\Version; class SigningKeyContext extends InstanceContext { /** * Initialize the SigningKeyContext * * @param Version $version Version that contains the resource * @param string $accountSid The account_sid * @param string $sid The sid */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SigningKeys/' . \rawurlencode($sid) . '.json'; } /** * Fetch the SigningKeyInstance * * @return SigningKeyInstance Fetched SigningKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SigningKeyInstance { $payload = $this->version->fetch('GET', $this->uri); return new SigningKeyInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the SigningKeyInstance * * @param array|Options $options Optional Arguments * @return SigningKeyInstance Updated SigningKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SigningKeyInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SigningKeyInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the SigningKeyInstance * * @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.Api.V2010.SigningKeyContext ' . \implode(' ', $context) . ']'; } } V2010/Account/ShortCodeList.php 0000644 00000012325 15111164011 0012101 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\ListResource; use Twilio\Options; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class ShortCodeList extends ListResource { /** * Construct the ShortCodeList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created this resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SMS/ShortCodes.json'; } /** * Streams ShortCodeInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ShortCodeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 ShortCodeInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ShortCodeInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 ShortCodePage Page of ShortCodeInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ShortCodePage { $options = new Values($options); $params = Values::of([ 'FriendlyName' => $options['friendlyName'], 'ShortCode' => $options['shortCode'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ShortCodePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ShortCodeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ShortCodePage Page of ShortCodeInstance */ public function getPage(string $targetUrl): ShortCodePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ShortCodePage($this->version, $response, $this->solution); } /** * Constructs a ShortCodeContext * * @param string $sid The unique string that identifies this resource */ public function getContext(string $sid): ShortCodeContext { return new ShortCodeContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ShortCodeList]'; } } V2010/Account/BalancePage.php 0000644 00000002250 15111164011 0011471 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class BalancePage 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 BalanceInstance \Twilio\Rest\Api\V2010\Account\BalanceInstance */ public function buildInstance(array $payload): BalanceInstance { return new BalanceInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.BalancePage]'; } } V2010/Account/KeyOptions.php 0000644 00000002677 15111164012 0011471 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class KeyOptions { /** * @param string $friendlyName A string to describe the resource * @return UpdateKeyOptions Options builder */ public static function update(string $friendlyName = Values::NONE): UpdateKeyOptions { return new UpdateKeyOptions($friendlyName); } } class UpdateKeyOptions extends Options { /** * @param string $friendlyName A string to describe the resource */ public function __construct(string $friendlyName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; 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.Api.V2010.UpdateKeyOptions ' . $options . ']'; } } V2010/Account/NewKeyOptions.php 0000644 00000002721 15111164012 0012131 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class NewKeyOptions { /** * @param string $friendlyName A string to describe the resource * @return CreateNewKeyOptions Options builder */ public static function create(string $friendlyName = Values::NONE): CreateNewKeyOptions { return new CreateNewKeyOptions($friendlyName); } } class CreateNewKeyOptions extends Options { /** * @param string $friendlyName A string to describe the resource */ public function __construct(string $friendlyName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; 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.Api.V2010.CreateNewKeyOptions ' . $options . ']'; } } V2010/Account/ApplicationOptions.php 0000644 00000071757 15111164013 0013212 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class ApplicationOptions { /** * @param string $apiVersion The API version to use to start a new TwiML session * @param string $voiceUrl The URL to call when the phone number receives a call * @param string $voiceMethod The HTTP method to use with the voice_url * @param string $voiceFallbackUrl The URL to call when a TwiML error occurs * @param string $voiceFallbackMethod The HTTP method to use with * voice_fallback_url * @param string $statusCallback The URL to send status information to your * application * @param string $statusCallbackMethod The HTTP method to use to call * status_callback * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $smsUrl The URL to call when the phone number receives an * incoming SMS message * @param string $smsMethod The HTTP method to use with sms_url * @param string $smsFallbackUrl The URL to call when an error occurs while * retrieving or executing the TwiML * @param string $smsFallbackMethod The HTTP method to use with sms_fallback_url * @param string $smsStatusCallback The URL to send status information to your * application * @param string $messageStatusCallback The URL to send message status * information to your application * @param string $friendlyName A string to describe the new resource * @param bool $publicApplicationConnectEnabled Whether to allow other Twilio * accounts to dial this * application * @return CreateApplicationOptions Options builder */ public static function create(string $apiVersion = Values::NONE, string $voiceUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $smsUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsStatusCallback = Values::NONE, string $messageStatusCallback = Values::NONE, string $friendlyName = Values::NONE, bool $publicApplicationConnectEnabled = Values::NONE): CreateApplicationOptions { return new CreateApplicationOptions($apiVersion, $voiceUrl, $voiceMethod, $voiceFallbackUrl, $voiceFallbackMethod, $statusCallback, $statusCallbackMethod, $voiceCallerIdLookup, $smsUrl, $smsMethod, $smsFallbackUrl, $smsFallbackMethod, $smsStatusCallback, $messageStatusCallback, $friendlyName, $publicApplicationConnectEnabled); } /** * @param string $friendlyName The string that identifies the Application * resources to read * @return ReadApplicationOptions Options builder */ public static function read(string $friendlyName = Values::NONE): ReadApplicationOptions { return new ReadApplicationOptions($friendlyName); } /** * @param string $friendlyName A string to describe the resource * @param string $apiVersion The API version to use to start a new TwiML session * @param string $voiceUrl The URL to call when the phone number receives a call * @param string $voiceMethod The HTTP method to use with the voice_url * @param string $voiceFallbackUrl The URL to call when a TwiML error occurs * @param string $voiceFallbackMethod The HTTP method to use with * voice_fallback_url * @param string $statusCallback The URL to send status information to your * application * @param string $statusCallbackMethod The HTTP method to use to call * status_callback * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $smsUrl The URL to call when the phone number receives an * incoming SMS message * @param string $smsMethod The HTTP method to use with sms_url * @param string $smsFallbackUrl The URL to call when an error occurs while * retrieving or executing the TwiML * @param string $smsFallbackMethod The HTTP method to use with sms_fallback_url * @param string $smsStatusCallback Same as message_status_callback. * Deprecated, included for backwards * compatibility. * @param string $messageStatusCallback The URL to send message status * information to your application * @param bool $publicApplicationConnectEnabled Whether to allow other Twilio * accounts to dial this * application * @return UpdateApplicationOptions Options builder */ public static function update(string $friendlyName = Values::NONE, string $apiVersion = Values::NONE, string $voiceUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $smsUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsStatusCallback = Values::NONE, string $messageStatusCallback = Values::NONE, bool $publicApplicationConnectEnabled = Values::NONE): UpdateApplicationOptions { return new UpdateApplicationOptions($friendlyName, $apiVersion, $voiceUrl, $voiceMethod, $voiceFallbackUrl, $voiceFallbackMethod, $statusCallback, $statusCallbackMethod, $voiceCallerIdLookup, $smsUrl, $smsMethod, $smsFallbackUrl, $smsFallbackMethod, $smsStatusCallback, $messageStatusCallback, $publicApplicationConnectEnabled); } } class CreateApplicationOptions extends Options { /** * @param string $apiVersion The API version to use to start a new TwiML session * @param string $voiceUrl The URL to call when the phone number receives a call * @param string $voiceMethod The HTTP method to use with the voice_url * @param string $voiceFallbackUrl The URL to call when a TwiML error occurs * @param string $voiceFallbackMethod The HTTP method to use with * voice_fallback_url * @param string $statusCallback The URL to send status information to your * application * @param string $statusCallbackMethod The HTTP method to use to call * status_callback * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $smsUrl The URL to call when the phone number receives an * incoming SMS message * @param string $smsMethod The HTTP method to use with sms_url * @param string $smsFallbackUrl The URL to call when an error occurs while * retrieving or executing the TwiML * @param string $smsFallbackMethod The HTTP method to use with sms_fallback_url * @param string $smsStatusCallback The URL to send status information to your * application * @param string $messageStatusCallback The URL to send message status * information to your application * @param string $friendlyName A string to describe the new resource * @param bool $publicApplicationConnectEnabled Whether to allow other Twilio * accounts to dial this * application */ public function __construct(string $apiVersion = Values::NONE, string $voiceUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $smsUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsStatusCallback = Values::NONE, string $messageStatusCallback = Values::NONE, string $friendlyName = Values::NONE, bool $publicApplicationConnectEnabled = Values::NONE) { $this->options['apiVersion'] = $apiVersion; $this->options['voiceUrl'] = $voiceUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; $this->options['smsUrl'] = $smsUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['smsStatusCallback'] = $smsStatusCallback; $this->options['messageStatusCallback'] = $messageStatusCallback; $this->options['friendlyName'] = $friendlyName; $this->options['publicApplicationConnectEnabled'] = $publicApplicationConnectEnabled; } /** * The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is the account's default API version. * * @param string $apiVersion The API version to use to start a new TwiML session * @return $this Fluent Builder */ public function setApiVersion(string $apiVersion): self { $this->options['apiVersion'] = $apiVersion; return $this; } /** * The URL we should call when the phone number assigned to this application receives a call. * * @param string $voiceUrl The URL to call when the phone number receives a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. * * @param string $voiceMethod The HTTP method to use with the voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. * * @param string $voiceFallbackUrl The URL to call when a TwiML error occurs * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. * * @param string $voiceFallbackMethod The HTTP method to use with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL to send status information to your * application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`. * * @param string $statusCallbackMethod The HTTP method to use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. * * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @return $this Fluent Builder */ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self { $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; return $this; } /** * The URL we should call when the phone number receives an incoming SMS message. * * @param string $smsUrl The URL to call when the phone number receives an * incoming SMS message * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. * * @param string $smsMethod The HTTP method to use with sms_url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`. * * @param string $smsFallbackUrl The URL to call when an error occurs while * retrieving or executing the TwiML * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. * * @param string $smsFallbackMethod The HTTP method to use with sms_fallback_url * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * The URL we should call using a POST method to send status information about SMS messages sent by the application. * * @param string $smsStatusCallback The URL to send status information to your * application * @return $this Fluent Builder */ public function setSmsStatusCallback(string $smsStatusCallback): self { $this->options['smsStatusCallback'] = $smsStatusCallback; return $this; } /** * The URL we should call using a POST method to send message status information to your application. * * @param string $messageStatusCallback The URL to send message status * information to your application * @return $this Fluent Builder */ public function setMessageStatusCallback(string $messageStatusCallback): self { $this->options['messageStatusCallback'] = $messageStatusCallback; return $this; } /** * A descriptive string that you create to describe the new application. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the new resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`. * * @param bool $publicApplicationConnectEnabled Whether to allow other Twilio * accounts to dial this * application * @return $this Fluent Builder */ public function setPublicApplicationConnectEnabled(bool $publicApplicationConnectEnabled): self { $this->options['publicApplicationConnectEnabled'] = $publicApplicationConnectEnabled; 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.Api.V2010.CreateApplicationOptions ' . $options . ']'; } } class ReadApplicationOptions extends Options { /** * @param string $friendlyName The string that identifies the Application * resources to read */ public function __construct(string $friendlyName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; } /** * The string that identifies the Application resources to read. * * @param string $friendlyName The string that identifies the Application * resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; 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.Api.V2010.ReadApplicationOptions ' . $options . ']'; } } class UpdateApplicationOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $apiVersion The API version to use to start a new TwiML session * @param string $voiceUrl The URL to call when the phone number receives a call * @param string $voiceMethod The HTTP method to use with the voice_url * @param string $voiceFallbackUrl The URL to call when a TwiML error occurs * @param string $voiceFallbackMethod The HTTP method to use with * voice_fallback_url * @param string $statusCallback The URL to send status information to your * application * @param string $statusCallbackMethod The HTTP method to use to call * status_callback * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $smsUrl The URL to call when the phone number receives an * incoming SMS message * @param string $smsMethod The HTTP method to use with sms_url * @param string $smsFallbackUrl The URL to call when an error occurs while * retrieving or executing the TwiML * @param string $smsFallbackMethod The HTTP method to use with sms_fallback_url * @param string $smsStatusCallback Same as message_status_callback. * Deprecated, included for backwards * compatibility. * @param string $messageStatusCallback The URL to send message status * information to your application * @param bool $publicApplicationConnectEnabled Whether to allow other Twilio * accounts to dial this * application */ public function __construct(string $friendlyName = Values::NONE, string $apiVersion = Values::NONE, string $voiceUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $smsUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsStatusCallback = Values::NONE, string $messageStatusCallback = Values::NONE, bool $publicApplicationConnectEnabled = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['apiVersion'] = $apiVersion; $this->options['voiceUrl'] = $voiceUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; $this->options['smsUrl'] = $smsUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['smsStatusCallback'] = $smsStatusCallback; $this->options['messageStatusCallback'] = $messageStatusCallback; $this->options['publicApplicationConnectEnabled'] = $publicApplicationConnectEnabled; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is your account's default API version. * * @param string $apiVersion The API version to use to start a new TwiML session * @return $this Fluent Builder */ public function setApiVersion(string $apiVersion): self { $this->options['apiVersion'] = $apiVersion; return $this; } /** * The URL we should call when the phone number assigned to this application receives a call. * * @param string $voiceUrl The URL to call when the phone number receives a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. * * @param string $voiceMethod The HTTP method to use with the voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. * * @param string $voiceFallbackUrl The URL to call when a TwiML error occurs * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. * * @param string $voiceFallbackMethod The HTTP method to use with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL to send status information to your * application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`. * * @param string $statusCallbackMethod The HTTP method to use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. * * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @return $this Fluent Builder */ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self { $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; return $this; } /** * The URL we should call when the phone number receives an incoming SMS message. * * @param string $smsUrl The URL to call when the phone number receives an * incoming SMS message * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. * * @param string $smsMethod The HTTP method to use with sms_url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`. * * @param string $smsFallbackUrl The URL to call when an error occurs while * retrieving or executing the TwiML * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. * * @param string $smsFallbackMethod The HTTP method to use with sms_fallback_url * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * Same as message_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application. Deprecated, included for backwards compatibility. * * @param string $smsStatusCallback Same as message_status_callback. * Deprecated, included for backwards * compatibility. * @return $this Fluent Builder */ public function setSmsStatusCallback(string $smsStatusCallback): self { $this->options['smsStatusCallback'] = $smsStatusCallback; return $this; } /** * The URL we should call using a POST method to send message status information to your application. * * @param string $messageStatusCallback The URL to send message status * information to your application * @return $this Fluent Builder */ public function setMessageStatusCallback(string $messageStatusCallback): self { $this->options['messageStatusCallback'] = $messageStatusCallback; return $this; } /** * Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`. * * @param bool $publicApplicationConnectEnabled Whether to allow other Twilio * accounts to dial this * application * @return $this Fluent Builder */ public function setPublicApplicationConnectEnabled(bool $publicApplicationConnectEnabled): self { $this->options['publicApplicationConnectEnabled'] = $publicApplicationConnectEnabled; 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.Api.V2010.UpdateApplicationOptions ' . $options . ']'; } } V2010/Account/Queue/MemberOptions.php 0000644 00000002742 15111164015 0013230 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Queue; use Twilio\Options; use Twilio\Values; abstract class MemberOptions { /** * @param string $method How to pass the update request data * @return UpdateMemberOptions Options builder */ public static function update(string $method = Values::NONE): UpdateMemberOptions { return new UpdateMemberOptions($method); } } class UpdateMemberOptions extends Options { /** * @param string $method How to pass the update request data */ public function __construct(string $method = Values::NONE) { $this->options['method'] = $method; } /** * How to pass the update request data. Can be `GET` or `POST` and the default is `POST`. `POST` sends the data as encoded form data and `GET` sends the data as query parameters. * * @param string $method How to pass the update request data * @return $this Fluent Builder */ public function setMethod(string $method): self { $this->options['method'] = $method; 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.Api.V2010.UpdateMemberOptions ' . $options . ']'; } } V2010/Account/Queue/MemberContext.php 0000644 00000005416 15111164015 0013222 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Queue; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Values; use Twilio\Version; class MemberContext extends InstanceContext { /** * Initialize the MemberContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the * resource(s) to fetch * @param string $queueSid The SID of the Queue in which to find the members * @param string $callSid The Call SID of the resource(s) to fetch */ public function __construct(Version $version, $accountSid, $queueSid, $callSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'queueSid' => $queueSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Queues/' . \rawurlencode($queueSid) . '/Members/' . \rawurlencode($callSid) . '.json'; } /** * Fetch the MemberInstance * * @return MemberInstance Fetched MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MemberInstance { $payload = $this->version->fetch('GET', $this->uri); return new MemberInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['queueSid'], $this->solution['callSid'] ); } /** * Update the MemberInstance * * @param string $url The absolute URL of the Queue resource * @param array|Options $options Optional Arguments * @return MemberInstance Updated MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $url, array $options = []): MemberInstance { $options = new Values($options); $data = Values::of(['Url' => $url, 'Method' => $options['method'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new MemberInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['queueSid'], $this->solution['callSid'] ); } /** * 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.Api.V2010.MemberContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Queue/MemberList.php 0000644 00000011677 15111164015 0012517 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Queue; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class MemberList extends ListResource { /** * Construct the MemberList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created this resource * @param string $queueSid The SID of the Queue the member is in */ public function __construct(Version $version, string $accountSid, string $queueSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'queueSid' => $queueSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Queues/' . \rawurlencode($queueSid) . '/Members.json'; } /** * Streams MemberInstance 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 MemberInstance 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 MemberInstance[] 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 MemberInstance 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 MemberPage Page of MemberInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MemberPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MemberPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MemberInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MemberPage Page of MemberInstance */ public function getPage(string $targetUrl): MemberPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MemberPage($this->version, $response, $this->solution); } /** * Constructs a MemberContext * * @param string $callSid The Call SID of the resource(s) to fetch */ public function getContext(string $callSid): MemberContext { return new MemberContext( $this->version, $this->solution['accountSid'], $this->solution['queueSid'], $callSid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MemberList]'; } } V2010/Account/Queue/MemberInstance.php 0000644 00000007742 15111164016 0013347 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Queue; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; /** * @property string $callSid * @property \DateTime $dateEnqueued * @property int $position * @property string $uri * @property int $waitTime * @property string $queueSid */ class MemberInstance extends InstanceResource { /** * Initialize the MemberInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created this resource * @param string $queueSid The SID of the Queue the member is in * @param string $callSid The Call SID of the resource(s) to fetch */ public function __construct(Version $version, array $payload, string $accountSid, string $queueSid, string $callSid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'callSid' => Values::array_get($payload, 'call_sid'), 'dateEnqueued' => Deserialize::dateTime(Values::array_get($payload, 'date_enqueued')), 'position' => Values::array_get($payload, 'position'), 'uri' => Values::array_get($payload, 'uri'), 'waitTime' => Values::array_get($payload, 'wait_time'), 'queueSid' => Values::array_get($payload, 'queue_sid'), ]; $this->solution = [ 'accountSid' => $accountSid, 'queueSid' => $queueSid, 'callSid' => $callSid ?: $this->properties['callSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MemberContext Context for this MemberInstance */ protected function proxy(): MemberContext { if (!$this->context) { $this->context = new MemberContext( $this->version, $this->solution['accountSid'], $this->solution['queueSid'], $this->solution['callSid'] ); } return $this->context; } /** * Fetch the MemberInstance * * @return MemberInstance Fetched MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MemberInstance { return $this->proxy()->fetch(); } /** * Update the MemberInstance * * @param string $url The absolute URL of the Queue resource * @param array|Options $options Optional Arguments * @return MemberInstance Updated MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $url, array $options = []): MemberInstance { return $this->proxy()->update($url, $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.Api.V2010.MemberInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Queue/MemberPage.php 0000644 00000002405 15111164016 0012446 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Queue; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class MemberPage 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 MemberInstance \Twilio\Rest\Api\V2010\Account\Queue\MemberInstance */ public function buildInstance(array $payload): MemberInstance { return new MemberInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['queueSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MemberPage]'; } } V2010/Account/SipList.php 0000644 00000007337 15111164017 0010757 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Rest\Api\V2010\Account\Sip\CredentialListList; use Twilio\Rest\Api\V2010\Account\Sip\DomainList; use Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlListList; use Twilio\Version; /** * @property DomainList $domains * @property IpAccessControlListList $ipAccessControlLists * @property CredentialListList $credentialLists * @method \Twilio\Rest\Api\V2010\Account\Sip\DomainContext domains(string $sid) * @method \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlListContext ipAccessControlLists(string $sid) * @method \Twilio\Rest\Api\V2010\Account\Sip\CredentialListContext credentialLists(string $sid) */ class SipList extends ListResource { protected $_domains = null; protected $_ipAccessControlLists = null; protected $_credentialLists = null; /** * Construct the SipList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; } /** * Access the domains */ protected function getDomains(): DomainList { if (!$this->_domains) { $this->_domains = new DomainList($this->version, $this->solution['accountSid']); } return $this->_domains; } /** * Access the ipAccessControlLists */ protected function getIpAccessControlLists(): IpAccessControlListList { if (!$this->_ipAccessControlLists) { $this->_ipAccessControlLists = new IpAccessControlListList( $this->version, $this->solution['accountSid'] ); } return $this->_ipAccessControlLists; } /** * Access the credentialLists */ protected function getCredentialLists(): CredentialListList { if (!$this->_credentialLists) { $this->_credentialLists = new CredentialListList($this->version, $this->solution['accountSid']); } return $this->_credentialLists; } /** * 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.Api.V2010.SipList]'; } } V2010/Account/ValidationRequestPage.php 0000644 00000002344 15111164017 0013621 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class ValidationRequestPage 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 ValidationRequestInstance \Twilio\Rest\Api\V2010\Account\ValidationRequestInstance */ public function buildInstance(array $payload): ValidationRequestInstance { return new ValidationRequestInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ValidationRequestPage]'; } } V2010/Account/KeyContext.php 0000644 00000005232 15111164017 0011455 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Values; use Twilio\Version; class KeyContext extends InstanceContext { /** * Initialize the KeyContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Keys/' . \rawurlencode($sid) . '.json'; } /** * Fetch the KeyInstance * * @return KeyInstance Fetched KeyInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): KeyInstance { $payload = $this->version->fetch('GET', $this->uri); return new KeyInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the KeyInstance * * @param array|Options $options Optional Arguments * @return KeyInstance Updated KeyInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): KeyInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new KeyInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the KeyInstance * * @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.Api.V2010.KeyContext ' . \implode(' ', $context) . ']'; } } V2010/Account/NewKeyInstance.php 0000644 00000004342 15111164020 0012242 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $sid * @property string $friendlyName * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $secret */ class NewKeyInstance extends InstanceResource { /** * Initialize the NewKeyInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'secret' => Values::array_get($payload, 'secret'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.NewKeyInstance]'; } } V2010/Account/AvailablePhoneNumberCountryPage.php 0000644 00000002516 15111164020 0015560 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class AvailablePhoneNumberCountryPage 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 AvailablePhoneNumberCountryInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryInstance */ public function buildInstance(array $payload): AvailablePhoneNumberCountryInstance { return new AvailablePhoneNumberCountryInstance( $this->version, $payload, $this->solution['accountSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AvailablePhoneNumberCountryPage]'; } } V2010/Account/NotificationList.php 0000644 00000012724 15111164021 0012641 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class NotificationList extends ListResource { /** * Construct the NotificationList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Notifications.json'; } /** * Streams NotificationInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads NotificationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 NotificationInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of NotificationInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 NotificationPage Page of NotificationInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): NotificationPage { $options = new Values($options); $params = Values::of([ 'Log' => $options['log'], 'MessageDate<' => Serialize::iso8601Date($options['messageDateBefore']), 'MessageDate' => Serialize::iso8601Date($options['messageDate']), 'MessageDate>' => Serialize::iso8601Date($options['messageDateAfter']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new NotificationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of NotificationInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return NotificationPage Page of NotificationInstance */ public function getPage(string $targetUrl): NotificationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new NotificationPage($this->version, $response, $this->solution); } /** * Constructs a NotificationContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): NotificationContext { return new NotificationContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NotificationList]'; } } V2010/Account/ConnectAppInstance.php 0000644 00000011117 15111164021 0013071 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $authorizeRedirectUrl * @property string $companyName * @property string $deauthorizeCallbackMethod * @property string $deauthorizeCallbackUrl * @property string $description * @property string $friendlyName * @property string $homepageUrl * @property string[] $permissions * @property string $sid * @property string $uri */ class ConnectAppInstance extends InstanceResource { /** * Initialize the ConnectAppInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'authorizeRedirectUrl' => Values::array_get($payload, 'authorize_redirect_url'), 'companyName' => Values::array_get($payload, 'company_name'), 'deauthorizeCallbackMethod' => Values::array_get($payload, 'deauthorize_callback_method'), 'deauthorizeCallbackUrl' => Values::array_get($payload, 'deauthorize_callback_url'), 'description' => Values::array_get($payload, 'description'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'homepageUrl' => Values::array_get($payload, 'homepage_url'), 'permissions' => Values::array_get($payload, 'permissions'), 'sid' => Values::array_get($payload, 'sid'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ConnectAppContext Context for this ConnectAppInstance */ protected function proxy(): ConnectAppContext { if (!$this->context) { $this->context = new ConnectAppContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ConnectAppInstance * * @return ConnectAppInstance Fetched ConnectAppInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConnectAppInstance { return $this->proxy()->fetch(); } /** * Update the ConnectAppInstance * * @param array|Options $options Optional Arguments * @return ConnectAppInstance Updated ConnectAppInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConnectAppInstance { return $this->proxy()->update($options); } /** * Delete the ConnectAppInstance * * @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.Api.V2010.ConnectAppInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/AuthorizedConnectAppContext.php 0000644 00000003662 15111164022 0015017 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; class AuthorizedConnectAppContext extends InstanceContext { /** * Initialize the AuthorizedConnectAppContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $connectAppSid The SID of the Connect App to fetch */ public function __construct(Version $version, $accountSid, $connectAppSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'connectAppSid' => $connectAppSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AuthorizedConnectApps/' . \rawurlencode($connectAppSid) . '.json'; } /** * Fetch the AuthorizedConnectAppInstance * * @return AuthorizedConnectAppInstance Fetched AuthorizedConnectAppInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthorizedConnectAppInstance { $payload = $this->version->fetch('GET', $this->uri); return new AuthorizedConnectAppInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['connectAppSid'] ); } /** * 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.Api.V2010.AuthorizedConnectAppContext ' . \implode(' ', $context) . ']'; } } V2010/Account/RecordingList.php 0000644 00000013106 15111164022 0012123 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class RecordingList extends ListResource { /** * Construct the RecordingList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings.json'; } /** * Streams RecordingInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RecordingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 RecordingInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of RecordingInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 RecordingPage Page of RecordingInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RecordingPage { $options = new Values($options); $params = Values::of([ 'DateCreated<' => Serialize::iso8601DateTime($options['dateCreatedBefore']), 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateCreated>' => Serialize::iso8601DateTime($options['dateCreatedAfter']), 'CallSid' => $options['callSid'], 'ConferenceSid' => $options['conferenceSid'], 'IncludeSoftDeleted' => Serialize::booleanToString($options['includeSoftDeleted']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RecordingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RecordingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RecordingPage Page of RecordingInstance */ public function getPage(string $targetUrl): RecordingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RecordingPage($this->version, $response, $this->solution); } /** * Constructs a RecordingContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): RecordingContext { return new RecordingContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.RecordingList]'; } } V2010/Account/QueueContext.php 0000644 00000010613 15111164023 0012005 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\Queue\MemberList; use Twilio\Values; use Twilio\Version; /** * @property MemberList $members * @method \Twilio\Rest\Api\V2010\Account\Queue\MemberContext members(string $callSid) */ class QueueContext extends InstanceContext { protected $_members; /** * Initialize the QueueContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the * resource(s) to fetch * @param string $sid The unique string that identifies this resource */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Queues/' . \rawurlencode($sid) . '.json'; } /** * Fetch the QueueInstance * * @return QueueInstance Fetched QueueInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): QueueInstance { $payload = $this->version->fetch('GET', $this->uri); return new QueueInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the QueueInstance * * @param array|Options $options Optional Arguments * @return QueueInstance Updated QueueInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): QueueInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], 'MaxSize' => $options['maxSize'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new QueueInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the QueueInstance * * @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); } /** * Access the members */ protected function getMembers(): MemberList { if (!$this->_members) { $this->_members = new MemberList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_members; } /** * 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.Api.V2010.QueueContext ' . \implode(' ', $context) . ']'; } } V2010/Account/AddressList.php 0000644 00000015623 15111164023 0011603 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class AddressList extends ListResource { /** * Construct the AddressList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that is responsible for the * resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Addresses.json'; } /** * Create the AddressInstance * * @param string $customerName The name to associate with the new address * @param string $street The number and street address of the new address * @param string $city The city of the new address * @param string $region The state or region of the new address * @param string $postalCode The postal code of the new address * @param string $isoCountry The ISO country code of the new address * @param array|Options $options Optional Arguments * @return AddressInstance Created AddressInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $customerName, string $street, string $city, string $region, string $postalCode, string $isoCountry, array $options = []): AddressInstance { $options = new Values($options); $data = Values::of([ 'CustomerName' => $customerName, 'Street' => $street, 'City' => $city, 'Region' => $region, 'PostalCode' => $postalCode, 'IsoCountry' => $isoCountry, 'FriendlyName' => $options['friendlyName'], 'EmergencyEnabled' => Serialize::booleanToString($options['emergencyEnabled']), 'AutoCorrectAddress' => Serialize::booleanToString($options['autoCorrectAddress']), 'StreetSecondary' => $options['streetSecondary'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AddressInstance($this->version, $payload, $this->solution['accountSid']); } /** * Streams AddressInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AddressInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 AddressInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of AddressInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 AddressPage Page of AddressInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AddressPage { $options = new Values($options); $params = Values::of([ 'CustomerName' => $options['customerName'], 'FriendlyName' => $options['friendlyName'], 'IsoCountry' => $options['isoCountry'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AddressPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AddressInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AddressPage Page of AddressInstance */ public function getPage(string $targetUrl): AddressPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AddressPage($this->version, $response, $this->solution); } /** * Constructs a AddressContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): AddressContext { return new AddressContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AddressList]'; } } V2010/Account/ConnectAppPage.php 0000644 00000002272 15111164024 0012206 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class ConnectAppPage 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 ConnectAppInstance \Twilio\Rest\Api\V2010\Account\ConnectAppInstance */ public function buildInstance(array $payload): ConnectAppInstance { return new ConnectAppInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ConnectAppPage]'; } } V2010/Account/AvailablePhoneNumberCountryInstance.php 0000644 00000012607 15111164024 0016456 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\LocalList; use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MachineToMachineList; use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MobileList; use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\NationalList; use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\SharedCostList; use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\TollFreeList; use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\VoipList; use Twilio\Values; use Twilio\Version; /** * @property string $countryCode * @property string $country * @property string $uri * @property bool $beta * @property array $subresourceUris */ class AvailablePhoneNumberCountryInstance extends InstanceResource { protected $_local; protected $_tollFree; protected $_mobile; protected $_national; protected $_voip; protected $_sharedCost; protected $_machineToMachine; /** * Initialize the AvailablePhoneNumberCountryInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. * @param string $countryCode The ISO country code of the country to fetch * available phone number information about */ public function __construct(Version $version, array $payload, string $accountSid, string $countryCode = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'countryCode' => Values::array_get($payload, 'country_code'), 'country' => Values::array_get($payload, 'country'), 'uri' => Values::array_get($payload, 'uri'), 'beta' => Values::array_get($payload, 'beta'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), ]; $this->solution = [ 'accountSid' => $accountSid, 'countryCode' => $countryCode ?: $this->properties['countryCode'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AvailablePhoneNumberCountryContext Context for this * AvailablePhoneNumberCountryInstance */ protected function proxy(): AvailablePhoneNumberCountryContext { if (!$this->context) { $this->context = new AvailablePhoneNumberCountryContext( $this->version, $this->solution['accountSid'], $this->solution['countryCode'] ); } return $this->context; } /** * Fetch the AvailablePhoneNumberCountryInstance * * @return AvailablePhoneNumberCountryInstance Fetched * AvailablePhoneNumberCountryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AvailablePhoneNumberCountryInstance { return $this->proxy()->fetch(); } /** * Access the local */ protected function getLocal(): LocalList { return $this->proxy()->local; } /** * Access the tollFree */ protected function getTollFree(): TollFreeList { return $this->proxy()->tollFree; } /** * Access the mobile */ protected function getMobile(): MobileList { return $this->proxy()->mobile; } /** * Access the national */ protected function getNational(): NationalList { return $this->proxy()->national; } /** * Access the voip */ protected function getVoip(): VoipList { return $this->proxy()->voip; } /** * Access the sharedCost */ protected function getSharedCost(): SharedCostList { return $this->proxy()->sharedCost; } /** * Access the machineToMachine */ protected function getMachineToMachine(): MachineToMachineList { return $this->proxy()->machineToMachine; } /** * 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.Api.V2010.AvailablePhoneNumberCountryInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/ValidationRequestList.php 0000644 00000004066 15111164024 0013661 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; class ValidationRequestList extends ListResource { /** * Construct the ValidationRequestList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/OutgoingCallerIds.json'; } /** * Create the ValidationRequestInstance * * @param string $phoneNumber The phone number to verify in E.164 format * @param array|Options $options Optional Arguments * @return ValidationRequestInstance Created ValidationRequestInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $phoneNumber, array $options = []): ValidationRequestInstance { $options = new Values($options); $data = Values::of([ 'PhoneNumber' => $phoneNumber, 'FriendlyName' => $options['friendlyName'], 'CallDelay' => $options['callDelay'], 'Extension' => $options['extension'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ValidationRequestInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ValidationRequestList]'; } } V2010/Account/SigningKeyPage.php 0000644 00000002272 15111164024 0012223 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class SigningKeyPage 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 SigningKeyInstance \Twilio\Rest\Api\V2010\Account\SigningKeyInstance */ public function buildInstance(array $payload): SigningKeyInstance { return new SigningKeyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SigningKeyPage]'; } } V2010/Account/IncomingPhoneNumberList.php 0000644 00000023557 15111164025 0014133 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\LocalList; use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\MobileList; use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\TollFreeList; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; /** * @property LocalList $local * @property MobileList $mobile * @property TollFreeList $tollFree */ class IncomingPhoneNumberList extends ListResource { protected $_local = null; protected $_mobile = null; protected $_tollFree = null; /** * Construct the IncomingPhoneNumberList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers.json'; } /** * Streams IncomingPhoneNumberInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads IncomingPhoneNumberInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 IncomingPhoneNumberInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of IncomingPhoneNumberInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 IncomingPhoneNumberPage Page of IncomingPhoneNumberInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): IncomingPhoneNumberPage { $options = new Values($options); $params = Values::of([ 'Beta' => Serialize::booleanToString($options['beta']), 'FriendlyName' => $options['friendlyName'], 'PhoneNumber' => $options['phoneNumber'], 'Origin' => $options['origin'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new IncomingPhoneNumberPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of IncomingPhoneNumberInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return IncomingPhoneNumberPage Page of IncomingPhoneNumberInstance */ public function getPage(string $targetUrl): IncomingPhoneNumberPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new IncomingPhoneNumberPage($this->version, $response, $this->solution); } /** * Create the IncomingPhoneNumberInstance * * @param array|Options $options Optional Arguments * @return IncomingPhoneNumberInstance Created IncomingPhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): IncomingPhoneNumberInstance { $options = new Values($options); $data = Values::of([ 'PhoneNumber' => $options['phoneNumber'], 'AreaCode' => $options['areaCode'], 'ApiVersion' => $options['apiVersion'], 'FriendlyName' => $options['friendlyName'], 'SmsApplicationSid' => $options['smsApplicationSid'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsUrl' => $options['smsUrl'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'VoiceApplicationSid' => $options['voiceApplicationSid'], 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']), 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceUrl' => $options['voiceUrl'], 'EmergencyStatus' => $options['emergencyStatus'], 'EmergencyAddressSid' => $options['emergencyAddressSid'], 'TrunkSid' => $options['trunkSid'], 'IdentitySid' => $options['identitySid'], 'AddressSid' => $options['addressSid'], 'VoiceReceiveMode' => $options['voiceReceiveMode'], 'BundleSid' => $options['bundleSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new IncomingPhoneNumberInstance($this->version, $payload, $this->solution['accountSid']); } /** * Access the local */ protected function getLocal(): LocalList { if (!$this->_local) { $this->_local = new LocalList($this->version, $this->solution['accountSid']); } return $this->_local; } /** * Access the mobile */ protected function getMobile(): MobileList { if (!$this->_mobile) { $this->_mobile = new MobileList($this->version, $this->solution['accountSid']); } return $this->_mobile; } /** * Access the tollFree */ protected function getTollFree(): TollFreeList { if (!$this->_tollFree) { $this->_tollFree = new TollFreeList($this->version, $this->solution['accountSid']); } return $this->_tollFree; } /** * Constructs a IncomingPhoneNumberContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): IncomingPhoneNumberContext { return new IncomingPhoneNumberContext($this->version, $this->solution['accountSid'], $sid); } /** * 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.Api.V2010.IncomingPhoneNumberList]'; } } V2010/Account/NotificationPage.php 0000644 00000002306 15111164025 0012601 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class NotificationPage 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 NotificationInstance \Twilio\Rest\Api\V2010\Account\NotificationInstance */ public function buildInstance(array $payload): NotificationInstance { return new NotificationInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NotificationPage]'; } } V2010/Account/QueueList.php 0000644 00000012640 15111164026 0011301 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class QueueList extends ListResource { /** * Construct the QueueList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created this resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Queues.json'; } /** * Streams QueueInstance 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 QueueInstance 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 QueueInstance[] 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 QueueInstance 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 QueuePage Page of QueueInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): QueuePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new QueuePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of QueueInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return QueuePage Page of QueueInstance */ public function getPage(string $targetUrl): QueuePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new QueuePage($this->version, $response, $this->solution); } /** * Create the QueueInstance * * @param string $friendlyName A string to describe this resource * @param array|Options $options Optional Arguments * @return QueueInstance Created QueueInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, array $options = []): QueueInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $friendlyName, 'MaxSize' => $options['maxSize'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new QueueInstance($this->version, $payload, $this->solution['accountSid']); } /** * Constructs a QueueContext * * @param string $sid The unique string that identifies this resource */ public function getContext(string $sid): QueueContext { return new QueueContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.QueueList]'; } } V2010/Account/RecordingOptions.php 0000644 00000020404 15111164026 0012646 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class RecordingOptions { /** * @param bool $includeSoftDeleted A boolean parameter indicating whether to * retrieve soft deleted recordings or not. * @return FetchRecordingOptions Options builder */ public static function fetch(bool $includeSoftDeleted = Values::NONE): FetchRecordingOptions { return new FetchRecordingOptions($includeSoftDeleted); } /** * @param string $dateCreatedBefore Only include recordings that were created * on this date * @param string $dateCreated Only include recordings that were created on this * date * @param string $dateCreatedAfter Only include recordings that were created on * this date * @param string $callSid The Call SID of the resources to read * @param string $conferenceSid Read by unique Conference SID for the recording * @param bool $includeSoftDeleted A boolean parameter indicating whether to * retrieve soft deleted recordings or not. * @return ReadRecordingOptions Options builder */ public static function read(string $dateCreatedBefore = Values::NONE, string $dateCreated = Values::NONE, string $dateCreatedAfter = Values::NONE, string $callSid = Values::NONE, string $conferenceSid = Values::NONE, bool $includeSoftDeleted = Values::NONE): ReadRecordingOptions { return new ReadRecordingOptions($dateCreatedBefore, $dateCreated, $dateCreatedAfter, $callSid, $conferenceSid, $includeSoftDeleted); } } class FetchRecordingOptions extends Options { /** * @param bool $includeSoftDeleted A boolean parameter indicating whether to * retrieve soft deleted recordings or not. */ public function __construct(bool $includeSoftDeleted = Values::NONE) { $this->options['includeSoftDeleted'] = $includeSoftDeleted; } /** * A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days. * * @param bool $includeSoftDeleted A boolean parameter indicating whether to * retrieve soft deleted recordings or not. * @return $this Fluent Builder */ public function setIncludeSoftDeleted(bool $includeSoftDeleted): self { $this->options['includeSoftDeleted'] = $includeSoftDeleted; 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.Api.V2010.FetchRecordingOptions ' . $options . ']'; } } class ReadRecordingOptions extends Options { /** * @param string $dateCreatedBefore Only include recordings that were created * on this date * @param string $dateCreated Only include recordings that were created on this * date * @param string $dateCreatedAfter Only include recordings that were created on * this date * @param string $callSid The Call SID of the resources to read * @param string $conferenceSid Read by unique Conference SID for the recording * @param bool $includeSoftDeleted A boolean parameter indicating whether to * retrieve soft deleted recordings or not. */ public function __construct(string $dateCreatedBefore = Values::NONE, string $dateCreated = Values::NONE, string $dateCreatedAfter = Values::NONE, string $callSid = Values::NONE, string $conferenceSid = Values::NONE, bool $includeSoftDeleted = Values::NONE) { $this->options['dateCreatedBefore'] = $dateCreatedBefore; $this->options['dateCreated'] = $dateCreated; $this->options['dateCreatedAfter'] = $dateCreatedAfter; $this->options['callSid'] = $callSid; $this->options['conferenceSid'] = $conferenceSid; $this->options['includeSoftDeleted'] = $includeSoftDeleted; } /** * Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. * * @param string $dateCreatedBefore Only include recordings that were created * on this date * @return $this Fluent Builder */ public function setDateCreatedBefore(string $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. * * @param string $dateCreated Only include recordings that were created on this * date * @return $this Fluent Builder */ public function setDateCreated(string $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. * * @param string $dateCreatedAfter Only include recordings that were created on * this date * @return $this Fluent Builder */ public function setDateCreatedAfter(string $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; return $this; } /** * The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to read. * * @param string $callSid The Call SID of the resources to read * @return $this Fluent Builder */ public function setCallSid(string $callSid): self { $this->options['callSid'] = $callSid; return $this; } /** * The Conference SID that identifies the conference associated with the recording to read. * * @param string $conferenceSid Read by unique Conference SID for the recording * @return $this Fluent Builder */ public function setConferenceSid(string $conferenceSid): self { $this->options['conferenceSid'] = $conferenceSid; return $this; } /** * A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days. * * @param bool $includeSoftDeleted A boolean parameter indicating whether to * retrieve soft deleted recordings or not. * @return $this Fluent Builder */ public function setIncludeSoftDeleted(bool $includeSoftDeleted): self { $this->options['includeSoftDeleted'] = $includeSoftDeleted; 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.Api.V2010.ReadRecordingOptions ' . $options . ']'; } } V2010/Account/CallList.php 0000644 00000024452 15111164027 0011075 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\Call\FeedbackSummaryList; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; /** * @property FeedbackSummaryList $feedbackSummaries * @method \Twilio\Rest\Api\V2010\Account\Call\FeedbackSummaryContext feedbackSummaries(string $sid) */ class CallList extends ListResource { protected $_feedbackSummaries = null; /** * Construct the CallList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created this resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls.json'; } /** * Create the CallInstance * * @param string $to Phone number, SIP address, or client identifier to call * @param string $from Twilio number from which to originate the call * @param array|Options $options Optional Arguments * @return CallInstance Created CallInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $to, string $from, array $options = []): CallInstance { $options = new Values($options); $data = Values::of([ 'To' => $to, 'From' => $from, 'Url' => $options['url'], 'Twiml' => $options['twiml'], 'ApplicationSid' => $options['applicationSid'], 'Method' => $options['method'], 'FallbackUrl' => $options['fallbackUrl'], 'FallbackMethod' => $options['fallbackMethod'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackEvent' => Serialize::map($options['statusCallbackEvent'], function($e) { return $e; }), 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'SendDigits' => $options['sendDigits'], 'Timeout' => $options['timeout'], 'Record' => Serialize::booleanToString($options['record']), 'RecordingChannels' => $options['recordingChannels'], 'RecordingStatusCallback' => $options['recordingStatusCallback'], 'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'], 'SipAuthUsername' => $options['sipAuthUsername'], 'SipAuthPassword' => $options['sipAuthPassword'], 'MachineDetection' => $options['machineDetection'], 'MachineDetectionTimeout' => $options['machineDetectionTimeout'], 'RecordingStatusCallbackEvent' => Serialize::map($options['recordingStatusCallbackEvent'], function($e) { return $e; }), 'Trim' => $options['trim'], 'CallerId' => $options['callerId'], 'MachineDetectionSpeechThreshold' => $options['machineDetectionSpeechThreshold'], 'MachineDetectionSpeechEndThreshold' => $options['machineDetectionSpeechEndThreshold'], 'MachineDetectionSilenceTimeout' => $options['machineDetectionSilenceTimeout'], 'AsyncAmd' => $options['asyncAmd'], 'AsyncAmdStatusCallback' => $options['asyncAmdStatusCallback'], 'AsyncAmdStatusCallbackMethod' => $options['asyncAmdStatusCallbackMethod'], 'Byoc' => $options['byoc'], 'CallReason' => $options['callReason'], 'CallToken' => $options['callToken'], 'RecordingTrack' => $options['recordingTrack'], 'TimeLimit' => $options['timeLimit'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CallInstance($this->version, $payload, $this->solution['accountSid']); } /** * Streams CallInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CallInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 CallInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of CallInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 CallPage Page of CallInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CallPage { $options = new Values($options); $params = Values::of([ 'To' => $options['to'], 'From' => $options['from'], 'ParentCallSid' => $options['parentCallSid'], 'Status' => $options['status'], 'StartTime<' => Serialize::iso8601DateTime($options['startTimeBefore']), 'StartTime' => Serialize::iso8601DateTime($options['startTime']), 'StartTime>' => Serialize::iso8601DateTime($options['startTimeAfter']), 'EndTime<' => Serialize::iso8601DateTime($options['endTimeBefore']), 'EndTime' => Serialize::iso8601DateTime($options['endTime']), 'EndTime>' => Serialize::iso8601DateTime($options['endTimeAfter']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CallPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CallInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CallPage Page of CallInstance */ public function getPage(string $targetUrl): CallPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CallPage($this->version, $response, $this->solution); } /** * Access the feedbackSummaries */ protected function getFeedbackSummaries(): FeedbackSummaryList { if (!$this->_feedbackSummaries) { $this->_feedbackSummaries = new FeedbackSummaryList($this->version, $this->solution['accountSid']); } return $this->_feedbackSummaries; } /** * Constructs a CallContext * * @param string $sid The SID of the Call resource to fetch */ public function getContext(string $sid): CallContext { return new CallContext($this->version, $this->solution['accountSid'], $sid); } /** * 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.Api.V2010.CallList]'; } } V2010/Account/IncomingPhoneNumberPage.php 0000644 00000002360 15111164030 0014055 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class IncomingPhoneNumberPage 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 IncomingPhoneNumberInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberInstance */ public function buildInstance(array $payload): IncomingPhoneNumberInstance { return new IncomingPhoneNumberInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.IncomingPhoneNumberPage]'; } } V2010/Account/Address/DependentPhoneNumberInstance.php 0000644 00000011345 15111164031 0016501 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Address; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $sid * @property string $accountSid * @property string $friendlyName * @property string $phoneNumber * @property string $voiceUrl * @property string $voiceMethod * @property string $voiceFallbackMethod * @property string $voiceFallbackUrl * @property bool $voiceCallerIdLookup * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $smsFallbackMethod * @property string $smsFallbackUrl * @property string $smsMethod * @property string $smsUrl * @property string $addressRequirements * @property array $capabilities * @property string $statusCallback * @property string $statusCallbackMethod * @property string $apiVersion * @property string $smsApplicationSid * @property string $voiceApplicationSid * @property string $trunkSid * @property string $emergencyStatus * @property string $emergencyAddressSid * @property string $uri */ class DependentPhoneNumberInstance extends InstanceResource { /** * Initialize the DependentPhoneNumberInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $addressSid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $addressSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'smsApplicationSid' => Values::array_get($payload, 'sms_application_sid'), 'voiceApplicationSid' => Values::array_get($payload, 'voice_application_sid'), 'trunkSid' => Values::array_get($payload, 'trunk_sid'), 'emergencyStatus' => Values::array_get($payload, 'emergency_status'), 'emergencyAddressSid' => Values::array_get($payload, 'emergency_address_sid'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'addressSid' => $addressSid, ]; } /** * 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.Api.V2010.DependentPhoneNumberInstance]'; } } V2010/Account/Address/DependentPhoneNumberPage.php 0000644 00000002537 15111164031 0015614 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Address; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class DependentPhoneNumberPage 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 DependentPhoneNumberInstance \Twilio\Rest\Api\V2010\Account\Address\DependentPhoneNumberInstance */ public function buildInstance(array $payload): DependentPhoneNumberInstance { return new DependentPhoneNumberInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['addressSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.DependentPhoneNumberPage]'; } } V2010/Account/Address/DependentPhoneNumberList.php 0000644 00000011530 15111164031 0015644 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Address; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class DependentPhoneNumberList extends ListResource { /** * Construct the DependentPhoneNumberList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $addressSid The unique string that identifies the resource */ public function __construct(Version $version, string $accountSid, string $addressSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'addressSid' => $addressSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Addresses/' . \rawurlencode($addressSid) . '/DependentPhoneNumbers.json'; } /** * Streams DependentPhoneNumberInstance 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 DependentPhoneNumberInstance 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 DependentPhoneNumberInstance[] 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 DependentPhoneNumberInstance 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 DependentPhoneNumberPage Page of DependentPhoneNumberInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DependentPhoneNumberPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DependentPhoneNumberPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DependentPhoneNumberInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DependentPhoneNumberPage Page of DependentPhoneNumberInstance */ public function getPage(string $targetUrl): DependentPhoneNumberPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DependentPhoneNumberPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.DependentPhoneNumberList]'; } } V2010/Account/RecordingContext.php 0000644 00000011344 15111164032 0012637 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\Recording\AddOnResultList; use Twilio\Rest\Api\V2010\Account\Recording\TranscriptionList; use Twilio\Serialize; use Twilio\Values; use Twilio\Version; /** * @property TranscriptionList $transcriptions * @property AddOnResultList $addOnResults * @method \Twilio\Rest\Api\V2010\Account\Recording\TranscriptionContext transcriptions(string $sid) * @method \Twilio\Rest\Api\V2010\Account\Recording\AddOnResultContext addOnResults(string $sid) */ class RecordingContext extends InstanceContext { protected $_transcriptions; protected $_addOnResults; /** * Initialize the RecordingContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($sid) . '.json'; } /** * Fetch the RecordingInstance * * @param array|Options $options Optional Arguments * @return RecordingInstance Fetched RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): RecordingInstance { $options = new Values($options); $params = Values::of([ 'IncludeSoftDeleted' => Serialize::booleanToString($options['includeSoftDeleted']), ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new RecordingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the RecordingInstance * * @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); } /** * Access the transcriptions */ protected function getTranscriptions(): TranscriptionList { if (!$this->_transcriptions) { $this->_transcriptions = new TranscriptionList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_transcriptions; } /** * Access the addOnResults */ protected function getAddOnResults(): AddOnResultList { if (!$this->_addOnResults) { $this->_addOnResults = new AddOnResultList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_addOnResults; } /** * 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.Api.V2010.RecordingContext ' . \implode(' ', $context) . ']'; } } V2010/Account/TranscriptionList.php 0000644 00000011517 15111164032 0013053 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class TranscriptionList extends ListResource { /** * Construct the TranscriptionList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Transcriptions.json'; } /** * Streams TranscriptionInstance 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 TranscriptionInstance 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 TranscriptionInstance[] 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 TranscriptionInstance 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 TranscriptionPage Page of TranscriptionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TranscriptionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TranscriptionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TranscriptionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TranscriptionPage Page of TranscriptionInstance */ public function getPage(string $targetUrl): TranscriptionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TranscriptionPage($this->version, $response, $this->solution); } /** * Constructs a TranscriptionContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): TranscriptionContext { return new TranscriptionContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TranscriptionList]'; } } V2010/Account/QueuePage.php 0000644 00000002234 15111164033 0011236 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class QueuePage 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 QueueInstance \Twilio\Rest\Api\V2010\Account\QueueInstance */ public function buildInstance(array $payload): QueueInstance { return new QueueInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.QueuePage]'; } } V2010/Account/MessageOptions.php 0000644 00000066673 15111164033 0012336 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class MessageOptions { /** * @param string $from The phone number that initiated the message * @param string $messagingServiceSid The SID of the Messaging Service you want * to associate with the message. * @param string $body The text of the message you want to send. Can be up to * 1,600 characters in length. * @param string[] $mediaUrl The URL of the media to send with the message * @param string $statusCallback The URL we should call to send status * information to your application * @param string $applicationSid The application to use for callbacks * @param string $maxPrice The total maximum price up to 4 decimal places in US * dollars acceptable for the message to be delivered. * @param bool $provideFeedback Whether to confirm delivery of the message * @param int $attempt Total numer of attempts made , this inclusive to send * out the message * @param int $validityPeriod The number of seconds that the message can remain * in our outgoing queue. * @param bool $forceDelivery Reserved * @param string $contentRetention Determines if the message content can be * stored or redacted based on privacy settings * @param string $addressRetention Determines if the address can be stored or * obfuscated based on privacy settings * @param bool $smartEncoded Whether to detect Unicode characters that have a * similar GSM-7 character and replace them * @param string[] $persistentAction Rich actions for Channels Messages. * @param bool $shortenUrls Sets whether to shorten and track links included in * the body of this message. * @param string $scheduleType Pass the value `fixed` to schedule a message at * a fixed time. * @param \DateTime $sendAt The time that Twilio will send the message. Must be * in ISO 8601 format. * @param bool $sendAsMms If set to True, Twilio will deliver the message as a * single MMS message, regardless of the presence of * media. * @param string $contentSid The SID of the preconfigured Content object you * want to associate with the message. * @param string $contentVariables Key-value pairs of variable names to * substitution values, used alongside a * content_sid. * @return CreateMessageOptions Options builder */ public static function create(string $from = Values::NONE, string $messagingServiceSid = Values::NONE, string $body = Values::NONE, array $mediaUrl = Values::ARRAY_NONE, string $statusCallback = Values::NONE, string $applicationSid = Values::NONE, string $maxPrice = Values::NONE, bool $provideFeedback = Values::NONE, int $attempt = Values::NONE, int $validityPeriod = Values::NONE, bool $forceDelivery = Values::NONE, string $contentRetention = Values::NONE, string $addressRetention = Values::NONE, bool $smartEncoded = Values::NONE, array $persistentAction = Values::ARRAY_NONE, bool $shortenUrls = Values::NONE, string $scheduleType = Values::NONE, \DateTime $sendAt = Values::NONE, bool $sendAsMms = Values::NONE, string $contentSid = Values::NONE, string $contentVariables = Values::NONE): CreateMessageOptions { return new CreateMessageOptions($from, $messagingServiceSid, $body, $mediaUrl, $statusCallback, $applicationSid, $maxPrice, $provideFeedback, $attempt, $validityPeriod, $forceDelivery, $contentRetention, $addressRetention, $smartEncoded, $persistentAction, $shortenUrls, $scheduleType, $sendAt, $sendAsMms, $contentSid, $contentVariables); } /** * @param string $to Filter by messages sent to this number * @param string $from Filter by from number * @param string $dateSentBefore Filter by date sent * @param string $dateSent Filter by date sent * @param string $dateSentAfter Filter by date sent * @return ReadMessageOptions Options builder */ public static function read(string $to = Values::NONE, string $from = Values::NONE, string $dateSentBefore = Values::NONE, string $dateSent = Values::NONE, string $dateSentAfter = Values::NONE): ReadMessageOptions { return new ReadMessageOptions($to, $from, $dateSentBefore, $dateSent, $dateSentAfter); } /** * @param string $body The text of the message you want to send * @param string $status Set as `canceled` to cancel a message from being sent. * @return UpdateMessageOptions Options builder */ public static function update(string $body = Values::NONE, string $status = Values::NONE): UpdateMessageOptions { return new UpdateMessageOptions($body, $status); } } class CreateMessageOptions extends Options { /** * @param string $from The phone number that initiated the message * @param string $messagingServiceSid The SID of the Messaging Service you want * to associate with the message. * @param string $body The text of the message you want to send. Can be up to * 1,600 characters in length. * @param string[] $mediaUrl The URL of the media to send with the message * @param string $statusCallback The URL we should call to send status * information to your application * @param string $applicationSid The application to use for callbacks * @param string $maxPrice The total maximum price up to 4 decimal places in US * dollars acceptable for the message to be delivered. * @param bool $provideFeedback Whether to confirm delivery of the message * @param int $attempt Total numer of attempts made , this inclusive to send * out the message * @param int $validityPeriod The number of seconds that the message can remain * in our outgoing queue. * @param bool $forceDelivery Reserved * @param string $contentRetention Determines if the message content can be * stored or redacted based on privacy settings * @param string $addressRetention Determines if the address can be stored or * obfuscated based on privacy settings * @param bool $smartEncoded Whether to detect Unicode characters that have a * similar GSM-7 character and replace them * @param string[] $persistentAction Rich actions for Channels Messages. * @param bool $shortenUrls Sets whether to shorten and track links included in * the body of this message. * @param string $scheduleType Pass the value `fixed` to schedule a message at * a fixed time. * @param \DateTime $sendAt The time that Twilio will send the message. Must be * in ISO 8601 format. * @param bool $sendAsMms If set to True, Twilio will deliver the message as a * single MMS message, regardless of the presence of * media. * @param string $contentSid The SID of the preconfigured Content object you * want to associate with the message. * @param string $contentVariables Key-value pairs of variable names to * substitution values, used alongside a * content_sid. */ public function __construct(string $from = Values::NONE, string $messagingServiceSid = Values::NONE, string $body = Values::NONE, array $mediaUrl = Values::ARRAY_NONE, string $statusCallback = Values::NONE, string $applicationSid = Values::NONE, string $maxPrice = Values::NONE, bool $provideFeedback = Values::NONE, int $attempt = Values::NONE, int $validityPeriod = Values::NONE, bool $forceDelivery = Values::NONE, string $contentRetention = Values::NONE, string $addressRetention = Values::NONE, bool $smartEncoded = Values::NONE, array $persistentAction = Values::ARRAY_NONE, bool $shortenUrls = Values::NONE, string $scheduleType = Values::NONE, \DateTime $sendAt = Values::NONE, bool $sendAsMms = Values::NONE, string $contentSid = Values::NONE, string $contentVariables = Values::NONE) { $this->options['from'] = $from; $this->options['messagingServiceSid'] = $messagingServiceSid; $this->options['body'] = $body; $this->options['mediaUrl'] = $mediaUrl; $this->options['statusCallback'] = $statusCallback; $this->options['applicationSid'] = $applicationSid; $this->options['maxPrice'] = $maxPrice; $this->options['provideFeedback'] = $provideFeedback; $this->options['attempt'] = $attempt; $this->options['validityPeriod'] = $validityPeriod; $this->options['forceDelivery'] = $forceDelivery; $this->options['contentRetention'] = $contentRetention; $this->options['addressRetention'] = $addressRetention; $this->options['smartEncoded'] = $smartEncoded; $this->options['persistentAction'] = $persistentAction; $this->options['shortenUrls'] = $shortenUrls; $this->options['scheduleType'] = $scheduleType; $this->options['sendAt'] = $sendAt; $this->options['sendAsMms'] = $sendAsMms; $this->options['contentSid'] = $contentSid; $this->options['contentVariables'] = $contentVariables; } /** * A Twilio phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, an [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send. Phone numbers or [short codes](https://www.twilio.com/docs/sms/api/short-code) purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using `messaging_service_sid`, this parameter must be empty. * * @param string $from The phone number that initiated the message * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot) you want to associate with the Message. Set this parameter to use the [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) you have configured and leave the `from` parameter empty. When only this parameter is set, Twilio will use your enabled Copilot Features to select the `from` phone number for delivery. * * @param string $messagingServiceSid The SID of the Messaging Service you want * to associate with the message. * @return $this Fluent Builder */ public function setMessagingServiceSid(string $messagingServiceSid): self { $this->options['messagingServiceSid'] = $messagingServiceSid; return $this; } /** * The text of the message you want to send. Can be up to 1,600 characters in length. * * @param string $body The text of the message you want to send. Can be up to * 1,600 characters in length. * @return $this Fluent Builder */ public function setBody(string $body): self { $this->options['body'] = $body; return $this; } /** * The URL of the media to send with the message. The media can be of type `gif`, `png`, and `jpeg` and will be formatted correctly on the recipient's device. The media size limit is 5MB for supported file types (JPEG, PNG, GIF) and 500KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message body, provide multiple `media_url` parameters in the POST request. You can include up to 10 `media_url` parameters per message. You can send images in an SMS message in only the US and Canada. * * @param string[] $mediaUrl The URL of the media to send with the message * @return $this Fluent Builder */ public function setMediaUrl(array $mediaUrl): self { $this->options['mediaUrl'] = $mediaUrl; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. If specified, we POST these message status changes to the URL: `queued`, `failed`, `sent`, `delivered`, or `undelivered`. Twilio will POST its [standard request parameters](https://www.twilio.com/docs/sms/twiml#request-parameters) as well as some additional parameters including `MessageSid`, `MessageStatus`, and `ErrorCode`. If you include this parameter with the `messaging_service_sid`, we use this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/sms/services/api). URLs must contain a valid hostname and underscores are not allowed. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The SID of the application that should receive message status. We POST a `message_sid` parameter and a `message_status` parameter with a value of `sent` or `failed` to the [application](https://www.twilio.com/docs/usage/api/applications)'s `message_status_callback`. If a `status_callback` parameter is also passed, it will be ignored and the application's `message_status_callback` parameter will be used. * * @param string $applicationSid The application to use for callbacks * @return $this Fluent Builder */ public function setApplicationSid(string $applicationSid): self { $this->options['applicationSid'] = $applicationSid; return $this; } /** * The maximum total price in US dollars that you will pay for the message to be delivered. Can be a decimal value that has up to 4 decimal places. All messages are queued for delivery and the message cost is checked before the message is sent. If the cost exceeds `max_price`, the message will fail and a status of `Failed` is sent to the status callback. If `MaxPrice` is not set, the message cost is not checked. * * @param string $maxPrice The total maximum price up to 4 decimal places in US * dollars acceptable for the message to be delivered. * @return $this Fluent Builder */ public function setMaxPrice(string $maxPrice): self { $this->options['maxPrice'] = $maxPrice; return $this; } /** * Whether to confirm delivery of the message. Set this value to `true` if you are sending messages that have a trackable user action and you intend to confirm delivery of the message using the [Message Feedback API](https://www.twilio.com/docs/sms/api/message-feedback-resource). This parameter is `false` by default. * * @param bool $provideFeedback Whether to confirm delivery of the message * @return $this Fluent Builder */ public function setProvideFeedback(bool $provideFeedback): self { $this->options['provideFeedback'] = $provideFeedback; return $this; } /** * Total number of attempts made ( including this ) to send out the message regardless of the provider used * * @param int $attempt Total numer of attempts made , this inclusive to send * out the message * @return $this Fluent Builder */ public function setAttempt(int $attempt): self { $this->options['attempt'] = $attempt; return $this; } /** * How long in seconds the message can remain in our outgoing message queue. After this period elapses, the message fails and we call your status callback. Can be between 1 and the default value of 14,400 seconds. After a message has been accepted by a carrier, however, we cannot guarantee that the message will not be queued after this period. We recommend that this value be at least 5 seconds. * * @param int $validityPeriod The number of seconds that the message can remain * in our outgoing queue. * @return $this Fluent Builder */ public function setValidityPeriod(int $validityPeriod): self { $this->options['validityPeriod'] = $validityPeriod; return $this; } /** * Reserved * * @param bool $forceDelivery Reserved * @return $this Fluent Builder */ public function setForceDelivery(bool $forceDelivery): self { $this->options['forceDelivery'] = $forceDelivery; return $this; } /** * Determines if the message content can be stored or redacted based on privacy settings * * @param string $contentRetention Determines if the message content can be * stored or redacted based on privacy settings * @return $this Fluent Builder */ public function setContentRetention(string $contentRetention): self { $this->options['contentRetention'] = $contentRetention; return $this; } /** * Determines if the address can be stored or obfuscated based on privacy settings * * @param string $addressRetention Determines if the address can be stored or * obfuscated based on privacy settings * @return $this Fluent Builder */ public function setAddressRetention(string $addressRetention): self { $this->options['addressRetention'] = $addressRetention; return $this; } /** * Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`. * * @param bool $smartEncoded Whether to detect Unicode characters that have a * similar GSM-7 character and replace them * @return $this Fluent Builder */ public function setSmartEncoded(bool $smartEncoded): self { $this->options['smartEncoded'] = $smartEncoded; return $this; } /** * Rich actions for Channels Messages. * * @param string[] $persistentAction Rich actions for Channels Messages. * @return $this Fluent Builder */ public function setPersistentAction(array $persistentAction): self { $this->options['persistentAction'] = $persistentAction; return $this; } /** * Determines the usage of Click Tracking. Setting it to `true` will instruct Twilio to replace all links in the Message with a shortened version based on the associated Domain Sid and track clicks on them. If this parameter is not set on an API call, we will use the value set on the Messaging Service. If this parameter is not set and the value is not configured on the Messaging Service used this will default to `false`. * * @param bool $shortenUrls Sets whether to shorten and track links included in * the body of this message. * @return $this Fluent Builder */ public function setShortenUrls(bool $shortenUrls): self { $this->options['shortenUrls'] = $shortenUrls; return $this; } /** * Indicates your intent to schedule a message. Pass the value `fixed` to schedule a message at a fixed time. * * @param string $scheduleType Pass the value `fixed` to schedule a message at * a fixed time. * @return $this Fluent Builder */ public function setScheduleType(string $scheduleType): self { $this->options['scheduleType'] = $scheduleType; return $this; } /** * The time that Twilio will send the message. Must be in ISO 8601 format. * * @param \DateTime $sendAt The time that Twilio will send the message. Must be * in ISO 8601 format. * @return $this Fluent Builder */ public function setSendAt(\DateTime $sendAt): self { $this->options['sendAt'] = $sendAt; return $this; } /** * If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media. * * @param bool $sendAsMms If set to True, Twilio will deliver the message as a * single MMS message, regardless of the presence of * media. * @return $this Fluent Builder */ public function setSendAsMms(bool $sendAsMms): self { $this->options['sendAsMms'] = $sendAsMms; return $this; } /** * The SID of the Content object returned at Content API content create time (https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template). If this parameter is not specified, then the Content API will not be utilized. * * @param string $contentSid The SID of the preconfigured Content object you * want to associate with the message. * @return $this Fluent Builder */ public function setContentSid(string $contentSid): self { $this->options['contentSid'] = $contentSid; return $this; } /** * Key-value pairs of variable names to substitution values, used alongside a content_sid. If not specified, Content API will default to the default variables defined at create time. * * @param string $contentVariables Key-value pairs of variable names to * substitution values, used alongside a * content_sid. * @return $this Fluent Builder */ public function setContentVariables(string $contentVariables): self { $this->options['contentVariables'] = $contentVariables; 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.Api.V2010.CreateMessageOptions ' . $options . ']'; } } class ReadMessageOptions extends Options { /** * @param string $to Filter by messages sent to this number * @param string $from Filter by from number * @param string $dateSentBefore Filter by date sent * @param string $dateSent Filter by date sent * @param string $dateSentAfter Filter by date sent */ public function __construct(string $to = Values::NONE, string $from = Values::NONE, string $dateSentBefore = Values::NONE, string $dateSent = Values::NONE, string $dateSentAfter = Values::NONE) { $this->options['to'] = $to; $this->options['from'] = $from; $this->options['dateSentBefore'] = $dateSentBefore; $this->options['dateSent'] = $dateSent; $this->options['dateSentAfter'] = $dateSentAfter; } /** * Read messages sent to only this phone number. * * @param string $to Filter by messages sent to this number * @return $this Fluent Builder */ public function setTo(string $to): self { $this->options['to'] = $to; return $this; } /** * Read messages sent from only this phone number or alphanumeric sender ID. * * @param string $from Filter by from number * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. * * @param string $dateSentBefore Filter by date sent * @return $this Fluent Builder */ public function setDateSentBefore(string $dateSentBefore): self { $this->options['dateSentBefore'] = $dateSentBefore; return $this; } /** * The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. * * @param string $dateSent Filter by date sent * @return $this Fluent Builder */ public function setDateSent(string $dateSent): self { $this->options['dateSent'] = $dateSent; return $this; } /** * The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. * * @param string $dateSentAfter Filter by date sent * @return $this Fluent Builder */ public function setDateSentAfter(string $dateSentAfter): self { $this->options['dateSentAfter'] = $dateSentAfter; 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.Api.V2010.ReadMessageOptions ' . $options . ']'; } } class UpdateMessageOptions extends Options { /** * @param string $body The text of the message you want to send * @param string $status Set as `canceled` to cancel a message from being sent. */ public function __construct(string $body = Values::NONE, string $status = Values::NONE) { $this->options['body'] = $body; $this->options['status'] = $status; } /** * The text of the message you want to send. Can be up to 1,600 characters long. * * @param string $body The text of the message you want to send * @return $this Fluent Builder */ public function setBody(string $body): self { $this->options['body'] = $body; return $this; } /** * When set as `canceled`, allows a message cancelation request if a message has not yet been sent. * * @param string $status Set as `canceled` to cancel a message from being sent. * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; 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.Api.V2010.UpdateMessageOptions ' . $options . ']'; } } V2010/Account/SigningKeyOptions.php 0000644 00000002550 15111164035 0013003 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class SigningKeyOptions { /** * @param string $friendlyName The friendly_name * @return UpdateSigningKeyOptions Options builder */ public static function update(string $friendlyName = Values::NONE): UpdateSigningKeyOptions { return new UpdateSigningKeyOptions($friendlyName); } } class UpdateSigningKeyOptions extends Options { /** * @param string $friendlyName The friendly_name */ public function __construct(string $friendlyName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; 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.Api.V2010.UpdateSigningKeyOptions ' . $options . ']'; } } V2010/Account/OutgoingCallerIdContext.php 0000644 00000005535 15111164036 0014127 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Values; use Twilio\Version; class OutgoingCallerIdContext extends InstanceContext { /** * Initialize the OutgoingCallerIdContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/OutgoingCallerIds/' . \rawurlencode($sid) . '.json'; } /** * Fetch the OutgoingCallerIdInstance * * @return OutgoingCallerIdInstance Fetched OutgoingCallerIdInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): OutgoingCallerIdInstance { $payload = $this->version->fetch('GET', $this->uri); return new OutgoingCallerIdInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the OutgoingCallerIdInstance * * @param array|Options $options Optional Arguments * @return OutgoingCallerIdInstance Updated OutgoingCallerIdInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): OutgoingCallerIdInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new OutgoingCallerIdInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the OutgoingCallerIdInstance * * @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.Api.V2010.OutgoingCallerIdContext ' . \implode(' ', $context) . ']'; } } V2010/Account/AvailablePhoneNumberCountryContext.php 0000644 00000015357 15111164036 0016346 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\LocalList; use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MachineToMachineList; use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MobileList; use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\NationalList; use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\SharedCostList; use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\TollFreeList; use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\VoipList; use Twilio\Values; use Twilio\Version; /** * @property LocalList $local * @property TollFreeList $tollFree * @property MobileList $mobile * @property NationalList $national * @property VoipList $voip * @property SharedCostList $sharedCost * @property MachineToMachineList $machineToMachine */ class AvailablePhoneNumberCountryContext extends InstanceContext { protected $_local; protected $_tollFree; protected $_mobile; protected $_national; protected $_voip; protected $_sharedCost; protected $_machineToMachine; /** * Initialize the AvailablePhoneNumberCountryContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account requesting the available * phone number Country resource * @param string $countryCode The ISO country code of the country to fetch * available phone number information about */ public function __construct(Version $version, $accountSid, $countryCode) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '.json'; } /** * Fetch the AvailablePhoneNumberCountryInstance * * @return AvailablePhoneNumberCountryInstance Fetched * AvailablePhoneNumberCountryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AvailablePhoneNumberCountryInstance { $payload = $this->version->fetch('GET', $this->uri); return new AvailablePhoneNumberCountryInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode'] ); } /** * Access the local */ protected function getLocal(): LocalList { if (!$this->_local) { $this->_local = new LocalList( $this->version, $this->solution['accountSid'], $this->solution['countryCode'] ); } return $this->_local; } /** * Access the tollFree */ protected function getTollFree(): TollFreeList { if (!$this->_tollFree) { $this->_tollFree = new TollFreeList( $this->version, $this->solution['accountSid'], $this->solution['countryCode'] ); } return $this->_tollFree; } /** * Access the mobile */ protected function getMobile(): MobileList { if (!$this->_mobile) { $this->_mobile = new MobileList( $this->version, $this->solution['accountSid'], $this->solution['countryCode'] ); } return $this->_mobile; } /** * Access the national */ protected function getNational(): NationalList { if (!$this->_national) { $this->_national = new NationalList( $this->version, $this->solution['accountSid'], $this->solution['countryCode'] ); } return $this->_national; } /** * Access the voip */ protected function getVoip(): VoipList { if (!$this->_voip) { $this->_voip = new VoipList( $this->version, $this->solution['accountSid'], $this->solution['countryCode'] ); } return $this->_voip; } /** * Access the sharedCost */ protected function getSharedCost(): SharedCostList { if (!$this->_sharedCost) { $this->_sharedCost = new SharedCostList( $this->version, $this->solution['accountSid'], $this->solution['countryCode'] ); } return $this->_sharedCost; } /** * Access the machineToMachine */ protected function getMachineToMachine(): MachineToMachineList { if (!$this->_machineToMachine) { $this->_machineToMachine = new MachineToMachineList( $this->version, $this->solution['accountSid'], $this->solution['countryCode'] ); } return $this->_machineToMachine; } /** * 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.Api.V2010.AvailablePhoneNumberCountryContext ' . \implode(' ', $context) . ']'; } } V2010/Account/UsageInstance.php 0000644 00000003120 15111164036 0012104 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; class UsageInstance extends InstanceResource { /** * Initialize the UsageInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.UsageInstance]'; } } V2010/Account/TokenList.php 0000644 00000003057 15111164037 0011301 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; class TokenList extends ListResource { /** * Construct the TokenList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Tokens.json'; } /** * Create the TokenInstance * * @param array|Options $options Optional Arguments * @return TokenInstance Created TokenInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): TokenInstance { $options = new Values($options); $data = Values::of(['Ttl' => $options['ttl'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TokenInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TokenList]'; } } V2010/Account/BalanceInstance.php 0000644 00000003575 15111164037 0012404 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $balance * @property string $currency */ class BalanceInstance extends InstanceResource { /** * Initialize the BalanceInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid Account Sid. */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'balance' => Values::array_get($payload, 'balance'), 'currency' => Values::array_get($payload, 'currency'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.BalanceInstance]'; } } V2010/Account/TokenOptions.php 0000644 00000002610 15111164037 0012013 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class TokenOptions { /** * @param int $ttl The duration in seconds the credentials are valid * @return CreateTokenOptions Options builder */ public static function create(int $ttl = Values::NONE): CreateTokenOptions { return new CreateTokenOptions($ttl); } } class CreateTokenOptions extends Options { /** * @param int $ttl The duration in seconds the credentials are valid */ public function __construct(int $ttl = Values::NONE) { $this->options['ttl'] = $ttl; } /** * The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours). * * @param int $ttl The duration in seconds the credentials are valid * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; 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.Api.V2010.CreateTokenOptions ' . $options . ']'; } } V2010/Account/TranscriptionPage.php 0000644 00000002314 15111164037 0013014 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class TranscriptionPage 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 TranscriptionInstance \Twilio\Rest\Api\V2010\Account\TranscriptionInstance */ public function buildInstance(array $payload): TranscriptionInstance { return new TranscriptionInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TranscriptionPage]'; } } V2010/Account/TokenPage.php 0000644 00000002234 15111164040 0011230 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class TokenPage 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 TokenInstance \Twilio\Rest\Api\V2010\Account\TokenInstance */ public function buildInstance(array $payload): TokenInstance { return new TokenInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TokenPage]'; } } V2010/Account/ShortCodePage.php 0000644 00000002264 15111164040 0012045 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class ShortCodePage 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 ShortCodeInstance \Twilio\Rest\Api\V2010\Account\ShortCodeInstance */ public function buildInstance(array $payload): ShortCodeInstance { return new ShortCodeInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ShortCodePage]'; } } V2010/Account/MessagePage.php 0000644 00000002250 15111164040 0011532 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class MessagePage 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 MessageInstance \Twilio\Rest\Api\V2010\Account\MessageInstance */ public function buildInstance(array $payload): MessageInstance { return new MessageInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MessagePage]'; } } V2010/Account/CallOptions.php 0000644 00000142721 15111164041 0011611 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class CallOptions { /** * @param string $url The absolute URL that returns TwiML for this call * @param string $twiml TwiML instructions for the call * @param string $applicationSid The SID of the Application resource that will * handle the call * @param string $method HTTP method to use to fetch TwiML * @param string $fallbackUrl Fallback URL in case of error * @param string $fallbackMethod HTTP Method to use with fallback_url * @param string $statusCallback The URL we should call to send status * information to your application * @param string[] $statusCallbackEvent The call progress events that we send * to the `status_callback` URL. * @param string $statusCallbackMethod HTTP Method to use with status_callback * @param string $sendDigits The digits to dial after connecting to the number * @param int $timeout Number of seconds to wait for an answer * @param bool $record Whether to record the call * @param string $recordingChannels The number of channels in the final * recording * @param string $recordingStatusCallback The URL that we call when the * recording is available to be accessed * @param string $recordingStatusCallbackMethod The HTTP method we should use * when calling the * `recording_status_callback` URL * @param string $sipAuthUsername The username used to authenticate the caller * making a SIP call * @param string $sipAuthPassword The password required to authenticate the * user account specified in `sip_auth_username`. * @param string $machineDetection Enable machine detection or end of greeting * detection * @param int $machineDetectionTimeout Number of seconds to wait for machine * detection * @param string[] $recordingStatusCallbackEvent The recording status events * that will trigger calls to the * URL specified in * `recording_status_callback` * @param string $trim Set this parameter to control trimming of silence on the * recording. * @param string $callerId The phone number, SIP address, or Client identifier * that made this call. Phone numbers are in E.164 * format (e.g., +16175551212). SIP addresses are * formatted as `name@company.com`. * @param int $machineDetectionSpeechThreshold Number of milliseconds for * measuring stick for the length * of the speech activity * @param int $machineDetectionSpeechEndThreshold Number of milliseconds of * silence after speech activity * @param int $machineDetectionSilenceTimeout Number of milliseconds of initial * silence * @param string $asyncAmd Enable asynchronous AMD * @param string $asyncAmdStatusCallback The URL we should call to send amd * status information to your application * @param string $asyncAmdStatusCallbackMethod HTTP Method to use with * async_amd_status_callback * @param string $byoc BYOC trunk SID (Beta) * @param string $callReason Reason for the call (Branded Calls Beta) * @param string $callToken A token string needed to invoke a forwarded call * with a CallerId recieved on a previous incoming call * @param string $recordingTrack Which track(s) to record * @param int $timeLimit The maximum duration of the call in seconds. * @return CreateCallOptions Options builder */ public static function create(string $url = Values::NONE, string $twiml = Values::NONE, string $applicationSid = Values::NONE, string $method = Values::NONE, string $fallbackUrl = Values::NONE, string $fallbackMethod = Values::NONE, string $statusCallback = Values::NONE, array $statusCallbackEvent = Values::ARRAY_NONE, string $statusCallbackMethod = Values::NONE, string $sendDigits = Values::NONE, int $timeout = Values::NONE, bool $record = Values::NONE, string $recordingChannels = Values::NONE, string $recordingStatusCallback = Values::NONE, string $recordingStatusCallbackMethod = Values::NONE, string $sipAuthUsername = Values::NONE, string $sipAuthPassword = Values::NONE, string $machineDetection = Values::NONE, int $machineDetectionTimeout = Values::NONE, array $recordingStatusCallbackEvent = Values::ARRAY_NONE, string $trim = Values::NONE, string $callerId = Values::NONE, int $machineDetectionSpeechThreshold = Values::NONE, int $machineDetectionSpeechEndThreshold = Values::NONE, int $machineDetectionSilenceTimeout = Values::NONE, string $asyncAmd = Values::NONE, string $asyncAmdStatusCallback = Values::NONE, string $asyncAmdStatusCallbackMethod = Values::NONE, string $byoc = Values::NONE, string $callReason = Values::NONE, string $callToken = Values::NONE, string $recordingTrack = Values::NONE, int $timeLimit = Values::NONE): CreateCallOptions { return new CreateCallOptions($url, $twiml, $applicationSid, $method, $fallbackUrl, $fallbackMethod, $statusCallback, $statusCallbackEvent, $statusCallbackMethod, $sendDigits, $timeout, $record, $recordingChannels, $recordingStatusCallback, $recordingStatusCallbackMethod, $sipAuthUsername, $sipAuthPassword, $machineDetection, $machineDetectionTimeout, $recordingStatusCallbackEvent, $trim, $callerId, $machineDetectionSpeechThreshold, $machineDetectionSpeechEndThreshold, $machineDetectionSilenceTimeout, $asyncAmd, $asyncAmdStatusCallback, $asyncAmdStatusCallbackMethod, $byoc, $callReason, $callToken, $recordingTrack, $timeLimit); } /** * @param string $to Phone number or Client identifier of calls to include * @param string $from Phone number or Client identifier to filter `from` on * @param string $parentCallSid Parent call SID to filter on * @param string $status The status of the resources to read * @param string $startTimeBefore Only include calls that started on this date * @param string $startTime Only include calls that started on this date * @param string $startTimeAfter Only include calls that started on this date * @param string $endTimeBefore Only include calls that ended on this date * @param string $endTime Only include calls that ended on this date * @param string $endTimeAfter Only include calls that ended on this date * @return ReadCallOptions Options builder */ public static function read(string $to = Values::NONE, string $from = Values::NONE, string $parentCallSid = Values::NONE, string $status = Values::NONE, string $startTimeBefore = Values::NONE, string $startTime = Values::NONE, string $startTimeAfter = Values::NONE, string $endTimeBefore = Values::NONE, string $endTime = Values::NONE, string $endTimeAfter = Values::NONE): ReadCallOptions { return new ReadCallOptions($to, $from, $parentCallSid, $status, $startTimeBefore, $startTime, $startTimeAfter, $endTimeBefore, $endTime, $endTimeAfter); } /** * @param string $url The absolute URL that returns TwiML for this call * @param string $method HTTP method to use to fetch TwiML * @param string $status The new status to update the call with. * @param string $fallbackUrl Fallback URL in case of error * @param string $fallbackMethod HTTP Method to use with fallback_url * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod HTTP Method to use to call * status_callback * @param string $twiml TwiML instructions for the call * @param int $timeLimit The maximum duration of the call in seconds. * @return UpdateCallOptions Options builder */ public static function update(string $url = Values::NONE, string $method = Values::NONE, string $status = Values::NONE, string $fallbackUrl = Values::NONE, string $fallbackMethod = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $twiml = Values::NONE, int $timeLimit = Values::NONE): UpdateCallOptions { return new UpdateCallOptions($url, $method, $status, $fallbackUrl, $fallbackMethod, $statusCallback, $statusCallbackMethod, $twiml, $timeLimit); } } class CreateCallOptions extends Options { /** * @param string $url The absolute URL that returns TwiML for this call * @param string $twiml TwiML instructions for the call * @param string $applicationSid The SID of the Application resource that will * handle the call * @param string $method HTTP method to use to fetch TwiML * @param string $fallbackUrl Fallback URL in case of error * @param string $fallbackMethod HTTP Method to use with fallback_url * @param string $statusCallback The URL we should call to send status * information to your application * @param string[] $statusCallbackEvent The call progress events that we send * to the `status_callback` URL. * @param string $statusCallbackMethod HTTP Method to use with status_callback * @param string $sendDigits The digits to dial after connecting to the number * @param int $timeout Number of seconds to wait for an answer * @param bool $record Whether to record the call * @param string $recordingChannels The number of channels in the final * recording * @param string $recordingStatusCallback The URL that we call when the * recording is available to be accessed * @param string $recordingStatusCallbackMethod The HTTP method we should use * when calling the * `recording_status_callback` URL * @param string $sipAuthUsername The username used to authenticate the caller * making a SIP call * @param string $sipAuthPassword The password required to authenticate the * user account specified in `sip_auth_username`. * @param string $machineDetection Enable machine detection or end of greeting * detection * @param int $machineDetectionTimeout Number of seconds to wait for machine * detection * @param string[] $recordingStatusCallbackEvent The recording status events * that will trigger calls to the * URL specified in * `recording_status_callback` * @param string $trim Set this parameter to control trimming of silence on the * recording. * @param string $callerId The phone number, SIP address, or Client identifier * that made this call. Phone numbers are in E.164 * format (e.g., +16175551212). SIP addresses are * formatted as `name@company.com`. * @param int $machineDetectionSpeechThreshold Number of milliseconds for * measuring stick for the length * of the speech activity * @param int $machineDetectionSpeechEndThreshold Number of milliseconds of * silence after speech activity * @param int $machineDetectionSilenceTimeout Number of milliseconds of initial * silence * @param string $asyncAmd Enable asynchronous AMD * @param string $asyncAmdStatusCallback The URL we should call to send amd * status information to your application * @param string $asyncAmdStatusCallbackMethod HTTP Method to use with * async_amd_status_callback * @param string $byoc BYOC trunk SID (Beta) * @param string $callReason Reason for the call (Branded Calls Beta) * @param string $callToken A token string needed to invoke a forwarded call * with a CallerId recieved on a previous incoming call * @param string $recordingTrack Which track(s) to record * @param int $timeLimit The maximum duration of the call in seconds. */ public function __construct(string $url = Values::NONE, string $twiml = Values::NONE, string $applicationSid = Values::NONE, string $method = Values::NONE, string $fallbackUrl = Values::NONE, string $fallbackMethod = Values::NONE, string $statusCallback = Values::NONE, array $statusCallbackEvent = Values::ARRAY_NONE, string $statusCallbackMethod = Values::NONE, string $sendDigits = Values::NONE, int $timeout = Values::NONE, bool $record = Values::NONE, string $recordingChannels = Values::NONE, string $recordingStatusCallback = Values::NONE, string $recordingStatusCallbackMethod = Values::NONE, string $sipAuthUsername = Values::NONE, string $sipAuthPassword = Values::NONE, string $machineDetection = Values::NONE, int $machineDetectionTimeout = Values::NONE, array $recordingStatusCallbackEvent = Values::ARRAY_NONE, string $trim = Values::NONE, string $callerId = Values::NONE, int $machineDetectionSpeechThreshold = Values::NONE, int $machineDetectionSpeechEndThreshold = Values::NONE, int $machineDetectionSilenceTimeout = Values::NONE, string $asyncAmd = Values::NONE, string $asyncAmdStatusCallback = Values::NONE, string $asyncAmdStatusCallbackMethod = Values::NONE, string $byoc = Values::NONE, string $callReason = Values::NONE, string $callToken = Values::NONE, string $recordingTrack = Values::NONE, int $timeLimit = Values::NONE) { $this->options['url'] = $url; $this->options['twiml'] = $twiml; $this->options['applicationSid'] = $applicationSid; $this->options['method'] = $method; $this->options['fallbackUrl'] = $fallbackUrl; $this->options['fallbackMethod'] = $fallbackMethod; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackEvent'] = $statusCallbackEvent; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['sendDigits'] = $sendDigits; $this->options['timeout'] = $timeout; $this->options['record'] = $record; $this->options['recordingChannels'] = $recordingChannels; $this->options['recordingStatusCallback'] = $recordingStatusCallback; $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; $this->options['sipAuthUsername'] = $sipAuthUsername; $this->options['sipAuthPassword'] = $sipAuthPassword; $this->options['machineDetection'] = $machineDetection; $this->options['machineDetectionTimeout'] = $machineDetectionTimeout; $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent; $this->options['trim'] = $trim; $this->options['callerId'] = $callerId; $this->options['machineDetectionSpeechThreshold'] = $machineDetectionSpeechThreshold; $this->options['machineDetectionSpeechEndThreshold'] = $machineDetectionSpeechEndThreshold; $this->options['machineDetectionSilenceTimeout'] = $machineDetectionSilenceTimeout; $this->options['asyncAmd'] = $asyncAmd; $this->options['asyncAmdStatusCallback'] = $asyncAmdStatusCallback; $this->options['asyncAmdStatusCallbackMethod'] = $asyncAmdStatusCallbackMethod; $this->options['byoc'] = $byoc; $this->options['callReason'] = $callReason; $this->options['callToken'] = $callToken; $this->options['recordingTrack'] = $recordingTrack; $this->options['timeLimit'] = $timeLimit; } /** * The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). * * @param string $url The absolute URL that returns TwiML for this call * @return $this Fluent Builder */ public function setUrl(string $url): self { $this->options['url'] = $url; return $this; } /** * TwiML instructions for the call Twilio will use without fetching Twiml from url parameter. If both `twiml` and `url` are provided then `twiml` parameter will be ignored. Max 4000 characters. * * @param string $twiml TwiML instructions for the call * @return $this Fluent Builder */ public function setTwiml(string $twiml): self { $this->options['twiml'] = $twiml; return $this; } /** * The SID of the Application resource that will handle the call, if the call will be handled by an application. * * @param string $applicationSid The SID of the Application resource that will * handle the call * @return $this Fluent Builder */ public function setApplicationSid(string $applicationSid): self { $this->options['applicationSid'] = $applicationSid; return $this; } /** * The HTTP method we should use when calling the `url` parameter's value. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. * * @param string $method HTTP method to use to fetch TwiML * @return $this Fluent Builder */ public function setMethod(string $method): self { $this->options['method'] = $method; return $this; } /** * The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored. * * @param string $fallbackUrl Fallback URL in case of error * @return $this Fluent Builder */ public function setFallbackUrl(string $fallbackUrl): self { $this->options['fallbackUrl'] = $fallbackUrl; return $this; } /** * The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. * * @param string $fallbackMethod HTTP Method to use with fallback_url * @return $this Fluent Builder */ public function setFallbackMethod(string $fallbackMethod): self { $this->options['fallbackMethod'] = $fallbackMethod; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted). * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The call progress events that we will send to the `status_callback` URL. Can be: `initiated`, `ringing`, `answered`, and `completed`. If no event is specified, we send the `completed` status. If you want to receive multiple events, specify each one in a separate `status_callback_event` parameter. See the code sample for [monitoring call progress](https://www.twilio.com/docs/voice/api/call-resource?code-sample=code-create-a-call-resource-and-specify-a-statuscallbackevent&code-sdk-version=json). If an `application_sid` is present, this parameter is ignored. * * @param string[] $statusCallbackEvent The call progress events that we send * to the `status_callback` URL. * @return $this Fluent Builder */ public function setStatusCallbackEvent(array $statusCallbackEvent): self { $this->options['statusCallbackEvent'] = $statusCallbackEvent; return $this; } /** * The HTTP method we should use when calling the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. * * @param string $statusCallbackMethod HTTP Method to use with status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * A string of keys to dial after connecting to the number, maximum of 32 digits. Valid digits in the string include: any digit (`0`-`9`), '`#`', '`*`' and '`w`', to insert a half second pause. For example, if you connected to a company phone number and wanted to pause for one second, and then dial extension 1234 followed by the pound key, the value of this parameter would be `ww1234#`. Remember to URL-encode this string, since the '`#`' character has special meaning in a URL. If both `SendDigits` and `MachineDetection` parameters are provided, then `MachineDetection` will be ignored. * * @param string $sendDigits The digits to dial after connecting to the number * @return $this Fluent Builder */ public function setSendDigits(string $sendDigits): self { $this->options['sendDigits'] = $sendDigits; return $this; } /** * The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is `60` seconds and the maximum is `600` seconds. For some call flows, we will add a 5-second buffer to the timeout value you provide. For this reason, a timeout value of 10 seconds could result in an actual timeout closer to 15 seconds. You can set this to a short time, such as `15` seconds, to hang up before reaching an answering machine or voicemail. * * @param int $timeout Number of seconds to wait for an answer * @return $this Fluent Builder */ public function setTimeout(int $timeout): self { $this->options['timeout'] = $timeout; return $this; } /** * Whether to record the call. Can be `true` to record the phone call, or `false` to not. The default is `false`. The `recording_url` is sent to the `status_callback` URL. * * @param bool $record Whether to record the call * @return $this Fluent Builder */ public function setRecord(bool $record): self { $this->options['record'] = $record; return $this; } /** * The number of channels in the final recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both legs of the call in a single channel of the recording file. `dual` records each leg to a separate channel of the recording file. The first channel of a dual-channel recording contains the parent call and the second channel contains the child call. * * @param string $recordingChannels The number of channels in the final * recording * @return $this Fluent Builder */ public function setRecordingChannels(string $recordingChannels): self { $this->options['recordingChannels'] = $recordingChannels; return $this; } /** * The URL that we call when the recording is available to be accessed. * * @param string $recordingStatusCallback The URL that we call when the * recording is available to be accessed * @return $this Fluent Builder */ public function setRecordingStatusCallback(string $recordingStatusCallback): self { $this->options['recordingStatusCallback'] = $recordingStatusCallback; return $this; } /** * The HTTP method we should use when calling the `recording_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. * * @param string $recordingStatusCallbackMethod The HTTP method we should use * when calling the * `recording_status_callback` URL * @return $this Fluent Builder */ public function setRecordingStatusCallbackMethod(string $recordingStatusCallbackMethod): self { $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; return $this; } /** * The username used to authenticate the caller making a SIP call. * * @param string $sipAuthUsername The username used to authenticate the caller * making a SIP call * @return $this Fluent Builder */ public function setSipAuthUsername(string $sipAuthUsername): self { $this->options['sipAuthUsername'] = $sipAuthUsername; return $this; } /** * The password required to authenticate the user account specified in `sip_auth_username`. * * @param string $sipAuthPassword The password required to authenticate the * user account specified in `sip_auth_username`. * @return $this Fluent Builder */ public function setSipAuthPassword(string $sipAuthPassword): self { $this->options['sipAuthPassword'] = $sipAuthPassword; return $this; } /** * Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. If `send_digits` is provided, this parameter is ignored. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection). * * @param string $machineDetection Enable machine detection or end of greeting * detection * @return $this Fluent Builder */ public function setMachineDetection(string $machineDetection): self { $this->options['machineDetection'] = $machineDetection; return $this; } /** * The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds. * * @param int $machineDetectionTimeout Number of seconds to wait for machine * detection * @return $this Fluent Builder */ public function setMachineDetectionTimeout(int $machineDetectionTimeout): self { $this->options['machineDetectionTimeout'] = $machineDetectionTimeout; return $this; } /** * The recording status events that will trigger calls to the URL specified in `recording_status_callback`. Can be: `in-progress`, `completed` and `absent`. Defaults to `completed`. Separate multiple values with a space. * * @param string[] $recordingStatusCallbackEvent The recording status events * that will trigger calls to the * URL specified in * `recording_status_callback` * @return $this Fluent Builder */ public function setRecordingStatusCallbackEvent(array $recordingStatusCallbackEvent): self { $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent; return $this; } /** * Whether to trim any leading and trailing silence from the recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`. * * @param string $trim Set this parameter to control trimming of silence on the * recording. * @return $this Fluent Builder */ public function setTrim(string $trim): self { $this->options['trim'] = $trim; return $this; } /** * The phone number, SIP address, or Client identifier that made this call. Phone numbers are in [E.164 format](https://wwnw.twilio.com/docs/glossary/what-e164) (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. * * @param string $callerId The phone number, SIP address, or Client identifier * that made this call. Phone numbers are in E.164 * format (e.g., +16175551212). SIP addresses are * formatted as `name@company.com`. * @return $this Fluent Builder */ public function setCallerId(string $callerId): self { $this->options['callerId'] = $callerId; return $this; } /** * The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400. * * @param int $machineDetectionSpeechThreshold Number of milliseconds for * measuring stick for the length * of the speech activity * @return $this Fluent Builder */ public function setMachineDetectionSpeechThreshold(int $machineDetectionSpeechThreshold): self { $this->options['machineDetectionSpeechThreshold'] = $machineDetectionSpeechThreshold; return $this; } /** * The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200. * * @param int $machineDetectionSpeechEndThreshold Number of milliseconds of * silence after speech activity * @return $this Fluent Builder */ public function setMachineDetectionSpeechEndThreshold(int $machineDetectionSpeechEndThreshold): self { $this->options['machineDetectionSpeechEndThreshold'] = $machineDetectionSpeechEndThreshold; return $this; } /** * The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000. * * @param int $machineDetectionSilenceTimeout Number of milliseconds of initial * silence * @return $this Fluent Builder */ public function setMachineDetectionSilenceTimeout(int $machineDetectionSilenceTimeout): self { $this->options['machineDetectionSilenceTimeout'] = $machineDetectionSilenceTimeout; return $this; } /** * Select whether to perform answering machine detection in the background. Default, blocks the execution of the call until Answering Machine Detection is completed. Can be: `true` or `false`. * * @param string $asyncAmd Enable asynchronous AMD * @return $this Fluent Builder */ public function setAsyncAmd(string $asyncAmd): self { $this->options['asyncAmd'] = $asyncAmd; return $this; } /** * The URL that we should call using the `async_amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax. * * @param string $asyncAmdStatusCallback The URL we should call to send amd * status information to your application * @return $this Fluent Builder */ public function setAsyncAmdStatusCallback(string $asyncAmdStatusCallback): self { $this->options['asyncAmdStatusCallback'] = $asyncAmdStatusCallback; return $this; } /** * The HTTP method we should use when calling the `async_amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. * * @param string $asyncAmdStatusCallbackMethod HTTP Method to use with * async_amd_status_callback * @return $this Fluent Builder */ public function setAsyncAmdStatusCallbackMethod(string $asyncAmdStatusCallbackMethod): self { $this->options['asyncAmdStatusCallbackMethod'] = $asyncAmdStatusCallbackMethod; return $this; } /** * The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta) * * @param string $byoc BYOC trunk SID (Beta) * @return $this Fluent Builder */ public function setByoc(string $byoc): self { $this->options['byoc'] = $byoc; return $this; } /** * The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta) * * @param string $callReason Reason for the call (Branded Calls Beta) * @return $this Fluent Builder */ public function setCallReason(string $callReason): self { $this->options['callReason'] = $callReason; return $this; } /** * A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call. * * @param string $callToken A token string needed to invoke a forwarded call * with a CallerId recieved on a previous incoming call * @return $this Fluent Builder */ public function setCallToken(string $callToken): self { $this->options['callToken'] = $callToken; return $this; } /** * The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. * * @param string $recordingTrack Which track(s) to record * @return $this Fluent Builder */ public function setRecordingTrack(string $recordingTrack): self { $this->options['recordingTrack'] = $recordingTrack; return $this; } /** * The maximum duration of the call in seconds. Constraints depend on account and configuration. * * @param int $timeLimit The maximum duration of the call in seconds. * @return $this Fluent Builder */ public function setTimeLimit(int $timeLimit): self { $this->options['timeLimit'] = $timeLimit; 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.Api.V2010.CreateCallOptions ' . $options . ']'; } } class ReadCallOptions extends Options { /** * @param string $to Phone number or Client identifier of calls to include * @param string $from Phone number or Client identifier to filter `from` on * @param string $parentCallSid Parent call SID to filter on * @param string $status The status of the resources to read * @param string $startTimeBefore Only include calls that started on this date * @param string $startTime Only include calls that started on this date * @param string $startTimeAfter Only include calls that started on this date * @param string $endTimeBefore Only include calls that ended on this date * @param string $endTime Only include calls that ended on this date * @param string $endTimeAfter Only include calls that ended on this date */ public function __construct(string $to = Values::NONE, string $from = Values::NONE, string $parentCallSid = Values::NONE, string $status = Values::NONE, string $startTimeBefore = Values::NONE, string $startTime = Values::NONE, string $startTimeAfter = Values::NONE, string $endTimeBefore = Values::NONE, string $endTime = Values::NONE, string $endTimeAfter = Values::NONE) { $this->options['to'] = $to; $this->options['from'] = $from; $this->options['parentCallSid'] = $parentCallSid; $this->options['status'] = $status; $this->options['startTimeBefore'] = $startTimeBefore; $this->options['startTime'] = $startTime; $this->options['startTimeAfter'] = $startTimeAfter; $this->options['endTimeBefore'] = $endTimeBefore; $this->options['endTime'] = $endTime; $this->options['endTimeAfter'] = $endTimeAfter; } /** * Only show calls made to this phone number, SIP address, Client identifier or SIM SID. * * @param string $to Phone number or Client identifier of calls to include * @return $this Fluent Builder */ public function setTo(string $to): self { $this->options['to'] = $to; return $this; } /** * Only include calls from this phone number, SIP address, Client identifier or SIM SID. * * @param string $from Phone number or Client identifier to filter `from` on * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * Only include calls spawned by calls with this SID. * * @param string $parentCallSid Parent call SID to filter on * @return $this Fluent Builder */ public function setParentCallSid(string $parentCallSid): self { $this->options['parentCallSid'] = $parentCallSid; return $this; } /** * The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`. * * @param string $status The status of the resources to read * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. * * @param string $startTimeBefore Only include calls that started on this date * @return $this Fluent Builder */ public function setStartTimeBefore(string $startTimeBefore): self { $this->options['startTimeBefore'] = $startTimeBefore; return $this; } /** * Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. * * @param string $startTime Only include calls that started on this date * @return $this Fluent Builder */ public function setStartTime(string $startTime): self { $this->options['startTime'] = $startTime; return $this; } /** * Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. * * @param string $startTimeAfter Only include calls that started on this date * @return $this Fluent Builder */ public function setStartTimeAfter(string $startTimeAfter): self { $this->options['startTimeAfter'] = $startTimeAfter; return $this; } /** * Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. * * @param string $endTimeBefore Only include calls that ended on this date * @return $this Fluent Builder */ public function setEndTimeBefore(string $endTimeBefore): self { $this->options['endTimeBefore'] = $endTimeBefore; return $this; } /** * Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. * * @param string $endTime Only include calls that ended on this date * @return $this Fluent Builder */ public function setEndTime(string $endTime): self { $this->options['endTime'] = $endTime; return $this; } /** * Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. * * @param string $endTimeAfter Only include calls that ended on this date * @return $this Fluent Builder */ public function setEndTimeAfter(string $endTimeAfter): self { $this->options['endTimeAfter'] = $endTimeAfter; 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.Api.V2010.ReadCallOptions ' . $options . ']'; } } class UpdateCallOptions extends Options { /** * @param string $url The absolute URL that returns TwiML for this call * @param string $method HTTP method to use to fetch TwiML * @param string $status The new status to update the call with. * @param string $fallbackUrl Fallback URL in case of error * @param string $fallbackMethod HTTP Method to use with fallback_url * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod HTTP Method to use to call * status_callback * @param string $twiml TwiML instructions for the call * @param int $timeLimit The maximum duration of the call in seconds. */ public function __construct(string $url = Values::NONE, string $method = Values::NONE, string $status = Values::NONE, string $fallbackUrl = Values::NONE, string $fallbackMethod = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $twiml = Values::NONE, int $timeLimit = Values::NONE) { $this->options['url'] = $url; $this->options['method'] = $method; $this->options['status'] = $status; $this->options['fallbackUrl'] = $fallbackUrl; $this->options['fallbackMethod'] = $fallbackMethod; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['twiml'] = $twiml; $this->options['timeLimit'] = $timeLimit; } /** * The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). * * @param string $url The absolute URL that returns TwiML for this call * @return $this Fluent Builder */ public function setUrl(string $url): self { $this->options['url'] = $url; return $this; } /** * The HTTP method we should use when calling the `url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. * * @param string $method HTTP method to use to fetch TwiML * @return $this Fluent Builder */ public function setMethod(string $method): self { $this->options['method'] = $method; return $this; } /** * The new status of the resource. Can be: `canceled` or `completed`. Specifying `canceled` will attempt to hang up calls that are queued or ringing; however, it will not affect calls already in progress. Specifying `completed` will attempt to hang up a call even if it's already in progress. * * @param string $status The new status to update the call with. * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored. * * @param string $fallbackUrl Fallback URL in case of error * @return $this Fluent Builder */ public function setFallbackUrl(string $fallbackUrl): self { $this->options['fallbackUrl'] = $fallbackUrl; return $this; } /** * The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. * * @param string $fallbackMethod HTTP Method to use with fallback_url * @return $this Fluent Builder */ public function setFallbackMethod(string $fallbackMethod): self { $this->options['fallbackMethod'] = $fallbackMethod; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted). * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use when requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. * * @param string $statusCallbackMethod HTTP Method to use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * TwiML instructions for the call Twilio will use without fetching Twiml from url. Twiml and url parameters are mutually exclusive * * @param string $twiml TwiML instructions for the call * @return $this Fluent Builder */ public function setTwiml(string $twiml): self { $this->options['twiml'] = $twiml; return $this; } /** * The maximum duration of the call in seconds. Constraints depend on account and configuration. * * @param int $timeLimit The maximum duration of the call in seconds. * @return $this Fluent Builder */ public function setTimeLimit(int $timeLimit): self { $this->options['timeLimit'] = $timeLimit; 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.Api.V2010.UpdateCallOptions ' . $options . ']'; } } V2010/Account/MessageList.php 0000644 00000016704 15111164043 0011605 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class MessageList extends ListResource { /** * Construct the MessageList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Messages.json'; } /** * Create the MessageInstance * * @param string $to The destination phone number * @param array|Options $options Optional Arguments * @return MessageInstance Created MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $to, array $options = []): MessageInstance { $options = new Values($options); $data = Values::of([ 'To' => $to, 'From' => $options['from'], 'MessagingServiceSid' => $options['messagingServiceSid'], 'Body' => $options['body'], 'MediaUrl' => Serialize::map($options['mediaUrl'], function($e) { return $e; }), 'StatusCallback' => $options['statusCallback'], 'ApplicationSid' => $options['applicationSid'], 'MaxPrice' => $options['maxPrice'], 'ProvideFeedback' => Serialize::booleanToString($options['provideFeedback']), 'Attempt' => $options['attempt'], 'ValidityPeriod' => $options['validityPeriod'], 'ForceDelivery' => Serialize::booleanToString($options['forceDelivery']), 'ContentRetention' => $options['contentRetention'], 'AddressRetention' => $options['addressRetention'], 'SmartEncoded' => Serialize::booleanToString($options['smartEncoded']), 'PersistentAction' => Serialize::map($options['persistentAction'], function($e) { return $e; }), 'ShortenUrls' => Serialize::booleanToString($options['shortenUrls']), 'ScheduleType' => $options['scheduleType'], 'SendAt' => Serialize::iso8601DateTime($options['sendAt']), 'SendAsMms' => Serialize::booleanToString($options['sendAsMms']), 'ContentSid' => $options['contentSid'], 'ContentVariables' => $options['contentVariables'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new MessageInstance($this->version, $payload, $this->solution['accountSid']); } /** * Streams MessageInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MessageInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 MessageInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MessageInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 MessagePage Page of MessageInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MessagePage { $options = new Values($options); $params = Values::of([ 'To' => $options['to'], 'From' => $options['from'], 'DateSent<' => Serialize::iso8601DateTime($options['dateSentBefore']), 'DateSent' => Serialize::iso8601DateTime($options['dateSent']), 'DateSent>' => Serialize::iso8601DateTime($options['dateSentAfter']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MessagePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MessageInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MessagePage Page of MessageInstance */ public function getPage(string $targetUrl): MessagePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MessagePage($this->version, $response, $this->solution); } /** * Constructs a MessageContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): MessageContext { return new MessageContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MessageList]'; } } V2010/Account/CallPage.php 0000644 00000002226 15111164043 0011027 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class CallPage 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 CallInstance \Twilio\Rest\Api\V2010\Account\CallInstance */ public function buildInstance(array $payload): CallInstance { return new CallInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.CallPage]'; } } V2010/Account/OutgoingCallerIdPage.php 0000644 00000002336 15111164043 0013351 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class OutgoingCallerIdPage 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 OutgoingCallerIdInstance \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdInstance */ public function buildInstance(array $payload): OutgoingCallerIdInstance { return new OutgoingCallerIdInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.OutgoingCallerIdPage]'; } } V2010/Account/RecordingInstance.php 0000644 00000013053 15111164044 0012761 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\Recording\AddOnResultList; use Twilio\Rest\Api\V2010\Account\Recording\TranscriptionList; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property string $callSid * @property string $conferenceSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property \DateTime $startTime * @property string $duration * @property string $sid * @property string $price * @property string $priceUnit * @property string $status * @property int $channels * @property string $source * @property int $errorCode * @property string $uri * @property array $encryptionDetails * @property array $subresourceUris * @property string $mediaUrl */ class RecordingInstance extends InstanceResource { protected $_transcriptions; protected $_addOnResults; /** * Initialize the RecordingInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'callSid' => Values::array_get($payload, 'call_sid'), 'conferenceSid' => Values::array_get($payload, 'conference_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'duration' => Values::array_get($payload, 'duration'), 'sid' => Values::array_get($payload, 'sid'), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'status' => Values::array_get($payload, 'status'), 'channels' => Values::array_get($payload, 'channels'), 'source' => Values::array_get($payload, 'source'), 'errorCode' => Values::array_get($payload, 'error_code'), 'uri' => Values::array_get($payload, 'uri'), 'encryptionDetails' => Values::array_get($payload, 'encryption_details'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'mediaUrl' => Values::array_get($payload, 'media_url'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RecordingContext Context for this RecordingInstance */ protected function proxy(): RecordingContext { if (!$this->context) { $this->context = new RecordingContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the RecordingInstance * * @param array|Options $options Optional Arguments * @return RecordingInstance Fetched RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): RecordingInstance { return $this->proxy()->fetch($options); } /** * Delete the RecordingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the transcriptions */ protected function getTranscriptions(): TranscriptionList { return $this->proxy()->transcriptions; } /** * Access the addOnResults */ protected function getAddOnResults(): AddOnResultList { return $this->proxy()->addOnResults; } /** * 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.Api.V2010.RecordingInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/ConferenceContext.php 0000644 00000011661 15111164044 0012777 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\Conference\ParticipantList; use Twilio\Rest\Api\V2010\Account\Conference\RecordingList; use Twilio\Values; use Twilio\Version; /** * @property ParticipantList $participants * @property RecordingList $recordings * @method \Twilio\Rest\Api\V2010\Account\Conference\ParticipantContext participants(string $callSid) * @method \Twilio\Rest\Api\V2010\Account\Conference\RecordingContext recordings(string $sid) */ class ConferenceContext extends InstanceContext { protected $_participants; protected $_recordings; /** * Initialize the ConferenceContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the * resource(s) to fetch * @param string $sid The unique string that identifies this resource */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences/' . \rawurlencode($sid) . '.json'; } /** * Fetch the ConferenceInstance * * @return ConferenceInstance Fetched ConferenceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConferenceInstance { $payload = $this->version->fetch('GET', $this->uri); return new ConferenceInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the ConferenceInstance * * @param array|Options $options Optional Arguments * @return ConferenceInstance Updated ConferenceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConferenceInstance { $options = new Values($options); $data = Values::of([ 'Status' => $options['status'], 'AnnounceUrl' => $options['announceUrl'], 'AnnounceMethod' => $options['announceMethod'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ConferenceInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Access the participants */ protected function getParticipants(): ParticipantList { if (!$this->_participants) { $this->_participants = new ParticipantList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_participants; } /** * Access the recordings */ protected function getRecordings(): RecordingList { if (!$this->_recordings) { $this->_recordings = new RecordingList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_recordings; } /** * 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.Api.V2010.ConferenceContext ' . \implode(' ', $context) . ']'; } } V2010/Account/IncomingPhoneNumberInstance.php 0000644 00000017117 15111164044 0014760 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnList; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $addressSid * @property string $addressRequirements * @property string $apiVersion * @property bool $beta * @property string $capabilities * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $friendlyName * @property string $identitySid * @property string $phoneNumber * @property string $origin * @property string $sid * @property string $smsApplicationSid * @property string $smsFallbackMethod * @property string $smsFallbackUrl * @property string $smsMethod * @property string $smsUrl * @property string $statusCallback * @property string $statusCallbackMethod * @property string $trunkSid * @property string $uri * @property string $voiceReceiveMode * @property string $voiceApplicationSid * @property bool $voiceCallerIdLookup * @property string $voiceFallbackMethod * @property string $voiceFallbackUrl * @property string $voiceMethod * @property string $voiceUrl * @property string $emergencyStatus * @property string $emergencyAddressSid * @property string $emergencyAddressStatus * @property string $bundleSid * @property string $status */ class IncomingPhoneNumberInstance extends InstanceResource { protected $_assignedAddOns; /** * Initialize the IncomingPhoneNumberInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'addressSid' => Values::array_get($payload, 'address_sid'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'identitySid' => Values::array_get($payload, 'identity_sid'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'origin' => Values::array_get($payload, 'origin'), 'sid' => Values::array_get($payload, 'sid'), 'smsApplicationSid' => Values::array_get($payload, 'sms_application_sid'), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'trunkSid' => Values::array_get($payload, 'trunk_sid'), 'uri' => Values::array_get($payload, 'uri'), 'voiceReceiveMode' => Values::array_get($payload, 'voice_receive_mode'), 'voiceApplicationSid' => Values::array_get($payload, 'voice_application_sid'), 'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'emergencyStatus' => Values::array_get($payload, 'emergency_status'), 'emergencyAddressSid' => Values::array_get($payload, 'emergency_address_sid'), 'emergencyAddressStatus' => Values::array_get($payload, 'emergency_address_status'), 'bundleSid' => Values::array_get($payload, 'bundle_sid'), 'status' => Values::array_get($payload, 'status'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return IncomingPhoneNumberContext Context for this * IncomingPhoneNumberInstance */ protected function proxy(): IncomingPhoneNumberContext { if (!$this->context) { $this->context = new IncomingPhoneNumberContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the IncomingPhoneNumberInstance * * @param array|Options $options Optional Arguments * @return IncomingPhoneNumberInstance Updated IncomingPhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): IncomingPhoneNumberInstance { return $this->proxy()->update($options); } /** * Fetch the IncomingPhoneNumberInstance * * @return IncomingPhoneNumberInstance Fetched IncomingPhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IncomingPhoneNumberInstance { return $this->proxy()->fetch(); } /** * Delete the IncomingPhoneNumberInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the assignedAddOns */ protected function getAssignedAddOns(): AssignedAddOnList { return $this->proxy()->assignedAddOns; } /** * 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.Api.V2010.IncomingPhoneNumberInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/ValidationRequestOptions.php 0000644 00000012047 15111164044 0014401 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class ValidationRequestOptions { /** * @param string $friendlyName A string to describe the resource * @param int $callDelay The number of seconds to delay before initiating the * verification call * @param string $extension The digits to dial after connecting the * verification call * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @return CreateValidationRequestOptions Options builder */ public static function create(string $friendlyName = Values::NONE, int $callDelay = Values::NONE, string $extension = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE): CreateValidationRequestOptions { return new CreateValidationRequestOptions($friendlyName, $callDelay, $extension, $statusCallback, $statusCallbackMethod); } } class CreateValidationRequestOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param int $callDelay The number of seconds to delay before initiating the * verification call * @param string $extension The digits to dial after connecting the * verification call * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback */ public function __construct(string $friendlyName = Values::NONE, int $callDelay = Values::NONE, string $extension = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['callDelay'] = $callDelay; $this->options['extension'] = $extension; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; } /** * A descriptive string that you create to describe the new caller ID resource. It can be up to 64 characters long. The default value is a formatted version of the phone number. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The number of seconds to delay before initiating the verification call. Can be an integer between `0` and `60`, inclusive. The default is `0`. * * @param int $callDelay The number of seconds to delay before initiating the * verification call * @return $this Fluent Builder */ public function setCallDelay(int $callDelay): self { $this->options['callDelay'] = $callDelay; return $this; } /** * The digits to dial after connecting the verification call. * * @param string $extension The digits to dial after connecting the * verification call * @return $this Fluent Builder */ public function setExtension(string $extension): self { $this->options['extension'] = $extension; return $this; } /** * The URL we should call using the `status_callback_method` to send status information about the verification process to your application. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`, and the default is `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; 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.Api.V2010.CreateValidationRequestOptions ' . $options . ']'; } } V2010/Account/KeyList.php 0000644 00000011265 15111164045 0010750 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class KeyList extends ListResource { /** * Construct the KeyList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Keys.json'; } /** * Streams KeyInstance 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 KeyInstance 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 KeyInstance[] 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 KeyInstance 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 KeyPage Page of KeyInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): KeyPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new KeyPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of KeyInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return KeyPage Page of KeyInstance */ public function getPage(string $targetUrl): KeyPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new KeyPage($this->version, $response, $this->solution); } /** * Constructs a KeyContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): KeyContext { return new KeyContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.KeyList]'; } } V2010/Account/NotificationInstance.php 0000644 00000011106 15111164045 0013471 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property string $callSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $errorCode * @property string $log * @property \DateTime $messageDate * @property string $messageText * @property string $moreInfo * @property string $requestMethod * @property string $requestUrl * @property string $requestVariables * @property string $responseBody * @property string $responseHeaders * @property string $sid * @property string $uri */ class NotificationInstance extends InstanceResource { /** * Initialize the NotificationInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'callSid' => Values::array_get($payload, 'call_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'errorCode' => Values::array_get($payload, 'error_code'), 'log' => Values::array_get($payload, 'log'), 'messageDate' => Deserialize::dateTime(Values::array_get($payload, 'message_date')), 'messageText' => Values::array_get($payload, 'message_text'), 'moreInfo' => Values::array_get($payload, 'more_info'), 'requestMethod' => Values::array_get($payload, 'request_method'), 'requestUrl' => Values::array_get($payload, 'request_url'), 'requestVariables' => Values::array_get($payload, 'request_variables'), 'responseBody' => Values::array_get($payload, 'response_body'), 'responseHeaders' => Values::array_get($payload, 'response_headers'), 'sid' => Values::array_get($payload, 'sid'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return NotificationContext Context for this NotificationInstance */ protected function proxy(): NotificationContext { if (!$this->context) { $this->context = new NotificationContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the NotificationInstance * * @return NotificationInstance Fetched NotificationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NotificationInstance { 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.Api.V2010.NotificationInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/AuthorizedConnectAppPage.php 0000644 00000002366 15111164045 0014254 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class AuthorizedConnectAppPage 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 AuthorizedConnectAppInstance \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppInstance */ public function buildInstance(array $payload): AuthorizedConnectAppInstance { return new AuthorizedConnectAppInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthorizedConnectAppPage]'; } } V2010/Account/NotificationOptions.php 0000644 00000007366 15111164045 0013375 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class NotificationOptions { /** * @param int $log Filter by log level * @param string $messageDateBefore Filter by date * @param string $messageDate Filter by date * @param string $messageDateAfter Filter by date * @return ReadNotificationOptions Options builder */ public static function read(int $log = Values::NONE, string $messageDateBefore = Values::NONE, string $messageDate = Values::NONE, string $messageDateAfter = Values::NONE): ReadNotificationOptions { return new ReadNotificationOptions($log, $messageDateBefore, $messageDate, $messageDateAfter); } } class ReadNotificationOptions extends Options { /** * @param int $log Filter by log level * @param string $messageDateBefore Filter by date * @param string $messageDate Filter by date * @param string $messageDateAfter Filter by date */ public function __construct(int $log = Values::NONE, string $messageDateBefore = Values::NONE, string $messageDate = Values::NONE, string $messageDateAfter = Values::NONE) { $this->options['log'] = $log; $this->options['messageDateBefore'] = $messageDateBefore; $this->options['messageDate'] = $messageDate; $this->options['messageDateAfter'] = $messageDateAfter; } /** * Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read. * * @param int $log Filter by log level * @return $this Fluent Builder */ public function setLog(int $log): self { $this->options['log'] = $log; return $this; } /** * Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. * * @param string $messageDateBefore Filter by date * @return $this Fluent Builder */ public function setMessageDateBefore(string $messageDateBefore): self { $this->options['messageDateBefore'] = $messageDateBefore; return $this; } /** * Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. * * @param string $messageDate Filter by date * @return $this Fluent Builder */ public function setMessageDate(string $messageDate): self { $this->options['messageDate'] = $messageDate; return $this; } /** * Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. * * @param string $messageDateAfter Filter by date * @return $this Fluent Builder */ public function setMessageDateAfter(string $messageDateAfter): self { $this->options['messageDateAfter'] = $messageDateAfter; 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.Api.V2010.ReadNotificationOptions ' . $options . ']'; } } V2010/Account/AddressPage.php 0000644 00000002250 15111164045 0011540 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class AddressPage 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 AddressInstance \Twilio\Rest\Api\V2010\Account\AddressInstance */ public function buildInstance(array $payload): AddressInstance { return new AddressInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AddressPage]'; } } V2010/Account/NewSigningKeyInstance.php 0000644 00000004367 15111164046 0013600 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $sid * @property string $friendlyName * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $secret */ class NewSigningKeyInstance extends InstanceResource { /** * Initialize the NewSigningKeyInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'secret' => Values::array_get($payload, 'secret'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.NewSigningKeyInstance]'; } } V2010/Account/AddressInstance.php 0000644 00000012477 15111164046 0012445 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\Address\DependentPhoneNumberList; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $city * @property string $customerName * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $friendlyName * @property string $isoCountry * @property string $postalCode * @property string $region * @property string $sid * @property string $street * @property string $uri * @property bool $emergencyEnabled * @property bool $validated * @property bool $verified * @property string $streetSecondary */ class AddressInstance extends InstanceResource { protected $_dependentPhoneNumbers; /** * Initialize the AddressInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that is responsible for the * resource * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'city' => Values::array_get($payload, 'city'), 'customerName' => Values::array_get($payload, 'customer_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'postalCode' => Values::array_get($payload, 'postal_code'), 'region' => Values::array_get($payload, 'region'), 'sid' => Values::array_get($payload, 'sid'), 'street' => Values::array_get($payload, 'street'), 'uri' => Values::array_get($payload, 'uri'), 'emergencyEnabled' => Values::array_get($payload, 'emergency_enabled'), 'validated' => Values::array_get($payload, 'validated'), 'verified' => Values::array_get($payload, 'verified'), 'streetSecondary' => Values::array_get($payload, 'street_secondary'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AddressContext Context for this AddressInstance */ protected function proxy(): AddressContext { if (!$this->context) { $this->context = new AddressContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the AddressInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the AddressInstance * * @return AddressInstance Fetched AddressInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AddressInstance { return $this->proxy()->fetch(); } /** * Update the AddressInstance * * @param array|Options $options Optional Arguments * @return AddressInstance Updated AddressInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AddressInstance { return $this->proxy()->update($options); } /** * Access the dependentPhoneNumbers */ protected function getDependentPhoneNumbers(): DependentPhoneNumberList { return $this->proxy()->dependentPhoneNumbers; } /** * 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.Api.V2010.AddressInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/SigningKeyInstance.php 0000644 00000007550 15111164046 0013123 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; /** * @property string $sid * @property string $friendlyName * @property \DateTime $dateCreated * @property \DateTime $dateUpdated */ class SigningKeyInstance extends InstanceResource { /** * Initialize the SigningKeyInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. * @param string $sid The sid */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SigningKeyContext Context for this SigningKeyInstance */ protected function proxy(): SigningKeyContext { if (!$this->context) { $this->context = new SigningKeyContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the SigningKeyInstance * * @return SigningKeyInstance Fetched SigningKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SigningKeyInstance { return $this->proxy()->fetch(); } /** * Update the SigningKeyInstance * * @param array|Options $options Optional Arguments * @return SigningKeyInstance Updated SigningKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SigningKeyInstance { return $this->proxy()->update($options); } /** * Delete the SigningKeyInstance * * @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.Api.V2010.SigningKeyInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/MessageContext.php 0000644 00000011536 15111164046 0012317 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\Message\FeedbackList; use Twilio\Rest\Api\V2010\Account\Message\MediaList; use Twilio\Values; use Twilio\Version; /** * @property MediaList $media * @property FeedbackList $feedback * @method \Twilio\Rest\Api\V2010\Account\Message\MediaContext media(string $sid) */ class MessageContext extends InstanceContext { protected $_media; protected $_feedback; /** * Initialize the MessageContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Messages/' . \rawurlencode($sid) . '.json'; } /** * Delete the MessageInstance * * @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); } /** * Fetch the MessageInstance * * @return MessageInstance Fetched MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInstance { $payload = $this->version->fetch('GET', $this->uri); return new MessageInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Updated MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MessageInstance { $options = new Values($options); $data = Values::of(['Body' => $options['body'], 'Status' => $options['status'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new MessageInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Access the media */ protected function getMedia(): MediaList { if (!$this->_media) { $this->_media = new MediaList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_media; } /** * Access the feedback */ protected function getFeedback(): FeedbackList { if (!$this->_feedback) { $this->_feedback = new FeedbackList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_feedback; } /** * 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.Api.V2010.MessageContext ' . \implode(' ', $context) . ']'; } } V2010/Account/ConferencePage.php 0000644 00000002272 15111164046 0012227 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class ConferencePage 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 ConferenceInstance \Twilio\Rest\Api\V2010\Account\ConferenceInstance */ public function buildInstance(array $payload): ConferenceInstance { return new ConferenceInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ConferencePage]'; } } V2010/Account/RecordingPage.php 0000644 00000002264 15111164047 0012076 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class RecordingPage 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 RecordingInstance \Twilio\Rest\Api\V2010\Account\RecordingInstance */ public function buildInstance(array $payload): RecordingInstance { return new RecordingInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.RecordingPage]'; } } V2010/Account/ConferenceOptions.php 0000644 00000025550 15111164047 0013013 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class ConferenceOptions { /** * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to * read * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to * read * @param string $dateUpdatedBefore The `YYYY-MM-DD` value of the resources to * read * @param string $dateUpdated The `YYYY-MM-DD` value of the resources to read * @param string $dateUpdatedAfter The `YYYY-MM-DD` value of the resources to * read * @param string $friendlyName The string that identifies the Conference * resources to read * @param string $status The status of the resources to read * @return ReadConferenceOptions Options builder */ public static function read(string $dateCreatedBefore = Values::NONE, string $dateCreated = Values::NONE, string $dateCreatedAfter = Values::NONE, string $dateUpdatedBefore = Values::NONE, string $dateUpdated = Values::NONE, string $dateUpdatedAfter = Values::NONE, string $friendlyName = Values::NONE, string $status = Values::NONE): ReadConferenceOptions { return new ReadConferenceOptions($dateCreatedBefore, $dateCreated, $dateCreatedAfter, $dateUpdatedBefore, $dateUpdated, $dateUpdatedAfter, $friendlyName, $status); } /** * @param string $status The new status of the resource * @param string $announceUrl The URL we should call to announce something into * the conference * @param string $announceMethod he HTTP method used to call announce_url * @return UpdateConferenceOptions Options builder */ public static function update(string $status = Values::NONE, string $announceUrl = Values::NONE, string $announceMethod = Values::NONE): UpdateConferenceOptions { return new UpdateConferenceOptions($status, $announceUrl, $announceMethod); } } class ReadConferenceOptions extends Options { /** * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to * read * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to * read * @param string $dateUpdatedBefore The `YYYY-MM-DD` value of the resources to * read * @param string $dateUpdated The `YYYY-MM-DD` value of the resources to read * @param string $dateUpdatedAfter The `YYYY-MM-DD` value of the resources to * read * @param string $friendlyName The string that identifies the Conference * resources to read * @param string $status The status of the resources to read */ public function __construct(string $dateCreatedBefore = Values::NONE, string $dateCreated = Values::NONE, string $dateCreatedAfter = Values::NONE, string $dateUpdatedBefore = Values::NONE, string $dateUpdated = Values::NONE, string $dateUpdatedAfter = Values::NONE, string $friendlyName = Values::NONE, string $status = Values::NONE) { $this->options['dateCreatedBefore'] = $dateCreatedBefore; $this->options['dateCreated'] = $dateCreated; $this->options['dateCreatedAfter'] = $dateCreatedAfter; $this->options['dateUpdatedBefore'] = $dateUpdatedBefore; $this->options['dateUpdated'] = $dateUpdated; $this->options['dateUpdatedAfter'] = $dateUpdatedAfter; $this->options['friendlyName'] = $friendlyName; $this->options['status'] = $status; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. * * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to * read * @return $this Fluent Builder */ public function setDateCreatedBefore(string $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. * * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read * @return $this Fluent Builder */ public function setDateCreated(string $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. * * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to * read * @return $this Fluent Builder */ public function setDateCreatedAfter(string $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; return $this; } /** * The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. * * @param string $dateUpdatedBefore The `YYYY-MM-DD` value of the resources to * read * @return $this Fluent Builder */ public function setDateUpdatedBefore(string $dateUpdatedBefore): self { $this->options['dateUpdatedBefore'] = $dateUpdatedBefore; return $this; } /** * The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. * * @param string $dateUpdated The `YYYY-MM-DD` value of the resources to read * @return $this Fluent Builder */ public function setDateUpdated(string $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. * * @param string $dateUpdatedAfter The `YYYY-MM-DD` value of the resources to * read * @return $this Fluent Builder */ public function setDateUpdatedAfter(string $dateUpdatedAfter): self { $this->options['dateUpdatedAfter'] = $dateUpdatedAfter; return $this; } /** * The string that identifies the Conference resources to read. * * @param string $friendlyName The string that identifies the Conference * resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. * * @param string $status The status of the resources to read * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; 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.Api.V2010.ReadConferenceOptions ' . $options . ']'; } } class UpdateConferenceOptions extends Options { /** * @param string $status The new status of the resource * @param string $announceUrl The URL we should call to announce something into * the conference * @param string $announceMethod he HTTP method used to call announce_url */ public function __construct(string $status = Values::NONE, string $announceUrl = Values::NONE, string $announceMethod = Values::NONE) { $this->options['status'] = $status; $this->options['announceUrl'] = $announceUrl; $this->options['announceMethod'] = $announceMethod; } /** * The new status of the resource. Can be: Can be: `init`, `in-progress`, or `completed`. Specifying `completed` will end the conference and hang up all participants * * @param string $status The new status of the resource * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The URL we should call to announce something into the conference. The URL may return an MP3 file, a WAV file, or a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>` verbs. * * @param string $announceUrl The URL we should call to announce something into * the conference * @return $this Fluent Builder */ public function setAnnounceUrl(string $announceUrl): self { $this->options['announceUrl'] = $announceUrl; return $this; } /** * The HTTP method used to call `announce_url`. Can be: `GET` or `POST` and the default is `POST` * * @param string $announceMethod he HTTP method used to call announce_url * @return $this Fluent Builder */ public function setAnnounceMethod(string $announceMethod): self { $this->options['announceMethod'] = $announceMethod; 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.Api.V2010.UpdateConferenceOptions ' . $options . ']'; } } V2010/Account/OutgoingCallerIdList.php 0000644 00000012537 15111164047 0013420 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\ListResource; use Twilio\Options; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class OutgoingCallerIdList extends ListResource { /** * Construct the OutgoingCallerIdList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/OutgoingCallerIds.json'; } /** * Streams OutgoingCallerIdInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads OutgoingCallerIdInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 OutgoingCallerIdInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of OutgoingCallerIdInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 OutgoingCallerIdPage Page of OutgoingCallerIdInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): OutgoingCallerIdPage { $options = new Values($options); $params = Values::of([ 'PhoneNumber' => $options['phoneNumber'], 'FriendlyName' => $options['friendlyName'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new OutgoingCallerIdPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of OutgoingCallerIdInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return OutgoingCallerIdPage Page of OutgoingCallerIdInstance */ public function getPage(string $targetUrl): OutgoingCallerIdPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new OutgoingCallerIdPage($this->version, $response, $this->solution); } /** * Constructs a OutgoingCallerIdContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): OutgoingCallerIdContext { return new OutgoingCallerIdContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.OutgoingCallerIdList]'; } } V2010/Account/ApplicationInstance.php 0000644 00000013500 15111164047 0013310 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $friendlyName * @property string $messageStatusCallback * @property string $sid * @property string $smsFallbackMethod * @property string $smsFallbackUrl * @property string $smsMethod * @property string $smsStatusCallback * @property string $smsUrl * @property string $statusCallback * @property string $statusCallbackMethod * @property string $uri * @property bool $voiceCallerIdLookup * @property string $voiceFallbackMethod * @property string $voiceFallbackUrl * @property string $voiceMethod * @property string $voiceUrl * @property bool $publicApplicationConnectEnabled */ class ApplicationInstance extends InstanceResource { /** * Initialize the ApplicationInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'messageStatusCallback' => Values::array_get($payload, 'message_status_callback'), 'sid' => Values::array_get($payload, 'sid'), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsStatusCallback' => Values::array_get($payload, 'sms_status_callback'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'uri' => Values::array_get($payload, 'uri'), 'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'publicApplicationConnectEnabled' => Values::array_get($payload, 'public_application_connect_enabled'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ApplicationContext Context for this ApplicationInstance */ protected function proxy(): ApplicationContext { if (!$this->context) { $this->context = new ApplicationContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the ApplicationInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the ApplicationInstance * * @return ApplicationInstance Fetched ApplicationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ApplicationInstance { return $this->proxy()->fetch(); } /** * Update the ApplicationInstance * * @param array|Options $options Optional Arguments * @return ApplicationInstance Updated ApplicationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ApplicationInstance { 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.Api.V2010.ApplicationInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/NewSigningKeyPage.php 0000644 00000002314 15111164050 0012671 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class NewSigningKeyPage 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 NewSigningKeyInstance \Twilio\Rest\Api\V2010\Account\NewSigningKeyInstance */ public function buildInstance(array $payload): NewSigningKeyInstance { return new NewSigningKeyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NewSigningKeyPage]'; } } V2010/Account/MessageInstance.php 0000644 00000013440 15111164050 0012426 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\Message\FeedbackList; use Twilio\Rest\Api\V2010\Account\Message\MediaList; use Twilio\Values; use Twilio\Version; /** * @property string $body * @property string $numSegments * @property string $direction * @property string $from * @property string $to * @property \DateTime $dateUpdated * @property string $price * @property string $errorMessage * @property string $uri * @property string $accountSid * @property string $numMedia * @property string $status * @property string $messagingServiceSid * @property string $sid * @property \DateTime $dateSent * @property \DateTime $dateCreated * @property int $errorCode * @property string $priceUnit * @property string $apiVersion * @property array $subresourceUris */ class MessageInstance extends InstanceResource { protected $_media; protected $_feedback; /** * Initialize the MessageInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'body' => Values::array_get($payload, 'body'), 'numSegments' => Values::array_get($payload, 'num_segments'), 'direction' => Values::array_get($payload, 'direction'), 'from' => Values::array_get($payload, 'from'), 'to' => Values::array_get($payload, 'to'), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'price' => Values::array_get($payload, 'price'), 'errorMessage' => Values::array_get($payload, 'error_message'), 'uri' => Values::array_get($payload, 'uri'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'numMedia' => Values::array_get($payload, 'num_media'), 'status' => Values::array_get($payload, 'status'), 'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'), 'sid' => Values::array_get($payload, 'sid'), 'dateSent' => Deserialize::dateTime(Values::array_get($payload, 'date_sent')), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'errorCode' => Values::array_get($payload, 'error_code'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MessageContext Context for this MessageInstance */ protected function proxy(): MessageContext { if (!$this->context) { $this->context = new MessageContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the MessageInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the MessageInstance * * @return MessageInstance Fetched MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInstance { return $this->proxy()->fetch(); } /** * Update the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Updated MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MessageInstance { return $this->proxy()->update($options); } /** * Access the media */ protected function getMedia(): MediaList { return $this->proxy()->media; } /** * Access the feedback */ protected function getFeedback(): FeedbackList { return $this->proxy()->feedback; } /** * 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.Api.V2010.MessageInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/ShortCodeContext.php 0000644 00000005406 15111164050 0012617 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Values; use Twilio\Version; class ShortCodeContext extends InstanceContext { /** * Initialize the ShortCodeContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the * resource(s) to fetch * @param string $sid The unique string that identifies this resource */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SMS/ShortCodes/' . \rawurlencode($sid) . '.json'; } /** * Fetch the ShortCodeInstance * * @return ShortCodeInstance Fetched ShortCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ShortCodeInstance { $payload = $this->version->fetch('GET', $this->uri); return new ShortCodeInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the ShortCodeInstance * * @param array|Options $options Optional Arguments * @return ShortCodeInstance Updated ShortCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ShortCodeInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'ApiVersion' => $options['apiVersion'], 'SmsUrl' => $options['smsUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ShortCodeInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * 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.Api.V2010.ShortCodeContext ' . \implode(' ', $context) . ']'; } } V2010/Account/NewSigningKeyOptions.php 0000644 00000002773 15111164050 0013461 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class NewSigningKeyOptions { /** * @param string $friendlyName A string to describe the resource * @return CreateNewSigningKeyOptions Options builder */ public static function create(string $friendlyName = Values::NONE): CreateNewSigningKeyOptions { return new CreateNewSigningKeyOptions($friendlyName); } } class CreateNewSigningKeyOptions extends Options { /** * @param string $friendlyName A string to describe the resource */ public function __construct(string $friendlyName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; 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.Api.V2010.CreateNewSigningKeyOptions ' . $options . ']'; } } V2010/Account/OutgoingCallerIdInstance.php 0000644 00000010346 15111164051 0014240 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; /** * @property string $sid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $friendlyName * @property string $accountSid * @property string $phoneNumber * @property string $uri */ class OutgoingCallerIdInstance extends InstanceResource { /** * Initialize the OutgoingCallerIdInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'sid' => Values::array_get($payload, 'sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return OutgoingCallerIdContext Context for this OutgoingCallerIdInstance */ protected function proxy(): OutgoingCallerIdContext { if (!$this->context) { $this->context = new OutgoingCallerIdContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the OutgoingCallerIdInstance * * @return OutgoingCallerIdInstance Fetched OutgoingCallerIdInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): OutgoingCallerIdInstance { return $this->proxy()->fetch(); } /** * Update the OutgoingCallerIdInstance * * @param array|Options $options Optional Arguments * @return OutgoingCallerIdInstance Updated OutgoingCallerIdInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): OutgoingCallerIdInstance { return $this->proxy()->update($options); } /** * Delete the OutgoingCallerIdInstance * * @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.Api.V2010.OutgoingCallerIdInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/QueueOptions.php 0000644 00000006364 15111164051 0012025 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class QueueOptions { /** * @param string $friendlyName A string to describe this resource * @param int $maxSize The max number of calls allowed in the queue * @return UpdateQueueOptions Options builder */ public static function update(string $friendlyName = Values::NONE, int $maxSize = Values::NONE): UpdateQueueOptions { return new UpdateQueueOptions($friendlyName, $maxSize); } /** * @param int $maxSize The max number of calls allowed in the queue * @return CreateQueueOptions Options builder */ public static function create(int $maxSize = Values::NONE): CreateQueueOptions { return new CreateQueueOptions($maxSize); } } class UpdateQueueOptions extends Options { /** * @param string $friendlyName A string to describe this resource * @param int $maxSize The max number of calls allowed in the queue */ public function __construct(string $friendlyName = Values::NONE, int $maxSize = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['maxSize'] = $maxSize; } /** * A descriptive string that you created to describe this resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe this resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000. * * @param int $maxSize The max number of calls allowed in the queue * @return $this Fluent Builder */ public function setMaxSize(int $maxSize): self { $this->options['maxSize'] = $maxSize; 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.Api.V2010.UpdateQueueOptions ' . $options . ']'; } } class CreateQueueOptions extends Options { /** * @param int $maxSize The max number of calls allowed in the queue */ public function __construct(int $maxSize = Values::NONE) { $this->options['maxSize'] = $maxSize; } /** * The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000. * * @param int $maxSize The max number of calls allowed in the queue * @return $this Fluent Builder */ public function setMaxSize(int $maxSize): self { $this->options['maxSize'] = $maxSize; 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.Api.V2010.CreateQueueOptions ' . $options . ']'; } } V2010/Account/NewSigningKeyList.php 0000644 00000003264 15111164051 0012736 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; class NewSigningKeyList extends ListResource { /** * Construct the NewSigningKeyList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SigningKeys.json'; } /** * Create the NewSigningKeyInstance * * @param array|Options $options Optional Arguments * @return NewSigningKeyInstance Created NewSigningKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): NewSigningKeyInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new NewSigningKeyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NewSigningKeyList]'; } } V2010/Account/OutgoingCallerIdOptions.php 0000644 00000007341 15111164051 0014130 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class OutgoingCallerIdOptions { /** * @param string $friendlyName A string to describe the resource * @return UpdateOutgoingCallerIdOptions Options builder */ public static function update(string $friendlyName = Values::NONE): UpdateOutgoingCallerIdOptions { return new UpdateOutgoingCallerIdOptions($friendlyName); } /** * @param string $phoneNumber The phone number of the OutgoingCallerId * resources to read * @param string $friendlyName The string that identifies the OutgoingCallerId * resources to read * @return ReadOutgoingCallerIdOptions Options builder */ public static function read(string $phoneNumber = Values::NONE, string $friendlyName = Values::NONE): ReadOutgoingCallerIdOptions { return new ReadOutgoingCallerIdOptions($phoneNumber, $friendlyName); } } class UpdateOutgoingCallerIdOptions extends Options { /** * @param string $friendlyName A string to describe the resource */ public function __construct(string $friendlyName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; 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.Api.V2010.UpdateOutgoingCallerIdOptions ' . $options . ']'; } } class ReadOutgoingCallerIdOptions extends Options { /** * @param string $phoneNumber The phone number of the OutgoingCallerId * resources to read * @param string $friendlyName The string that identifies the OutgoingCallerId * resources to read */ public function __construct(string $phoneNumber = Values::NONE, string $friendlyName = Values::NONE) { $this->options['phoneNumber'] = $phoneNumber; $this->options['friendlyName'] = $friendlyName; } /** * The phone number of the OutgoingCallerId resources to read. * * @param string $phoneNumber The phone number of the OutgoingCallerId * resources to read * @return $this Fluent Builder */ public function setPhoneNumber(string $phoneNumber): self { $this->options['phoneNumber'] = $phoneNumber; return $this; } /** * The string that identifies the OutgoingCallerId resources to read. * * @param string $friendlyName The string that identifies the OutgoingCallerId * resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; 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.Api.V2010.ReadOutgoingCallerIdOptions ' . $options . ']'; } } V2010/Account/ConferenceList.php 0000644 00000013343 15111164051 0012263 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class ConferenceList extends ListResource { /** * Construct the ConferenceList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created this resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences.json'; } /** * Streams ConferenceInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ConferenceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 ConferenceInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ConferenceInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 ConferencePage Page of ConferenceInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ConferencePage { $options = new Values($options); $params = Values::of([ 'DateCreated<' => Serialize::iso8601Date($options['dateCreatedBefore']), 'DateCreated' => Serialize::iso8601Date($options['dateCreated']), 'DateCreated>' => Serialize::iso8601Date($options['dateCreatedAfter']), 'DateUpdated<' => Serialize::iso8601Date($options['dateUpdatedBefore']), 'DateUpdated' => Serialize::iso8601Date($options['dateUpdated']), 'DateUpdated>' => Serialize::iso8601Date($options['dateUpdatedAfter']), 'FriendlyName' => $options['friendlyName'], 'Status' => $options['status'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ConferencePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ConferenceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ConferencePage Page of ConferenceInstance */ public function getPage(string $targetUrl): ConferencePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ConferencePage($this->version, $response, $this->solution); } /** * Constructs a ConferenceContext * * @param string $sid The unique string that identifies this resource */ public function getContext(string $sid): ConferenceContext { return new ConferenceContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ConferenceList]'; } } V2010/Account/Sip/IpAccessControlListPage.php 0000644 00000002370 15111164052 0014576 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class IpAccessControlListPage 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 IpAccessControlListInstance \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlListInstance */ public function buildInstance(array $payload): IpAccessControlListInstance { return new IpAccessControlListInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.IpAccessControlListPage]'; } } V2010/Account/Sip/CredentialList/CredentialPage.php 0000644 00000002500 15111164052 0015662 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\CredentialList; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class CredentialPage 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 CredentialInstance \Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialInstance */ public function buildInstance(array $payload): CredentialInstance { return new CredentialInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['credentialListSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.CredentialPage]'; } } V2010/Account/Sip/CredentialList/CredentialOptions.php 0000644 00000003133 15111164052 0016444 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\CredentialList; use Twilio\Options; use Twilio\Values; abstract class CredentialOptions { /** * @param string $password The password will not be returned in the response * @return UpdateCredentialOptions Options builder */ public static function update(string $password = Values::NONE): UpdateCredentialOptions { return new UpdateCredentialOptions($password); } } class UpdateCredentialOptions extends Options { /** * @param string $password The password will not be returned in the response */ public function __construct(string $password = Values::NONE) { $this->options['password'] = $password; } /** * The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) * * @param string $password The password will not be returned in the response * @return $this Fluent Builder */ public function setPassword(string $password): self { $this->options['password'] = $password; 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.Api.V2010.UpdateCredentialOptions ' . $options . ']'; } } V2010/Account/Sip/CredentialList/CredentialContext.php 0000644 00000006373 15111164052 0016446 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\CredentialList; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Values; use Twilio\Version; class CredentialContext extends InstanceContext { /** * Initialize the CredentialContext * * @param Version $version Version that contains the resource * @param string $accountSid The unique id of the Account that is responsible * for this resource. * @param string $credentialListSid The unique id that identifies the * credential list that contains the desired * credential * @param string $sid The unique id that identifies the resource to fetch. */ public function __construct(Version $version, $accountSid, $credentialListSid, $sid) { parent::__construct($version); // Path Solution $this->solution = [ 'accountSid' => $accountSid, 'credentialListSid' => $credentialListSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/CredentialLists/' . \rawurlencode($credentialListSid) . '/Credentials/' . \rawurlencode($sid) . '.json'; } /** * Fetch the CredentialInstance * * @return CredentialInstance Fetched CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialInstance { $payload = $this->version->fetch('GET', $this->uri); return new CredentialInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['credentialListSid'], $this->solution['sid'] ); } /** * Update the CredentialInstance * * @param array|Options $options Optional Arguments * @return CredentialInstance Updated CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CredentialInstance { $options = new Values($options); $data = Values::of(['Password' => $options['password'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new CredentialInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['credentialListSid'], $this->solution['sid'] ); } /** * Delete the CredentialInstance * * @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.Api.V2010.CredentialContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/CredentialList/CredentialList.php 0000644 00000014063 15111164052 0015730 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\CredentialList; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class CredentialList extends ListResource { /** * Construct the CredentialList * * @param Version $version Version that contains the resource * @param string $accountSid The unique id of the Account that is responsible * for this resource. * @param string $credentialListSid The unique id that identifies the * credential list that includes this * credential */ public function __construct(Version $version, string $accountSid, string $credentialListSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'credentialListSid' => $credentialListSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/CredentialLists/' . \rawurlencode($credentialListSid) . '/Credentials.json'; } /** * Streams CredentialInstance 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 CredentialInstance 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 CredentialInstance[] 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 CredentialInstance 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 CredentialPage Page of CredentialInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CredentialPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CredentialPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CredentialInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CredentialPage Page of CredentialInstance */ public function getPage(string $targetUrl): CredentialPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CredentialPage($this->version, $response, $this->solution); } /** * Create the CredentialInstance * * @param string $username The username for this credential. * @param string $password The password will not be returned in the response. * @return CredentialInstance Created CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $username, string $password): CredentialInstance { $data = Values::of(['Username' => $username, 'Password' => $password, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CredentialInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['credentialListSid'] ); } /** * Constructs a CredentialContext * * @param string $sid The unique id that identifies the resource to fetch. */ public function getContext(string $sid): CredentialContext { return new CredentialContext( $this->version, $this->solution['accountSid'], $this->solution['credentialListSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.CredentialList]'; } } V2010/Account/Sip/CredentialList/CredentialInstance.php 0000644 00000011112 15111164053 0016552 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\CredentialList; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; /** * @property string $sid * @property string $accountSid * @property string $credentialListSid * @property string $username * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $uri */ class CredentialInstance extends InstanceResource { /** * Initialize the CredentialInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The unique id of the Account that is responsible * for this resource. * @param string $credentialListSid The unique id that identifies the * credential list that includes this * credential * @param string $sid The unique id that identifies the resource to fetch. */ public function __construct(Version $version, array $payload, string $accountSid, string $credentialListSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'credentialListSid' => Values::array_get($payload, 'credential_list_sid'), 'username' => Values::array_get($payload, 'username'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'credentialListSid' => $credentialListSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CredentialContext Context for this CredentialInstance */ protected function proxy(): CredentialContext { if (!$this->context) { $this->context = new CredentialContext( $this->version, $this->solution['accountSid'], $this->solution['credentialListSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the CredentialInstance * * @return CredentialInstance Fetched CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialInstance { return $this->proxy()->fetch(); } /** * Update the CredentialInstance * * @param array|Options $options Optional Arguments * @return CredentialInstance Updated CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CredentialInstance { return $this->proxy()->update($options); } /** * Delete the CredentialInstance * * @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.Api.V2010.CredentialInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/CredentialListPage.php 0000644 00000002332 15111164053 0013614 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class CredentialListPage 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 CredentialListInstance \Twilio\Rest\Api\V2010\Account\Sip\CredentialListInstance */ public function buildInstance(array $payload): CredentialListInstance { return new CredentialListInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.CredentialListPage]'; } } V2010/Account/Sip/DomainOptions.php 0000644 00000053031 15111164053 0012676 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip; use Twilio\Options; use Twilio\Values; abstract class DomainOptions { /** * @param string $friendlyName A string to describe the resource * @param string $voiceUrl The URL we should call when receiving a call * @param string $voiceMethod The HTTP method to use with voice_url * @param string $voiceFallbackUrl The URL we should call when an error occurs * in executing TwiML * @param string $voiceFallbackMethod The HTTP method to use with * voice_fallback_url * @param string $voiceStatusCallbackUrl The URL that we should call to pass * status updates * @param string $voiceStatusCallbackMethod The HTTP method we should use to * call `voice_status_callback_url` * @param bool $sipRegistration Whether SIP registration is allowed * @param bool $emergencyCallingEnabled Whether emergency calling is enabled * for the domain. * @param bool $secure Whether secure SIP is enabled for the domain * @param string $byocTrunkSid The SID of the BYOC Trunk resource. * @param string $emergencyCallerSid Whether an emergency caller sid is * configured for the domain. * @return CreateDomainOptions Options builder */ public static function create(string $friendlyName = Values::NONE, string $voiceUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceStatusCallbackUrl = Values::NONE, string $voiceStatusCallbackMethod = Values::NONE, bool $sipRegistration = Values::NONE, bool $emergencyCallingEnabled = Values::NONE, bool $secure = Values::NONE, string $byocTrunkSid = Values::NONE, string $emergencyCallerSid = Values::NONE): CreateDomainOptions { return new CreateDomainOptions($friendlyName, $voiceUrl, $voiceMethod, $voiceFallbackUrl, $voiceFallbackMethod, $voiceStatusCallbackUrl, $voiceStatusCallbackMethod, $sipRegistration, $emergencyCallingEnabled, $secure, $byocTrunkSid, $emergencyCallerSid); } /** * @param string $friendlyName A string to describe the resource * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @param string $voiceFallbackUrl The URL we should call when an error occurs * in executing TwiML * @param string $voiceMethod The HTTP method we should use with voice_url * @param string $voiceStatusCallbackMethod The HTTP method we should use to * call voice_status_callback_url * @param string $voiceStatusCallbackUrl The URL that we should call to pass * status updates * @param string $voiceUrl The URL we should call when receiving a call * @param bool $sipRegistration Whether SIP registration is allowed * @param string $domainName The unique address on Twilio to route SIP traffic * @param bool $emergencyCallingEnabled Whether emergency calling is enabled * for the domain. * @param bool $secure Whether secure SIP is enabled for the domain * @param string $byocTrunkSid The SID of the BYOC Trunk resource. * @param string $emergencyCallerSid Whether an emergency caller sid is * configured for the domain. * @return UpdateDomainOptions Options builder */ public static function update(string $friendlyName = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceStatusCallbackMethod = Values::NONE, string $voiceStatusCallbackUrl = Values::NONE, string $voiceUrl = Values::NONE, bool $sipRegistration = Values::NONE, string $domainName = Values::NONE, bool $emergencyCallingEnabled = Values::NONE, bool $secure = Values::NONE, string $byocTrunkSid = Values::NONE, string $emergencyCallerSid = Values::NONE): UpdateDomainOptions { return new UpdateDomainOptions($friendlyName, $voiceFallbackMethod, $voiceFallbackUrl, $voiceMethod, $voiceStatusCallbackMethod, $voiceStatusCallbackUrl, $voiceUrl, $sipRegistration, $domainName, $emergencyCallingEnabled, $secure, $byocTrunkSid, $emergencyCallerSid); } } class CreateDomainOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $voiceUrl The URL we should call when receiving a call * @param string $voiceMethod The HTTP method to use with voice_url * @param string $voiceFallbackUrl The URL we should call when an error occurs * in executing TwiML * @param string $voiceFallbackMethod The HTTP method to use with * voice_fallback_url * @param string $voiceStatusCallbackUrl The URL that we should call to pass * status updates * @param string $voiceStatusCallbackMethod The HTTP method we should use to * call `voice_status_callback_url` * @param bool $sipRegistration Whether SIP registration is allowed * @param bool $emergencyCallingEnabled Whether emergency calling is enabled * for the domain. * @param bool $secure Whether secure SIP is enabled for the domain * @param string $byocTrunkSid The SID of the BYOC Trunk resource. * @param string $emergencyCallerSid Whether an emergency caller sid is * configured for the domain. */ public function __construct(string $friendlyName = Values::NONE, string $voiceUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceStatusCallbackUrl = Values::NONE, string $voiceStatusCallbackMethod = Values::NONE, bool $sipRegistration = Values::NONE, bool $emergencyCallingEnabled = Values::NONE, bool $secure = Values::NONE, string $byocTrunkSid = Values::NONE, string $emergencyCallerSid = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['voiceUrl'] = $voiceUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['voiceStatusCallbackUrl'] = $voiceStatusCallbackUrl; $this->options['voiceStatusCallbackMethod'] = $voiceStatusCallbackMethod; $this->options['sipRegistration'] = $sipRegistration; $this->options['emergencyCallingEnabled'] = $emergencyCallingEnabled; $this->options['secure'] = $secure; $this->options['byocTrunkSid'] = $byocTrunkSid; $this->options['emergencyCallerSid'] = $emergencyCallerSid; } /** * A descriptive string that you created to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The URL we should when the domain receives a call. * * @param string $voiceUrl The URL we should call when receiving a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. * * @param string $voiceMethod The HTTP method to use with voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`. * * @param string $voiceFallbackUrl The URL we should call when an error occurs * in executing TwiML * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. * * @param string $voiceFallbackMethod The HTTP method to use with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL that we should call to pass status parameters (such as call ended) to your application. * * @param string $voiceStatusCallbackUrl The URL that we should call to pass * status updates * @return $this Fluent Builder */ public function setVoiceStatusCallbackUrl(string $voiceStatusCallbackUrl): self { $this->options['voiceStatusCallbackUrl'] = $voiceStatusCallbackUrl; return $this; } /** * The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. * * @param string $voiceStatusCallbackMethod The HTTP method we should use to * call `voice_status_callback_url` * @return $this Fluent Builder */ public function setVoiceStatusCallbackMethod(string $voiceStatusCallbackMethod): self { $this->options['voiceStatusCallbackMethod'] = $voiceStatusCallbackMethod; return $this; } /** * Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. * * @param bool $sipRegistration Whether SIP registration is allowed * @return $this Fluent Builder */ public function setSipRegistration(bool $sipRegistration): self { $this->options['sipRegistration'] = $sipRegistration; return $this; } /** * Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. * * @param bool $emergencyCallingEnabled Whether emergency calling is enabled * for the domain. * @return $this Fluent Builder */ public function setEmergencyCallingEnabled(bool $emergencyCallingEnabled): self { $this->options['emergencyCallingEnabled'] = $emergencyCallingEnabled; return $this; } /** * Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. * * @param bool $secure Whether secure SIP is enabled for the domain * @return $this Fluent Builder */ public function setSecure(bool $secure): self { $this->options['secure'] = $secure; return $this; } /** * The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. * * @param string $byocTrunkSid The SID of the BYOC Trunk resource. * @return $this Fluent Builder */ public function setByocTrunkSid(string $byocTrunkSid): self { $this->options['byocTrunkSid'] = $byocTrunkSid; return $this; } /** * Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. * * @param string $emergencyCallerSid Whether an emergency caller sid is * configured for the domain. * @return $this Fluent Builder */ public function setEmergencyCallerSid(string $emergencyCallerSid): self { $this->options['emergencyCallerSid'] = $emergencyCallerSid; 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.Api.V2010.CreateDomainOptions ' . $options . ']'; } } class UpdateDomainOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @param string $voiceFallbackUrl The URL we should call when an error occurs * in executing TwiML * @param string $voiceMethod The HTTP method we should use with voice_url * @param string $voiceStatusCallbackMethod The HTTP method we should use to * call voice_status_callback_url * @param string $voiceStatusCallbackUrl The URL that we should call to pass * status updates * @param string $voiceUrl The URL we should call when receiving a call * @param bool $sipRegistration Whether SIP registration is allowed * @param string $domainName The unique address on Twilio to route SIP traffic * @param bool $emergencyCallingEnabled Whether emergency calling is enabled * for the domain. * @param bool $secure Whether secure SIP is enabled for the domain * @param string $byocTrunkSid The SID of the BYOC Trunk resource. * @param string $emergencyCallerSid Whether an emergency caller sid is * configured for the domain. */ public function __construct(string $friendlyName = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceStatusCallbackMethod = Values::NONE, string $voiceStatusCallbackUrl = Values::NONE, string $voiceUrl = Values::NONE, bool $sipRegistration = Values::NONE, string $domainName = Values::NONE, bool $emergencyCallingEnabled = Values::NONE, bool $secure = Values::NONE, string $byocTrunkSid = Values::NONE, string $emergencyCallerSid = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceStatusCallbackMethod'] = $voiceStatusCallbackMethod; $this->options['voiceStatusCallbackUrl'] = $voiceStatusCallbackUrl; $this->options['voiceUrl'] = $voiceUrl; $this->options['sipRegistration'] = $sipRegistration; $this->options['domainName'] = $domainName; $this->options['emergencyCallingEnabled'] = $emergencyCallingEnabled; $this->options['secure'] = $secure; $this->options['byocTrunkSid'] = $byocTrunkSid; $this->options['emergencyCallerSid'] = $emergencyCallerSid; } /** * A descriptive string that you created to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. * * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`. * * @param string $voiceFallbackUrl The URL we should call when an error occurs * in executing TwiML * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method we should use to call `voice_url` * * @param string $voiceMethod The HTTP method we should use with voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. * * @param string $voiceStatusCallbackMethod The HTTP method we should use to * call voice_status_callback_url * @return $this Fluent Builder */ public function setVoiceStatusCallbackMethod(string $voiceStatusCallbackMethod): self { $this->options['voiceStatusCallbackMethod'] = $voiceStatusCallbackMethod; return $this; } /** * The URL that we should call to pass status parameters (such as call ended) to your application. * * @param string $voiceStatusCallbackUrl The URL that we should call to pass * status updates * @return $this Fluent Builder */ public function setVoiceStatusCallbackUrl(string $voiceStatusCallbackUrl): self { $this->options['voiceStatusCallbackUrl'] = $voiceStatusCallbackUrl; return $this; } /** * The URL we should call when the domain receives a call. * * @param string $voiceUrl The URL we should call when receiving a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. * * @param bool $sipRegistration Whether SIP registration is allowed * @return $this Fluent Builder */ public function setSipRegistration(bool $sipRegistration): self { $this->options['sipRegistration'] = $sipRegistration; return $this; } /** * The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-" and must end with `sip.twilio.com`. * * @param string $domainName The unique address on Twilio to route SIP traffic * @return $this Fluent Builder */ public function setDomainName(string $domainName): self { $this->options['domainName'] = $domainName; return $this; } /** * Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. * * @param bool $emergencyCallingEnabled Whether emergency calling is enabled * for the domain. * @return $this Fluent Builder */ public function setEmergencyCallingEnabled(bool $emergencyCallingEnabled): self { $this->options['emergencyCallingEnabled'] = $emergencyCallingEnabled; return $this; } /** * Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. * * @param bool $secure Whether secure SIP is enabled for the domain * @return $this Fluent Builder */ public function setSecure(bool $secure): self { $this->options['secure'] = $secure; return $this; } /** * The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. * * @param string $byocTrunkSid The SID of the BYOC Trunk resource. * @return $this Fluent Builder */ public function setByocTrunkSid(string $byocTrunkSid): self { $this->options['byocTrunkSid'] = $byocTrunkSid; return $this; } /** * Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. * * @param string $emergencyCallerSid Whether an emergency caller sid is * configured for the domain. * @return $this Fluent Builder */ public function setEmergencyCallerSid(string $emergencyCallerSid): self { $this->options['emergencyCallerSid'] = $emergencyCallerSid; 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.Api.V2010.UpdateDomainOptions ' . $options . ']'; } } V2010/Account/Sip/IpAccessControlList/IpAddressContext.php 0000644 00000006564 15111164054 0017237 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Values; use Twilio\Version; class IpAddressContext extends InstanceContext { /** * Initialize the IpAddressContext * * @param Version $version Version that contains the resource * @param string $accountSid The unique sid that identifies this account * @param string $ipAccessControlListSid The IpAccessControlList Sid that * identifies the IpAddress resources to * fetch * @param string $sid A string that identifies the IpAddress resource to fetch */ public function __construct(Version $version, $accountSid, $ipAccessControlListSid, $sid) { parent::__construct($version); // Path Solution $this->solution = [ 'accountSid' => $accountSid, 'ipAccessControlListSid' => $ipAccessControlListSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/IpAccessControlLists/' . \rawurlencode($ipAccessControlListSid) . '/IpAddresses/' . \rawurlencode($sid) . '.json'; } /** * Fetch the IpAddressInstance * * @return IpAddressInstance Fetched IpAddressInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpAddressInstance { $payload = $this->version->fetch('GET', $this->uri); return new IpAddressInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['ipAccessControlListSid'], $this->solution['sid'] ); } /** * Update the IpAddressInstance * * @param array|Options $options Optional Arguments * @return IpAddressInstance Updated IpAddressInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): IpAddressInstance { $options = new Values($options); $data = Values::of([ 'IpAddress' => $options['ipAddress'], 'FriendlyName' => $options['friendlyName'], 'CidrPrefixLength' => $options['cidrPrefixLength'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new IpAddressInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['ipAccessControlListSid'], $this->solution['sid'] ); } /** * Delete the IpAddressInstance * * @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.Api.V2010.IpAddressContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/IpAccessControlList/IpAddressOptions.php 0000644 00000014702 15111164054 0017237 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList; use Twilio\Options; use Twilio\Values; abstract class IpAddressOptions { /** * @param int $cidrPrefixLength An integer representing the length of the CIDR * prefix to use with this IP address when * accepting traffic. By default the entire IP * address is used. * @return CreateIpAddressOptions Options builder */ public static function create(int $cidrPrefixLength = Values::NONE): CreateIpAddressOptions { return new CreateIpAddressOptions($cidrPrefixLength); } /** * @param string $ipAddress An IP address in dotted decimal notation from which * you want to accept traffic. Any SIP requests from * this IP address will be allowed by Twilio. IPv4 * only supported today. * @param string $friendlyName A human readable descriptive text for this * resource, up to 255 characters long. * @param int $cidrPrefixLength An integer representing the length of the CIDR * prefix to use with this IP address when * accepting traffic. By default the entire IP * address is used. * @return UpdateIpAddressOptions Options builder */ public static function update(string $ipAddress = Values::NONE, string $friendlyName = Values::NONE, int $cidrPrefixLength = Values::NONE): UpdateIpAddressOptions { return new UpdateIpAddressOptions($ipAddress, $friendlyName, $cidrPrefixLength); } } class CreateIpAddressOptions extends Options { /** * @param int $cidrPrefixLength An integer representing the length of the CIDR * prefix to use with this IP address when * accepting traffic. By default the entire IP * address is used. */ public function __construct(int $cidrPrefixLength = Values::NONE) { $this->options['cidrPrefixLength'] = $cidrPrefixLength; } /** * An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. * * @param int $cidrPrefixLength An integer representing the length of the CIDR * prefix to use with this IP address when * accepting traffic. By default the entire IP * address is used. * @return $this Fluent Builder */ public function setCidrPrefixLength(int $cidrPrefixLength): self { $this->options['cidrPrefixLength'] = $cidrPrefixLength; 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.Api.V2010.CreateIpAddressOptions ' . $options . ']'; } } class UpdateIpAddressOptions extends Options { /** * @param string $ipAddress An IP address in dotted decimal notation from which * you want to accept traffic. Any SIP requests from * this IP address will be allowed by Twilio. IPv4 * only supported today. * @param string $friendlyName A human readable descriptive text for this * resource, up to 255 characters long. * @param int $cidrPrefixLength An integer representing the length of the CIDR * prefix to use with this IP address when * accepting traffic. By default the entire IP * address is used. */ public function __construct(string $ipAddress = Values::NONE, string $friendlyName = Values::NONE, int $cidrPrefixLength = Values::NONE) { $this->options['ipAddress'] = $ipAddress; $this->options['friendlyName'] = $friendlyName; $this->options['cidrPrefixLength'] = $cidrPrefixLength; } /** * An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. * * @param string $ipAddress An IP address in dotted decimal notation from which * you want to accept traffic. Any SIP requests from * this IP address will be allowed by Twilio. IPv4 * only supported today. * @return $this Fluent Builder */ public function setIpAddress(string $ipAddress): self { $this->options['ipAddress'] = $ipAddress; return $this; } /** * A human readable descriptive text for this resource, up to 255 characters long. * * @param string $friendlyName A human readable descriptive text for this * resource, up to 255 characters long. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. * * @param int $cidrPrefixLength An integer representing the length of the CIDR * prefix to use with this IP address when * accepting traffic. By default the entire IP * address is used. * @return $this Fluent Builder */ public function setCidrPrefixLength(int $cidrPrefixLength): self { $this->options['cidrPrefixLength'] = $cidrPrefixLength; 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.Api.V2010.UpdateIpAddressOptions ' . $options . ']'; } } V2010/Account/Sip/IpAccessControlList/IpAddressList.php 0000644 00000015240 15111164054 0016515 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class IpAddressList extends ListResource { /** * Construct the IpAddressList * * @param Version $version Version that contains the resource * @param string $accountSid The unique id of the Account that is responsible * for this resource. * @param string $ipAccessControlListSid The unique id of the * IpAccessControlList resource that * includes this resource. */ public function __construct(Version $version, string $accountSid, string $ipAccessControlListSid) { parent::__construct($version); // Path Solution $this->solution = [ 'accountSid' => $accountSid, 'ipAccessControlListSid' => $ipAccessControlListSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/IpAccessControlLists/' . \rawurlencode($ipAccessControlListSid) . '/IpAddresses.json'; } /** * Streams IpAddressInstance 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 IpAddressInstance 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 IpAddressInstance[] 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 IpAddressInstance 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 IpAddressPage Page of IpAddressInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): IpAddressPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new IpAddressPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of IpAddressInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return IpAddressPage Page of IpAddressInstance */ public function getPage(string $targetUrl): IpAddressPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new IpAddressPage($this->version, $response, $this->solution); } /** * Create the IpAddressInstance * * @param string $friendlyName A human readable descriptive text for this * resource, up to 255 characters long. * @param string $ipAddress An IP address in dotted decimal notation from which * you want to accept traffic. Any SIP requests from * this IP address will be allowed by Twilio. IPv4 * only supported today. * @param array|Options $options Optional Arguments * @return IpAddressInstance Created IpAddressInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $ipAddress, array $options = []): IpAddressInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'IpAddress' => $ipAddress, 'CidrPrefixLength' => $options['cidrPrefixLength'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new IpAddressInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['ipAccessControlListSid'] ); } /** * Constructs a IpAddressContext * * @param string $sid A string that identifies the IpAddress resource to fetch */ public function getContext(string $sid): IpAddressContext { return new IpAddressContext( $this->version, $this->solution['accountSid'], $this->solution['ipAccessControlListSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.IpAddressList]'; } } V2010/Account/Sip/IpAccessControlList/IpAddressPage.php 0000644 00000002511 15111164054 0016453 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class IpAddressPage 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 IpAddressInstance \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressInstance */ public function buildInstance(array $payload): IpAddressInstance { return new IpAddressInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['ipAccessControlListSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.IpAddressPage]'; } } V2010/Account/Sip/IpAccessControlList/IpAddressInstance.php 0000644 00000011540 15111164055 0017346 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; /** * @property string $sid * @property string $accountSid * @property string $friendlyName * @property string $ipAddress * @property int $cidrPrefixLength * @property string $ipAccessControlListSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $uri */ class IpAddressInstance extends InstanceResource { /** * Initialize the IpAddressInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The unique id of the Account that is responsible * for this resource. * @param string $ipAccessControlListSid The unique id of the * IpAccessControlList resource that * includes this resource. * @param string $sid A string that identifies the IpAddress resource to fetch */ public function __construct(Version $version, array $payload, string $accountSid, string $ipAccessControlListSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'ipAddress' => Values::array_get($payload, 'ip_address'), 'cidrPrefixLength' => Values::array_get($payload, 'cidr_prefix_length'), 'ipAccessControlListSid' => Values::array_get($payload, 'ip_access_control_list_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'ipAccessControlListSid' => $ipAccessControlListSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return IpAddressContext Context for this IpAddressInstance */ protected function proxy(): IpAddressContext { if (!$this->context) { $this->context = new IpAddressContext( $this->version, $this->solution['accountSid'], $this->solution['ipAccessControlListSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the IpAddressInstance * * @return IpAddressInstance Fetched IpAddressInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpAddressInstance { return $this->proxy()->fetch(); } /** * Update the IpAddressInstance * * @param array|Options $options Optional Arguments * @return IpAddressInstance Updated IpAddressInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): IpAddressInstance { return $this->proxy()->update($options); } /** * Delete the IpAddressInstance * * @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.Api.V2010.IpAddressInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/IpAccessControlListInstance.php 0000644 00000011211 15111164055 0015463 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressList; use Twilio\Values; use Twilio\Version; /** * @property string $sid * @property string $accountSid * @property string $friendlyName * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property array $subresourceUris * @property string $uri */ class IpAccessControlListInstance extends InstanceResource { protected $_ipAddresses; /** * Initialize the IpAccessControlListInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. * @param string $sid A string that identifies the resource to fetch */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return IpAccessControlListContext Context for this * IpAccessControlListInstance */ protected function proxy(): IpAccessControlListContext { if (!$this->context) { $this->context = new IpAccessControlListContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the IpAccessControlListInstance * * @return IpAccessControlListInstance Fetched IpAccessControlListInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpAccessControlListInstance { return $this->proxy()->fetch(); } /** * Update the IpAccessControlListInstance * * @param string $friendlyName A human readable description of this resource * @return IpAccessControlListInstance Updated IpAccessControlListInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $friendlyName): IpAccessControlListInstance { return $this->proxy()->update($friendlyName); } /** * Delete the IpAccessControlListInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the ipAddresses */ protected function getIpAddresses(): IpAddressList { return $this->proxy()->ipAddresses; } /** * 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.Api.V2010.IpAccessControlListInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/IpAccessControlListList.php 0000644 00000013227 15111164055 0014643 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class IpAccessControlListList extends ListResource { /** * Construct the IpAccessControlListList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/IpAccessControlLists.json'; } /** * Streams IpAccessControlListInstance 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 IpAccessControlListInstance 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 IpAccessControlListInstance[] 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 IpAccessControlListInstance 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 IpAccessControlListPage Page of IpAccessControlListInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): IpAccessControlListPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new IpAccessControlListPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of IpAccessControlListInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return IpAccessControlListPage Page of IpAccessControlListInstance */ public function getPage(string $targetUrl): IpAccessControlListPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new IpAccessControlListPage($this->version, $response, $this->solution); } /** * Create the IpAccessControlListInstance * * @param string $friendlyName A human readable description of this resource * @return IpAccessControlListInstance Created IpAccessControlListInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName): IpAccessControlListInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new IpAccessControlListInstance($this->version, $payload, $this->solution['accountSid']); } /** * Constructs a IpAccessControlListContext * * @param string $sid A string that identifies the resource to fetch */ public function getContext(string $sid): IpAccessControlListContext { return new IpAccessControlListContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.IpAccessControlListList]'; } } V2010/Account/Sip/DomainPage.php 0000644 00000002252 15111164056 0012121 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class DomainPage 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 DomainInstance \Twilio\Rest\Api\V2010\Account\Sip\DomainInstance */ public function buildInstance(array $payload): DomainInstance { return new DomainInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.DomainPage]'; } } V2010/Account/Sip/CredentialListInstance.php 0000644 00000010763 15111164056 0014516 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialList; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $friendlyName * @property string $sid * @property array $subresourceUris * @property string $uri */ class CredentialListInstance extends InstanceResource { protected $_credentials; /** * Initialize the CredentialListInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. * @param string $sid Fetch by unique credential list Sid */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CredentialListContext Context for this CredentialListInstance */ protected function proxy(): CredentialListContext { if (!$this->context) { $this->context = new CredentialListContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the CredentialListInstance * * @return CredentialListInstance Fetched CredentialListInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialListInstance { return $this->proxy()->fetch(); } /** * Update the CredentialListInstance * * @param string $friendlyName Human readable descriptive text * @return CredentialListInstance Updated CredentialListInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $friendlyName): CredentialListInstance { return $this->proxy()->update($friendlyName); } /** * Delete the CredentialListInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the credentials */ protected function getCredentials(): CredentialList { return $this->proxy()->credentials; } /** * 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.Api.V2010.CredentialListInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/CredentialListList.php 0000644 00000012772 15111164056 0013667 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class CredentialListList extends ListResource { /** * Construct the CredentialListList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/CredentialLists.json'; } /** * Streams CredentialListInstance 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 CredentialListInstance 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 CredentialListInstance[] 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 CredentialListInstance 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 CredentialListPage Page of CredentialListInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CredentialListPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CredentialListPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CredentialListInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CredentialListPage Page of CredentialListInstance */ public function getPage(string $targetUrl): CredentialListPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CredentialListPage($this->version, $response, $this->solution); } /** * Create the CredentialListInstance * * @param string $friendlyName Human readable descriptive text * @return CredentialListInstance Created CredentialListInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName): CredentialListInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CredentialListInstance($this->version, $payload, $this->solution['accountSid']); } /** * Constructs a CredentialListContext * * @param string $sid Fetch by unique credential list Sid */ public function getContext(string $sid): CredentialListContext { return new CredentialListContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.CredentialListList]'; } } V2010/Account/Sip/DomainContext.php 0000644 00000015261 15111164056 0012675 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypesList; use Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingList; use Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingList; use Twilio\Serialize; use Twilio\Values; use Twilio\Version; /** * @property IpAccessControlListMappingList $ipAccessControlListMappings * @property CredentialListMappingList $credentialListMappings * @property AuthTypesList $auth * @method \Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingContext ipAccessControlListMappings(string $sid) * @method \Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingContext credentialListMappings(string $sid) */ class DomainContext extends InstanceContext { protected $_ipAccessControlListMappings; protected $_credentialListMappings; protected $_auth; /** * Initialize the DomainContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($sid) . '.json'; } /** * Fetch the DomainInstance * * @return DomainInstance Fetched DomainInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DomainInstance { $payload = $this->version->fetch('GET', $this->uri); return new DomainInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the DomainInstance * * @param array|Options $options Optional Arguments * @return DomainInstance Updated DomainInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): DomainInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceStatusCallbackMethod' => $options['voiceStatusCallbackMethod'], 'VoiceStatusCallbackUrl' => $options['voiceStatusCallbackUrl'], 'VoiceUrl' => $options['voiceUrl'], 'SipRegistration' => Serialize::booleanToString($options['sipRegistration']), 'DomainName' => $options['domainName'], 'EmergencyCallingEnabled' => Serialize::booleanToString($options['emergencyCallingEnabled']), 'Secure' => Serialize::booleanToString($options['secure']), 'ByocTrunkSid' => $options['byocTrunkSid'], 'EmergencyCallerSid' => $options['emergencyCallerSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new DomainInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the DomainInstance * * @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); } /** * Access the ipAccessControlListMappings */ protected function getIpAccessControlListMappings(): IpAccessControlListMappingList { if (!$this->_ipAccessControlListMappings) { $this->_ipAccessControlListMappings = new IpAccessControlListMappingList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_ipAccessControlListMappings; } /** * Access the credentialListMappings */ protected function getCredentialListMappings(): CredentialListMappingList { if (!$this->_credentialListMappings) { $this->_credentialListMappings = new CredentialListMappingList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_credentialListMappings; } /** * Access the auth */ protected function getAuth(): AuthTypesList { if (!$this->_auth) { $this->_auth = new AuthTypesList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_auth; } /** * 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.Api.V2010.DomainContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/CredentialListContext.php 0000644 00000011000 15111164057 0014360 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialList; use Twilio\Values; use Twilio\Version; /** * @property CredentialList $credentials * @method \Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialContext credentials(string $sid) */ class CredentialListContext extends InstanceContext { protected $_credentials; /** * Initialize the CredentialListContext * * @param Version $version Version that contains the resource * @param string $accountSid The unique id of the Account that is responsible * for this resource. * @param string $sid Fetch by unique credential list Sid */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/CredentialLists/' . \rawurlencode($sid) . '.json'; } /** * Fetch the CredentialListInstance * * @return CredentialListInstance Fetched CredentialListInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialListInstance { $payload = $this->version->fetch('GET', $this->uri); return new CredentialListInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the CredentialListInstance * * @param string $friendlyName Human readable descriptive text * @return CredentialListInstance Updated CredentialListInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $friendlyName): CredentialListInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new CredentialListInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the CredentialListInstance * * @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); } /** * Access the credentials */ protected function getCredentials(): CredentialList { if (!$this->_credentials) { $this->_credentials = new CredentialList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_credentials; } /** * 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.Api.V2010.CredentialListContext ' . \implode(' ', $context) . ']'; } }V2010/Account/Sip/IpAccessControlListContext.php 0000644 00000011060 15111164057 0015347 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressList; use Twilio\Values; use Twilio\Version; /** * @property IpAddressList $ipAddresses * @method \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressContext ipAddresses(string $sid) */ class IpAccessControlListContext extends InstanceContext { protected $_ipAddresses; /** * Initialize the IpAccessControlListContext * * @param Version $version Version that contains the resource * @param string $accountSid The unique sid that identifies this account * @param string $sid A string that identifies the resource to fetch */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/IpAccessControlLists/' . \rawurlencode($sid) . '.json'; } /** * Fetch the IpAccessControlListInstance * * @return IpAccessControlListInstance Fetched IpAccessControlListInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpAccessControlListInstance { $payload = $this->version->fetch('GET', $this->uri); return new IpAccessControlListInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the IpAccessControlListInstance * * @param string $friendlyName A human readable description of this resource * @return IpAccessControlListInstance Updated IpAccessControlListInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $friendlyName): IpAccessControlListInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new IpAccessControlListInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the IpAccessControlListInstance * * @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); } /** * Access the ipAddresses */ protected function getIpAddresses(): IpAddressList { if (!$this->_ipAddresses) { $this->_ipAddresses = new IpAddressList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_ipAddresses; } /** * 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.Api.V2010.IpAccessControlListContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/DomainInstance.php 0000644 00000015126 15111164057 0013016 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypesList; use Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingList; use Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingList; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property string $authType * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $domainName * @property string $friendlyName * @property string $sid * @property string $uri * @property string $voiceFallbackMethod * @property string $voiceFallbackUrl * @property string $voiceMethod * @property string $voiceStatusCallbackMethod * @property string $voiceStatusCallbackUrl * @property string $voiceUrl * @property array $subresourceUris * @property bool $sipRegistration * @property bool $emergencyCallingEnabled * @property bool $secure * @property string $byocTrunkSid * @property string $emergencyCallerSid */ class DomainInstance extends InstanceResource { protected $_ipAccessControlListMappings; protected $_credentialListMappings; protected $_auth; /** * Initialize the DomainInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'authType' => Values::array_get($payload, 'auth_type'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'domainName' => Values::array_get($payload, 'domain_name'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), 'uri' => Values::array_get($payload, 'uri'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceStatusCallbackMethod' => Values::array_get($payload, 'voice_status_callback_method'), 'voiceStatusCallbackUrl' => Values::array_get($payload, 'voice_status_callback_url'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'sipRegistration' => Values::array_get($payload, 'sip_registration'), 'emergencyCallingEnabled' => Values::array_get($payload, 'emergency_calling_enabled'), 'secure' => Values::array_get($payload, 'secure'), 'byocTrunkSid' => Values::array_get($payload, 'byoc_trunk_sid'), 'emergencyCallerSid' => Values::array_get($payload, 'emergency_caller_sid'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DomainContext Context for this DomainInstance */ protected function proxy(): DomainContext { if (!$this->context) { $this->context = new DomainContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the DomainInstance * * @return DomainInstance Fetched DomainInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DomainInstance { return $this->proxy()->fetch(); } /** * Update the DomainInstance * * @param array|Options $options Optional Arguments * @return DomainInstance Updated DomainInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): DomainInstance { return $this->proxy()->update($options); } /** * Delete the DomainInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the ipAccessControlListMappings */ protected function getIpAccessControlListMappings(): IpAccessControlListMappingList { return $this->proxy()->ipAccessControlListMappings; } /** * Access the credentialListMappings */ protected function getCredentialListMappings(): CredentialListMappingList { return $this->proxy()->credentialListMappings; } /** * Access the auth */ protected function getAuth(): AuthTypesList { return $this->proxy()->auth; } /** * 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.Api.V2010.DomainInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/Domain/CredentialListMappingInstance.php 0000644 00000010365 15111164057 0017240 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $domainSid * @property string $friendlyName * @property string $sid * @property string $uri */ class CredentialListMappingInstance extends InstanceResource { /** * Initialize the CredentialListMappingInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The unique id of the Account that is responsible * for this resource. * @param string $domainSid The unique string that identifies the SipDomain * resource. * @param string $sid A string that identifies the resource to fetch */ public function __construct(Version $version, array $payload, string $accountSid, string $domainSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'domainSid' => Values::array_get($payload, 'domain_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CredentialListMappingContext Context for this * CredentialListMappingInstance */ protected function proxy(): CredentialListMappingContext { if (!$this->context) { $this->context = new CredentialListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the CredentialListMappingInstance * * @return CredentialListMappingInstance Fetched CredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialListMappingInstance { return $this->proxy()->fetch(); } /** * Delete the CredentialListMappingInstance * * @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.Api.V2010.CredentialListMappingInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsList.php 0000644 00000006136 15111164057 0020435 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations\AuthRegistrationsCredentialListMappingList; use Twilio\Version; /** * @property AuthRegistrationsCredentialListMappingList $credentialListMappings * @method \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations\AuthRegistrationsCredentialListMappingContext credentialListMappings(string $sid) */ class AuthTypeRegistrationsList extends ListResource { protected $_credentialListMappings = null; /** * Construct the AuthTypeRegistrationsList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $domainSid The unique string that identifies the resource */ public function __construct(Version $version, string $accountSid, string $domainSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; } /** * Access the credentialListMappings */ protected function getCredentialListMappings(): AuthRegistrationsCredentialListMappingList { if (!$this->_credentialListMappings) { $this->_credentialListMappings = new AuthRegistrationsCredentialListMappingList( $this->version, $this->solution['accountSid'], $this->solution['domainSid'] ); } return $this->_credentialListMappings; } /** * 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.Api.V2010.AuthTypeRegistrationsList]'; } } V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsPage.php 0000644 00000002576 15111164060 0020374 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class AuthTypeRegistrationsPage 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 AuthTypeRegistrationsInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrationsInstance */ public function buildInstance(array $payload): AuthTypeRegistrationsInstance { return new AuthTypeRegistrationsInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthTypeRegistrationsPage]'; } } V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsInstance.php 0000644 00000003344 15111164060 0021256 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; class AuthTypeRegistrationsInstance extends InstanceResource { /** * Initialize the AuthTypeRegistrationsInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $domainSid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $domainSid) { parent::__construct($version); $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; } /** * 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.Api.V2010.AuthTypeRegistrationsInstance]'; } } V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingContext.php 0000644 00000005143 15111164060 0025361 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; class AuthCallsCredentialListMappingContext extends InstanceContext { /** * Initialize the AuthCallsCredentialListMappingContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $domainSid The SID of the SIP domain that contains the * resource to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $domainSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Calls/CredentialListMappings/' . \rawurlencode($sid) . '.json'; } /** * Fetch the AuthCallsCredentialListMappingInstance * * @return AuthCallsCredentialListMappingInstance Fetched * AuthCallsCredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthCallsCredentialListMappingInstance { $payload = $this->version->fetch('GET', $this->uri); return new AuthCallsCredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } /** * Delete the AuthCallsCredentialListMappingInstance * * @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.Api.V2010.AuthCallsCredentialListMappingContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingContext.php 0000644 00000005232 15111164061 0026342 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; class AuthCallsIpAccessControlListMappingContext extends InstanceContext { /** * Initialize the AuthCallsIpAccessControlListMappingContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $domainSid The SID of the SIP domain that contains the * resource to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $domainSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Calls/IpAccessControlListMappings/' . \rawurlencode($sid) . '.json'; } /** * Fetch the AuthCallsIpAccessControlListMappingInstance * * @return AuthCallsIpAccessControlListMappingInstance Fetched * AuthCallsIpAccessControlListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthCallsIpAccessControlListMappingInstance { $payload = $this->version->fetch('GET', $this->uri); return new AuthCallsIpAccessControlListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } /** * Delete the AuthCallsIpAccessControlListMappingInstance * * @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.Api.V2010.AuthCallsIpAccessControlListMappingContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingList.php 0000644 00000015233 15111164061 0025633 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class AuthCallsIpAccessControlListMappingList extends ListResource { /** * Construct the AuthCallsIpAccessControlListMappingList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $domainSid The unique string that identifies the resource */ public function __construct(Version $version, string $accountSid, string $domainSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Calls/IpAccessControlListMappings.json'; } /** * Create the AuthCallsIpAccessControlListMappingInstance * * @param string $ipAccessControlListSid The SID of the IpAccessControlList * resource to map to the SIP domain * @return AuthCallsIpAccessControlListMappingInstance Created * AuthCallsIpAccessControlListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $ipAccessControlListSid): AuthCallsIpAccessControlListMappingInstance { $data = Values::of(['IpAccessControlListSid' => $ipAccessControlListSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AuthCallsIpAccessControlListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Streams AuthCallsIpAccessControlListMappingInstance 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 AuthCallsIpAccessControlListMappingInstance 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 AuthCallsIpAccessControlListMappingInstance[] 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 AuthCallsIpAccessControlListMappingInstance * 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 AuthCallsIpAccessControlListMappingPage Page of * AuthCallsIpAccessControlListMappingInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AuthCallsIpAccessControlListMappingPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AuthCallsIpAccessControlListMappingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AuthCallsIpAccessControlListMappingInstance * records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AuthCallsIpAccessControlListMappingPage Page of * AuthCallsIpAccessControlListMappingInstance */ public function getPage(string $targetUrl): AuthCallsIpAccessControlListMappingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AuthCallsIpAccessControlListMappingPage($this->version, $response, $this->solution); } /** * Constructs a AuthCallsIpAccessControlListMappingContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): AuthCallsIpAccessControlListMappingContext { return new AuthCallsIpAccessControlListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthCallsIpAccessControlListMappingList]'; } } V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingList.php 0000644 00000014752 15111164061 0024657 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class AuthCallsCredentialListMappingList extends ListResource { /** * Construct the AuthCallsCredentialListMappingList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $domainSid The unique string that identifies the resource */ public function __construct(Version $version, string $accountSid, string $domainSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Calls/CredentialListMappings.json'; } /** * Create the AuthCallsCredentialListMappingInstance * * @param string $credentialListSid The SID of the CredentialList resource to * map to the SIP domain * @return AuthCallsCredentialListMappingInstance Created * AuthCallsCredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $credentialListSid): AuthCallsCredentialListMappingInstance { $data = Values::of(['CredentialListSid' => $credentialListSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AuthCallsCredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Streams AuthCallsCredentialListMappingInstance 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 AuthCallsCredentialListMappingInstance 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 AuthCallsCredentialListMappingInstance[] 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 AuthCallsCredentialListMappingInstance 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 AuthCallsCredentialListMappingPage Page of * AuthCallsCredentialListMappingInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AuthCallsCredentialListMappingPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AuthCallsCredentialListMappingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AuthCallsCredentialListMappingInstance records * from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AuthCallsCredentialListMappingPage Page of * AuthCallsCredentialListMappingInstance */ public function getPage(string $targetUrl): AuthCallsCredentialListMappingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AuthCallsCredentialListMappingPage($this->version, $response, $this->solution); } /** * Constructs a AuthCallsCredentialListMappingContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): AuthCallsCredentialListMappingContext { return new AuthCallsCredentialListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthCallsCredentialListMappingList]'; } } V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingPage.php 0000644 00000002756 15111164061 0025602 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class AuthCallsIpAccessControlListMappingPage 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 AuthCallsIpAccessControlListMappingInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsIpAccessControlListMappingInstance */ public function buildInstance(array $payload): AuthCallsIpAccessControlListMappingInstance { return new AuthCallsIpAccessControlListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthCallsIpAccessControlListMappingPage]'; } } V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingPage.php 0000644 00000002720 15111164062 0024611 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class AuthCallsCredentialListMappingPage 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 AuthCallsCredentialListMappingInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsCredentialListMappingInstance */ public function buildInstance(array $payload): AuthCallsCredentialListMappingInstance { return new AuthCallsCredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthCallsCredentialListMappingPage]'; } } V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingInstance.php 0000644 00000010350 15111164062 0026460 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $friendlyName * @property string $sid */ class AuthCallsIpAccessControlListMappingInstance extends InstanceResource { /** * Initialize the AuthCallsIpAccessControlListMappingInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $domainSid The unique string that identifies the resource * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $domainSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), ]; $this->solution = [ 'accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AuthCallsIpAccessControlListMappingContext Context for this * AuthCallsIpAccessControlListMappingInstance */ protected function proxy(): AuthCallsIpAccessControlListMappingContext { if (!$this->context) { $this->context = new AuthCallsIpAccessControlListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AuthCallsIpAccessControlListMappingInstance * * @return AuthCallsIpAccessControlListMappingInstance Fetched * AuthCallsIpAccessControlListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthCallsIpAccessControlListMappingInstance { return $this->proxy()->fetch(); } /** * Delete the AuthCallsIpAccessControlListMappingInstance * * @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.Api.V2010.AuthCallsIpAccessControlListMappingInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingInstance.php 0000644 00000010242 15111164062 0025477 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $friendlyName * @property string $sid */ class AuthCallsCredentialListMappingInstance extends InstanceResource { /** * Initialize the AuthCallsCredentialListMappingInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $domainSid The unique string that identifies the resource * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $domainSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), ]; $this->solution = [ 'accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AuthCallsCredentialListMappingContext Context for this * AuthCallsCredentialListMappingInstance */ protected function proxy(): AuthCallsCredentialListMappingContext { if (!$this->context) { $this->context = new AuthCallsCredentialListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AuthCallsCredentialListMappingInstance * * @return AuthCallsCredentialListMappingInstance Fetched * AuthCallsCredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthCallsCredentialListMappingInstance { return $this->proxy()->fetch(); } /** * Delete the AuthCallsCredentialListMappingInstance * * @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.Api.V2010.AuthCallsCredentialListMappingInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsInstance.php 0000644 00000003314 15111164062 0017456 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; class AuthTypeCallsInstance extends InstanceResource { /** * Initialize the AuthTypeCallsInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $domainSid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $domainSid) { parent::__construct($version); $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; } /** * 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.Api.V2010.AuthTypeCallsInstance]'; } } V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsList.php 0000644 00000007650 15111164062 0016634 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsCredentialListMappingList; use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsIpAccessControlListMappingList; use Twilio\Version; /** * @property AuthCallsCredentialListMappingList $credentialListMappings * @property AuthCallsIpAccessControlListMappingList $ipAccessControlListMappings * @method \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsCredentialListMappingContext credentialListMappings(string $sid) * @method \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsIpAccessControlListMappingContext ipAccessControlListMappings(string $sid) */ class AuthTypeCallsList extends ListResource { protected $_credentialListMappings = null; protected $_ipAccessControlListMappings = null; /** * Construct the AuthTypeCallsList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $domainSid The unique string that identifies the resource */ public function __construct(Version $version, string $accountSid, string $domainSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; } /** * Access the credentialListMappings */ protected function getCredentialListMappings(): AuthCallsCredentialListMappingList { if (!$this->_credentialListMappings) { $this->_credentialListMappings = new AuthCallsCredentialListMappingList( $this->version, $this->solution['accountSid'], $this->solution['domainSid'] ); } return $this->_credentialListMappings; } /** * Access the ipAccessControlListMappings */ protected function getIpAccessControlListMappings(): AuthCallsIpAccessControlListMappingList { if (!$this->_ipAccessControlListMappings) { $this->_ipAccessControlListMappings = new AuthCallsIpAccessControlListMappingList( $this->version, $this->solution['accountSid'], $this->solution['domainSid'] ); } return $this->_ipAccessControlListMappings; } /** * 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.Api.V2010.AuthTypeCallsList]'; } } V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsPage.php 0000644 00000002516 15111164063 0016572 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class AuthTypeCallsPage 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 AuthTypeCallsInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCallsInstance */ public function buildInstance(array $payload): AuthTypeCallsInstance { return new AuthTypeCallsInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthTypeCallsPage]'; } } Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingPage.php 0000644 00000003020 15111164063 0030123 0 ustar 00 V2010 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class AuthRegistrationsCredentialListMappingPage 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 AuthRegistrationsCredentialListMappingInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations\AuthRegistrationsCredentialListMappingInstance */ public function buildInstance(array $payload): AuthRegistrationsCredentialListMappingInstance { return new AuthRegistrationsCredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthRegistrationsCredentialListMappingPage]'; } } Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingInstance.php 0000644 00000010432 15111164063 0031020 0 ustar 00 V2010/Account <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $friendlyName * @property string $sid */ class AuthRegistrationsCredentialListMappingInstance extends InstanceResource { /** * Initialize the AuthRegistrationsCredentialListMappingInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $domainSid The unique string that identifies the resource * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $domainSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), ]; $this->solution = [ 'accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AuthRegistrationsCredentialListMappingContext Context for this * AuthRegistrationsCredentialListMappingInstance */ protected function proxy(): AuthRegistrationsCredentialListMappingContext { if (!$this->context) { $this->context = new AuthRegistrationsCredentialListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AuthRegistrationsCredentialListMappingInstance * * @return AuthRegistrationsCredentialListMappingInstance Fetched * AuthRegistrationsCredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthRegistrationsCredentialListMappingInstance { return $this->proxy()->fetch(); } /** * Delete the AuthRegistrationsCredentialListMappingInstance * * @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.Api.V2010.AuthRegistrationsCredentialListMappingInstance ' . \implode(' ', $context) . ']'; } } Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingContext.php0000644 00000005303 15111164064 0030702 0 ustar 00 V2010 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; class AuthRegistrationsCredentialListMappingContext extends InstanceContext { /** * Initialize the AuthRegistrationsCredentialListMappingContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $domainSid The SID of the SIP domain that contains the * resource to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $domainSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Registrations/CredentialListMappings/' . \rawurlencode($sid) . '.json'; } /** * Fetch the AuthRegistrationsCredentialListMappingInstance * * @return AuthRegistrationsCredentialListMappingInstance Fetched * AuthRegistrationsCredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthRegistrationsCredentialListMappingInstance { $payload = $this->version->fetch('GET', $this->uri); return new AuthRegistrationsCredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } /** * Delete the AuthRegistrationsCredentialListMappingInstance * * @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.Api.V2010.AuthRegistrationsCredentialListMappingContext ' . \implode(' ', $context) . ']'; } } Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingList.php 0000644 00000015331 15111164064 0030173 0 ustar 00 V2010 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class AuthRegistrationsCredentialListMappingList extends ListResource { /** * Construct the AuthRegistrationsCredentialListMappingList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $domainSid The unique string that identifies the resource */ public function __construct(Version $version, string $accountSid, string $domainSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Registrations/CredentialListMappings.json'; } /** * Create the AuthRegistrationsCredentialListMappingInstance * * @param string $credentialListSid The SID of the CredentialList resource to * map to the SIP domain * @return AuthRegistrationsCredentialListMappingInstance Created * AuthRegistrationsCredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $credentialListSid): AuthRegistrationsCredentialListMappingInstance { $data = Values::of(['CredentialListSid' => $credentialListSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AuthRegistrationsCredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Streams AuthRegistrationsCredentialListMappingInstance 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 AuthRegistrationsCredentialListMappingInstance 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 AuthRegistrationsCredentialListMappingInstance[] 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 AuthRegistrationsCredentialListMappingInstance * 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 AuthRegistrationsCredentialListMappingPage Page of * AuthRegistrationsCredentialListMappingInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AuthRegistrationsCredentialListMappingPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AuthRegistrationsCredentialListMappingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AuthRegistrationsCredentialListMappingInstance * records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AuthRegistrationsCredentialListMappingPage Page of * AuthRegistrationsCredentialListMappingInstance */ public function getPage(string $targetUrl): AuthRegistrationsCredentialListMappingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AuthRegistrationsCredentialListMappingPage($this->version, $response, $this->solution); } /** * Constructs a AuthRegistrationsCredentialListMappingContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): AuthRegistrationsCredentialListMappingContext { return new AuthRegistrationsCredentialListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthRegistrationsCredentialListMappingList]'; } } V2010/Account/Sip/Domain/IpAccessControlListMappingContext.php 0000644 00000005053 15111164064 0020075 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; class IpAccessControlListMappingContext extends InstanceContext { /** * Initialize the IpAccessControlListMappingContext * * @param Version $version Version that contains the resource * @param string $accountSid The unique id of the Account that is responsible * for this resource. * @param string $domainSid A string that uniquely identifies the SIP Domain * @param string $sid A 34 character string that uniquely identifies the * resource to fetch. */ public function __construct(Version $version, $accountSid, $domainSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/IpAccessControlListMappings/' . \rawurlencode($sid) . '.json'; } /** * Fetch the IpAccessControlListMappingInstance * * @return IpAccessControlListMappingInstance Fetched * IpAccessControlListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpAccessControlListMappingInstance { $payload = $this->version->fetch('GET', $this->uri); return new IpAccessControlListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } /** * Delete the IpAccessControlListMappingInstance * * @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.Api.V2010.IpAccessControlListMappingContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/Domain/AuthTypesInstance.php 0000644 00000003266 15111164064 0014744 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; class AuthTypesInstance extends InstanceResource { /** * Initialize the AuthTypesInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $domainSid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $domainSid) { parent::__construct($version); $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; } /** * 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.Api.V2010.AuthTypesInstance]'; } } V2010/Account/Sip/Domain/IpAccessControlListMappingInstance.php 0000644 00000010631 15111164065 0020214 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $domainSid * @property string $friendlyName * @property string $sid * @property string $uri */ class IpAccessControlListMappingInstance extends InstanceResource { /** * Initialize the IpAccessControlListMappingInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The unique id of the Account that is responsible * for this resource. * @param string $domainSid The unique string that identifies the SipDomain * resource. * @param string $sid A 34 character string that uniquely identifies the * resource to fetch. */ public function __construct(Version $version, array $payload, string $accountSid, string $domainSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'domainSid' => Values::array_get($payload, 'domain_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return IpAccessControlListMappingContext Context for this * IpAccessControlListMappingInstance */ protected function proxy(): IpAccessControlListMappingContext { if (!$this->context) { $this->context = new IpAccessControlListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the IpAccessControlListMappingInstance * * @return IpAccessControlListMappingInstance Fetched * IpAccessControlListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpAccessControlListMappingInstance { return $this->proxy()->fetch(); } /** * Delete the IpAccessControlListMappingInstance * * @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.Api.V2010.IpAccessControlListMappingInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/Domain/CredentialListMappingContext.php 0000644 00000004630 15111164065 0017115 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; class CredentialListMappingContext extends InstanceContext { /** * Initialize the CredentialListMappingContext * * @param Version $version Version that contains the resource * @param string $accountSid The unique sid that identifies this account * @param string $domainSid A string that identifies the SIP Domain that * includes the resource to fetch * @param string $sid A string that identifies the resource to fetch */ public function __construct(Version $version, $accountSid, $domainSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/CredentialListMappings/' . \rawurlencode($sid) . '.json'; } /** * Fetch the CredentialListMappingInstance * * @return CredentialListMappingInstance Fetched CredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialListMappingInstance { $payload = $this->version->fetch('GET', $this->uri); return new CredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } /** * Delete the CredentialListMappingInstance * * @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.Api.V2010.CredentialListMappingContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Sip/Domain/IpAccessControlListMappingList.php 0000644 00000015016 15111164065 0017365 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class IpAccessControlListMappingList extends ListResource { /** * Construct the IpAccessControlListMappingList * * @param Version $version Version that contains the resource * @param string $accountSid The unique id of the Account that is responsible * for this resource. * @param string $domainSid The unique string that identifies the SipDomain * resource. */ public function __construct(Version $version, string $accountSid, string $domainSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/IpAccessControlListMappings.json'; } /** * Create the IpAccessControlListMappingInstance * * @param string $ipAccessControlListSid The unique id of the IP access control * list to map to the SIP domain * @return IpAccessControlListMappingInstance Created * IpAccessControlListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $ipAccessControlListSid): IpAccessControlListMappingInstance { $data = Values::of(['IpAccessControlListSid' => $ipAccessControlListSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new IpAccessControlListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Streams IpAccessControlListMappingInstance 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 IpAccessControlListMappingInstance 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 IpAccessControlListMappingInstance[] 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 IpAccessControlListMappingInstance 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 IpAccessControlListMappingPage Page of * IpAccessControlListMappingInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): IpAccessControlListMappingPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new IpAccessControlListMappingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of IpAccessControlListMappingInstance records from * the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return IpAccessControlListMappingPage Page of * IpAccessControlListMappingInstance */ public function getPage(string $targetUrl): IpAccessControlListMappingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new IpAccessControlListMappingPage($this->version, $response, $this->solution); } /** * Constructs a IpAccessControlListMappingContext * * @param string $sid A 34 character string that uniquely identifies the * resource to fetch. */ public function getContext(string $sid): IpAccessControlListMappingContext { return new IpAccessControlListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.IpAccessControlListMappingList]'; } } V2010/Account/Sip/Domain/CredentialListMappingPage.php 0000644 00000002552 15111164065 0016346 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class CredentialListMappingPage 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 CredentialListMappingInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingInstance */ public function buildInstance(array $payload): CredentialListMappingInstance { return new CredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.CredentialListMappingPage]'; } } V2010/Account/Sip/Domain/AuthTypesList.php 0000644 00000006351 15111164066 0014113 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCallsList; use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrationsList; use Twilio\Version; /** * @property AuthTypeCallsList $calls * @property AuthTypeRegistrationsList $registrations */ class AuthTypesList extends ListResource { protected $_calls = null; protected $_registrations = null; /** * Construct the AuthTypesList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $domainSid The unique string that identifies the resource */ public function __construct(Version $version, string $accountSid, string $domainSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; } /** * Access the calls */ protected function getCalls(): AuthTypeCallsList { if (!$this->_calls) { $this->_calls = new AuthTypeCallsList( $this->version, $this->solution['accountSid'], $this->solution['domainSid'] ); } return $this->_calls; } /** * Access the registrations */ protected function getRegistrations(): AuthTypeRegistrationsList { if (!$this->_registrations) { $this->_registrations = new AuthTypeRegistrationsList( $this->version, $this->solution['accountSid'], $this->solution['domainSid'] ); } return $this->_registrations; } /** * 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.Api.V2010.AuthTypesList]'; } } V2010/Account/Sip/Domain/IpAccessControlListMappingPage.php 0000644 00000002610 15111164066 0017323 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class IpAccessControlListMappingPage 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 IpAccessControlListMappingInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingInstance */ public function buildInstance(array $payload): IpAccessControlListMappingInstance { return new IpAccessControlListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.IpAccessControlListMappingPage]'; } } V2010/Account/Sip/Domain/AuthTypesPage.php 0000644 00000002442 15111164066 0014051 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class AuthTypesPage 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 AuthTypesInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypesInstance */ public function buildInstance(array $payload): AuthTypesInstance { return new AuthTypesInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthTypesPage]'; } } V2010/Account/Sip/Domain/CredentialListMappingList.php 0000644 00000014273 15111164067 0016412 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip\Domain; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class CredentialListMappingList extends ListResource { /** * Construct the CredentialListMappingList * * @param Version $version Version that contains the resource * @param string $accountSid The unique id of the Account that is responsible * for this resource. * @param string $domainSid The unique string that identifies the SipDomain * resource. */ public function __construct(Version $version, string $accountSid, string $domainSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/CredentialListMappings.json'; } /** * Create the CredentialListMappingInstance * * @param string $credentialListSid A string that identifies the CredentialList * resource to map to the SIP domain * @return CredentialListMappingInstance Created CredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $credentialListSid): CredentialListMappingInstance { $data = Values::of(['CredentialListSid' => $credentialListSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Streams CredentialListMappingInstance 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 CredentialListMappingInstance 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 CredentialListMappingInstance[] 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 CredentialListMappingInstance 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 CredentialListMappingPage Page of CredentialListMappingInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CredentialListMappingPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CredentialListMappingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CredentialListMappingInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CredentialListMappingPage Page of CredentialListMappingInstance */ public function getPage(string $targetUrl): CredentialListMappingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CredentialListMappingPage($this->version, $response, $this->solution); } /** * Constructs a CredentialListMappingContext * * @param string $sid A string that identifies the resource to fetch */ public function getContext(string $sid): CredentialListMappingContext { return new CredentialListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.CredentialListMappingList]'; } } V2010/Account/Sip/DomainList.php 0000644 00000014507 15111164067 0012170 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sip; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class DomainList extends ListResource { /** * Construct the DomainList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains.json'; } /** * Streams DomainInstance 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 DomainInstance 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 DomainInstance[] 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 DomainInstance 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 DomainPage Page of DomainInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DomainPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DomainPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DomainInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DomainPage Page of DomainInstance */ public function getPage(string $targetUrl): DomainPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DomainPage($this->version, $response, $this->solution); } /** * Create the DomainInstance * * @param string $domainName The unique address on Twilio to route SIP traffic * @param array|Options $options Optional Arguments * @return DomainInstance Created DomainInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $domainName, array $options = []): DomainInstance { $options = new Values($options); $data = Values::of([ 'DomainName' => $domainName, 'FriendlyName' => $options['friendlyName'], 'VoiceUrl' => $options['voiceUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'VoiceStatusCallbackUrl' => $options['voiceStatusCallbackUrl'], 'VoiceStatusCallbackMethod' => $options['voiceStatusCallbackMethod'], 'SipRegistration' => Serialize::booleanToString($options['sipRegistration']), 'EmergencyCallingEnabled' => Serialize::booleanToString($options['emergencyCallingEnabled']), 'Secure' => Serialize::booleanToString($options['secure']), 'ByocTrunkSid' => $options['byocTrunkSid'], 'EmergencyCallerSid' => $options['emergencyCallerSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new DomainInstance($this->version, $payload, $this->solution['accountSid']); } /** * Constructs a DomainContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): DomainContext { return new DomainContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.DomainList]'; } } V2010/Account/ConferenceInstance.php 0000644 00000011657 15111164067 0013131 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\Conference\ParticipantList; use Twilio\Rest\Api\V2010\Account\Conference\RecordingList; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $apiVersion * @property string $friendlyName * @property string $region * @property string $sid * @property string $status * @property string $uri * @property array $subresourceUris * @property string $reasonConferenceEnded * @property string $callSidEndingConference */ class ConferenceInstance extends InstanceResource { protected $_participants; protected $_recordings; /** * Initialize the ConferenceInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created this resource * @param string $sid The unique string that identifies this resource */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'apiVersion' => Values::array_get($payload, 'api_version'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'region' => Values::array_get($payload, 'region'), 'sid' => Values::array_get($payload, 'sid'), 'status' => Values::array_get($payload, 'status'), 'uri' => Values::array_get($payload, 'uri'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'reasonConferenceEnded' => Values::array_get($payload, 'reason_conference_ended'), 'callSidEndingConference' => Values::array_get($payload, 'call_sid_ending_conference'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ConferenceContext Context for this ConferenceInstance */ protected function proxy(): ConferenceContext { if (!$this->context) { $this->context = new ConferenceContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ConferenceInstance * * @return ConferenceInstance Fetched ConferenceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConferenceInstance { return $this->proxy()->fetch(); } /** * Update the ConferenceInstance * * @param array|Options $options Optional Arguments * @return ConferenceInstance Updated ConferenceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConferenceInstance { return $this->proxy()->update($options); } /** * Access the participants */ protected function getParticipants(): ParticipantList { return $this->proxy()->participants; } /** * Access the recordings */ protected function getRecordings(): RecordingList { return $this->proxy()->recordings; } /** * 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.Api.V2010.ConferenceInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/ValidationRequestInstance.php 0000644 00000004254 15111164070 0014512 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $callSid * @property string $friendlyName * @property string $phoneNumber * @property string $validationCode */ class ValidationRequestInstance extends InstanceResource { /** * Initialize the ValidationRequestInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'validationCode' => Values::array_get($payload, 'validation_code'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.ValidationRequestInstance]'; } } V2010/Account/UsagePage.php 0000644 00000002234 15111164070 0011217 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class UsagePage 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 UsageInstance \Twilio\Rest\Api\V2010\Account\UsageInstance */ public function buildInstance(array $payload): UsageInstance { return new UsageInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.UsagePage]'; } } V2010/Account/ApplicationContext.php 0000644 00000007445 15111164070 0013177 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Serialize; use Twilio\Values; use Twilio\Version; class ApplicationContext extends InstanceContext { /** * Initialize the ApplicationContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Applications/' . \rawurlencode($sid) . '.json'; } /** * Delete the ApplicationInstance * * @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); } /** * Fetch the ApplicationInstance * * @return ApplicationInstance Fetched ApplicationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ApplicationInstance { $payload = $this->version->fetch('GET', $this->uri); return new ApplicationInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the ApplicationInstance * * @param array|Options $options Optional Arguments * @return ApplicationInstance Updated ApplicationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ApplicationInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'ApiVersion' => $options['apiVersion'], 'VoiceUrl' => $options['voiceUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']), 'SmsUrl' => $options['smsUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'SmsStatusCallback' => $options['smsStatusCallback'], 'MessageStatusCallback' => $options['messageStatusCallback'], 'PublicApplicationConnectEnabled' => Serialize::booleanToString($options['publicApplicationConnectEnabled']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ApplicationInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * 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.Api.V2010.ApplicationContext ' . \implode(' ', $context) . ']'; } } V2010/Account/IncomingPhoneNumberContext.php 0000644 00000014003 15111164071 0014627 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnList; use Twilio\Serialize; use Twilio\Values; use Twilio\Version; /** * @property AssignedAddOnList $assignedAddOns * @method \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnContext assignedAddOns(string $sid) */ class IncomingPhoneNumberContext extends InstanceContext { protected $_assignedAddOns; /** * Initialize the IncomingPhoneNumberContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . \rawurlencode($sid) . '.json'; } /** * Update the IncomingPhoneNumberInstance * * @param array|Options $options Optional Arguments * @return IncomingPhoneNumberInstance Updated IncomingPhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): IncomingPhoneNumberInstance { $options = new Values($options); $data = Values::of([ 'AccountSid' => $options['accountSid'], 'ApiVersion' => $options['apiVersion'], 'FriendlyName' => $options['friendlyName'], 'SmsApplicationSid' => $options['smsApplicationSid'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsUrl' => $options['smsUrl'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'VoiceApplicationSid' => $options['voiceApplicationSid'], 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']), 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceUrl' => $options['voiceUrl'], 'EmergencyStatus' => $options['emergencyStatus'], 'EmergencyAddressSid' => $options['emergencyAddressSid'], 'TrunkSid' => $options['trunkSid'], 'VoiceReceiveMode' => $options['voiceReceiveMode'], 'IdentitySid' => $options['identitySid'], 'AddressSid' => $options['addressSid'], 'BundleSid' => $options['bundleSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new IncomingPhoneNumberInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Fetch the IncomingPhoneNumberInstance * * @return IncomingPhoneNumberInstance Fetched IncomingPhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IncomingPhoneNumberInstance { $payload = $this->version->fetch('GET', $this->uri); return new IncomingPhoneNumberInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the IncomingPhoneNumberInstance * * @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); } /** * Access the assignedAddOns */ protected function getAssignedAddOns(): AssignedAddOnList { if (!$this->_assignedAddOns) { $this->_assignedAddOns = new AssignedAddOnList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_assignedAddOns; } /** * 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.Api.V2010.IncomingPhoneNumberContext ' . \implode(' ', $context) . ']'; } } V2010/Account/AvailablePhoneNumberCountryList.php 0000644 00000012620 15111164071 0015622 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class AvailablePhoneNumberCountryList extends ListResource { /** * Construct the AvailablePhoneNumberCountryList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers.json'; } /** * Streams AvailablePhoneNumberCountryInstance 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 AvailablePhoneNumberCountryInstance 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 AvailablePhoneNumberCountryInstance[] 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 AvailablePhoneNumberCountryInstance 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 AvailablePhoneNumberCountryPage Page of * AvailablePhoneNumberCountryInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AvailablePhoneNumberCountryPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AvailablePhoneNumberCountryPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AvailablePhoneNumberCountryInstance records from * the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AvailablePhoneNumberCountryPage Page of * AvailablePhoneNumberCountryInstance */ public function getPage(string $targetUrl): AvailablePhoneNumberCountryPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AvailablePhoneNumberCountryPage($this->version, $response, $this->solution); } /** * Constructs a AvailablePhoneNumberCountryContext * * @param string $countryCode The ISO country code of the country to fetch * available phone number information about */ public function getContext(string $countryCode): AvailablePhoneNumberCountryContext { return new AvailablePhoneNumberCountryContext( $this->version, $this->solution['accountSid'], $countryCode ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AvailablePhoneNumberCountryList]'; } } V2010/Account/AvailablePhoneNumberCountry/LocalPage.php 0000644 00000002456 15111164072 0016624 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class LocalPage 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 LocalInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\LocalInstance */ public function buildInstance(array $payload): LocalInstance { return new LocalInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.LocalPage]'; } } V2010/Account/AvailablePhoneNumberCountry/LocalList.php 0000644 00000014237 15111164072 0016663 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class LocalList extends ListResource { /** * Construct the LocalList * * @param Version $version Version that contains the resource * @param string $accountSid The account_sid * @param string $countryCode The ISO-3166-1 country code of the country. */ public function __construct(Version $version, string $accountSid, string $countryCode) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/Local.json'; } /** * Streams LocalInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads LocalInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 LocalInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of LocalInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 LocalPage Page of LocalInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): LocalPage { $options = new Values($options); $params = Values::of([ 'AreaCode' => $options['areaCode'], 'Contains' => $options['contains'], 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']), 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']), 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']), 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']), 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']), 'Beta' => Serialize::booleanToString($options['beta']), 'NearNumber' => $options['nearNumber'], 'NearLatLong' => $options['nearLatLong'], 'Distance' => $options['distance'], 'InPostalCode' => $options['inPostalCode'], 'InRegion' => $options['inRegion'], 'InRateCenter' => $options['inRateCenter'], 'InLata' => $options['inLata'], 'InLocality' => $options['inLocality'], 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new LocalPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of LocalInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return LocalPage Page of LocalInstance */ public function getPage(string $targetUrl): LocalPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new LocalPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.LocalList]'; } } V2010/Account/AvailablePhoneNumberCountry/LocalInstance.php 0000644 00000006033 15111164072 0017507 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $friendlyName * @property string $phoneNumber * @property string $lata * @property string $locality * @property string $rateCenter * @property string $latitude * @property string $longitude * @property string $region * @property string $postalCode * @property string $isoCountry * @property string $addressRequirements * @property bool $beta * @property string $capabilities */ class LocalInstance extends InstanceResource { /** * Initialize the LocalInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The account_sid * @param string $countryCode The ISO-3166-1 country code of the country. */ public function __construct(Version $version, array $payload, string $accountSid, string $countryCode) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'lata' => Values::array_get($payload, 'lata'), 'locality' => Values::array_get($payload, 'locality'), 'rateCenter' => Values::array_get($payload, 'rate_center'), 'latitude' => Values::array_get($payload, 'latitude'), 'longitude' => Values::array_get($payload, 'longitude'), 'region' => Values::array_get($payload, 'region'), 'postalCode' => Values::array_get($payload, 'postal_code'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), ]; $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; } /** * 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.Api.V2010.LocalInstance]'; } } V2010/Account/AvailablePhoneNumberCountry/NationalPage.php 0000644 00000002500 15111164073 0017326 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class NationalPage 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 NationalInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\NationalInstance */ public function buildInstance(array $payload): NationalInstance { return new NationalInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NationalPage]'; } } V2010/Account/AvailablePhoneNumberCountry/MachineToMachinePage.php 0000644 00000002560 15111164073 0020723 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class MachineToMachinePage 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 MachineToMachineInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MachineToMachineInstance */ public function buildInstance(array $payload): MachineToMachineInstance { return new MachineToMachineInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MachineToMachinePage]'; } } V2010/Account/AvailablePhoneNumberCountry/TollFreePage.php 0000644 00000002500 15111164074 0017276 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class TollFreePage 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 TollFreeInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\TollFreeInstance */ public function buildInstance(array $payload): TollFreeInstance { return new TollFreeInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TollFreePage]'; } } V2010/Account/AvailablePhoneNumberCountry/MobileList.php 0000644 00000014260 15111164074 0017036 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class MobileList extends ListResource { /** * Construct the MobileList * * @param Version $version Version that contains the resource * @param string $accountSid The account_sid * @param string $countryCode The ISO-3166-1 country code of the country. */ public function __construct(Version $version, string $accountSid, string $countryCode) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/Mobile.json'; } /** * Streams MobileInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MobileInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 MobileInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MobileInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 MobilePage Page of MobileInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MobilePage { $options = new Values($options); $params = Values::of([ 'AreaCode' => $options['areaCode'], 'Contains' => $options['contains'], 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']), 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']), 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']), 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']), 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']), 'Beta' => Serialize::booleanToString($options['beta']), 'NearNumber' => $options['nearNumber'], 'NearLatLong' => $options['nearLatLong'], 'Distance' => $options['distance'], 'InPostalCode' => $options['inPostalCode'], 'InRegion' => $options['inRegion'], 'InRateCenter' => $options['inRateCenter'], 'InLata' => $options['inLata'], 'InLocality' => $options['inLocality'], 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MobilePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MobileInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MobilePage Page of MobileInstance */ public function getPage(string $targetUrl): MobilePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MobilePage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MobileList]'; } } V2010/Account/AvailablePhoneNumberCountry/VoipList.php 0000644 00000014216 15111164074 0016545 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class VoipList extends ListResource { /** * Construct the VoipList * * @param Version $version Version that contains the resource * @param string $accountSid The account_sid * @param string $countryCode The ISO-3166-1 country code of the country. */ public function __construct(Version $version, string $accountSid, string $countryCode) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/Voip.json'; } /** * Streams VoipInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads VoipInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 VoipInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of VoipInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 VoipPage Page of VoipInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): VoipPage { $options = new Values($options); $params = Values::of([ 'AreaCode' => $options['areaCode'], 'Contains' => $options['contains'], 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']), 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']), 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']), 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']), 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']), 'Beta' => Serialize::booleanToString($options['beta']), 'NearNumber' => $options['nearNumber'], 'NearLatLong' => $options['nearLatLong'], 'Distance' => $options['distance'], 'InPostalCode' => $options['inPostalCode'], 'InRegion' => $options['inRegion'], 'InRateCenter' => $options['inRateCenter'], 'InLata' => $options['inLata'], 'InLocality' => $options['inLocality'], 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new VoipPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of VoipInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return VoipPage Page of VoipInstance */ public function getPage(string $targetUrl): VoipPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new VoipPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.VoipList]'; } } V2010/Account/AvailablePhoneNumberCountry/NationalInstance.php 0000644 00000006044 15111164074 0020226 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $friendlyName * @property string $phoneNumber * @property string $lata * @property string $locality * @property string $rateCenter * @property string $latitude * @property string $longitude * @property string $region * @property string $postalCode * @property string $isoCountry * @property string $addressRequirements * @property bool $beta * @property string $capabilities */ class NationalInstance extends InstanceResource { /** * Initialize the NationalInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The account_sid * @param string $countryCode The ISO-3166-1 country code of the country. */ public function __construct(Version $version, array $payload, string $accountSid, string $countryCode) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'lata' => Values::array_get($payload, 'lata'), 'locality' => Values::array_get($payload, 'locality'), 'rateCenter' => Values::array_get($payload, 'rate_center'), 'latitude' => Values::array_get($payload, 'latitude'), 'longitude' => Values::array_get($payload, 'longitude'), 'region' => Values::array_get($payload, 'region'), 'postalCode' => Values::array_get($payload, 'postal_code'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), ]; $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; } /** * 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.Api.V2010.NationalInstance]'; } } V2010/Account/AvailablePhoneNumberCountry/MachineToMachineOptions.php 0000644 00000041047 15111164075 0021507 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Options; use Twilio\Values; abstract class MachineToMachineOptions { /** * @param int $areaCode The area code of the phone numbers to read * @param string $contains The pattern on which to match phone numbers * @param bool $smsEnabled Whether the phone numbers can receive text messages * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @param bool $beta Whether to read phone numbers new to the Twilio platform * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @param string $inLocality Limit results to a particular locality * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return ReadMachineToMachineOptions Options builder */ public static function read(int $areaCode = Values::NONE, string $contains = Values::NONE, bool $smsEnabled = Values::NONE, bool $mmsEnabled = Values::NONE, bool $voiceEnabled = Values::NONE, bool $excludeAllAddressRequired = Values::NONE, bool $excludeLocalAddressRequired = Values::NONE, bool $excludeForeignAddressRequired = Values::NONE, bool $beta = Values::NONE, string $nearNumber = Values::NONE, string $nearLatLong = Values::NONE, int $distance = Values::NONE, string $inPostalCode = Values::NONE, string $inRegion = Values::NONE, string $inRateCenter = Values::NONE, string $inLata = Values::NONE, string $inLocality = Values::NONE, bool $faxEnabled = Values::NONE): ReadMachineToMachineOptions { return new ReadMachineToMachineOptions($areaCode, $contains, $smsEnabled, $mmsEnabled, $voiceEnabled, $excludeAllAddressRequired, $excludeLocalAddressRequired, $excludeForeignAddressRequired, $beta, $nearNumber, $nearLatLong, $distance, $inPostalCode, $inRegion, $inRateCenter, $inLata, $inLocality, $faxEnabled); } } class ReadMachineToMachineOptions extends Options { /** * @param int $areaCode The area code of the phone numbers to read * @param string $contains The pattern on which to match phone numbers * @param bool $smsEnabled Whether the phone numbers can receive text messages * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @param bool $beta Whether to read phone numbers new to the Twilio platform * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @param string $inLocality Limit results to a particular locality * @param bool $faxEnabled Whether the phone numbers can receive faxes */ public function __construct(int $areaCode = Values::NONE, string $contains = Values::NONE, bool $smsEnabled = Values::NONE, bool $mmsEnabled = Values::NONE, bool $voiceEnabled = Values::NONE, bool $excludeAllAddressRequired = Values::NONE, bool $excludeLocalAddressRequired = Values::NONE, bool $excludeForeignAddressRequired = Values::NONE, bool $beta = Values::NONE, string $nearNumber = Values::NONE, string $nearLatLong = Values::NONE, int $distance = Values::NONE, string $inPostalCode = Values::NONE, string $inRegion = Values::NONE, string $inRateCenter = Values::NONE, string $inLata = Values::NONE, string $inLocality = Values::NONE, bool $faxEnabled = Values::NONE) { $this->options['areaCode'] = $areaCode; $this->options['contains'] = $contains; $this->options['smsEnabled'] = $smsEnabled; $this->options['mmsEnabled'] = $mmsEnabled; $this->options['voiceEnabled'] = $voiceEnabled; $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; $this->options['beta'] = $beta; $this->options['nearNumber'] = $nearNumber; $this->options['nearLatLong'] = $nearLatLong; $this->options['distance'] = $distance; $this->options['inPostalCode'] = $inPostalCode; $this->options['inRegion'] = $inRegion; $this->options['inRateCenter'] = $inRateCenter; $this->options['inLata'] = $inLata; $this->options['inLocality'] = $inLocality; $this->options['faxEnabled'] = $faxEnabled; } /** * The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. * * @param int $areaCode The area code of the phone numbers to read * @return $this Fluent Builder */ public function setAreaCode(int $areaCode): self { $this->options['areaCode'] = $areaCode; return $this; } /** * The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. * * @param string $contains The pattern on which to match phone numbers * @return $this Fluent Builder */ public function setContains(string $contains): self { $this->options['contains'] = $contains; return $this; } /** * Whether the phone numbers can receive text messages. Can be: `true` or `false`. * * @param bool $smsEnabled Whether the phone numbers can receive text messages * @return $this Fluent Builder */ public function setSmsEnabled(bool $smsEnabled): self { $this->options['smsEnabled'] = $smsEnabled; return $this; } /** * Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. * * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @return $this Fluent Builder */ public function setMmsEnabled(bool $mmsEnabled): self { $this->options['mmsEnabled'] = $mmsEnabled; return $this; } /** * Whether the phone numbers can receive calls. Can be: `true` or `false`. * * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @return $this Fluent Builder */ public function setVoiceEnabled(bool $voiceEnabled): self { $this->options['voiceEnabled'] = $voiceEnabled; return $this; } /** * Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @return $this Fluent Builder */ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self { $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @return $this Fluent Builder */ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self { $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @return $this Fluent Builder */ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self { $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; return $this; } /** * Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to read phone numbers new to the Twilio platform * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. * * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearNumber(string $nearNumber): self { $this->options['nearNumber'] = $nearNumber; return $this; } /** * Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. * * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearLatLong(string $nearLatLong): self { $this->options['nearLatLong'] = $nearLatLong; return $this; } /** * The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. * * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @return $this Fluent Builder */ public function setDistance(int $distance): self { $this->options['distance'] = $distance; return $this; } /** * Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. * * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @return $this Fluent Builder */ public function setInPostalCode(string $inPostalCode): self { $this->options['inPostalCode'] = $inPostalCode; return $this; } /** * Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. * * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @return $this Fluent Builder */ public function setInRegion(string $inRegion): self { $this->options['inRegion'] = $inRegion; return $this; } /** * Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. * * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @return $this Fluent Builder */ public function setInRateCenter(string $inRateCenter): self { $this->options['inRateCenter'] = $inRateCenter; return $this; } /** * Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. * * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @return $this Fluent Builder */ public function setInLata(string $inLata): self { $this->options['inLata'] = $inLata; return $this; } /** * Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. * * @param string $inLocality Limit results to a particular locality * @return $this Fluent Builder */ public function setInLocality(string $inLocality): self { $this->options['inLocality'] = $inLocality; return $this; } /** * Whether the phone numbers can receive faxes. Can be: `true` or `false`. * * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return $this Fluent Builder */ public function setFaxEnabled(bool $faxEnabled): self { $this->options['faxEnabled'] = $faxEnabled; 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.Api.V2010.ReadMachineToMachineOptions ' . $options . ']'; } } V2010/Account/AvailablePhoneNumberCountry/SharedCostOptions.php 0000644 00000041003 15111164076 0020403 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Options; use Twilio\Values; abstract class SharedCostOptions { /** * @param int $areaCode The area code of the phone numbers to read * @param string $contains The pattern on which to match phone numbers * @param bool $smsEnabled Whether the phone numbers can receive text messages * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @param bool $beta Whether to read phone numbers new to the Twilio platform * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @param string $inLocality Limit results to a particular locality * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return ReadSharedCostOptions Options builder */ public static function read(int $areaCode = Values::NONE, string $contains = Values::NONE, bool $smsEnabled = Values::NONE, bool $mmsEnabled = Values::NONE, bool $voiceEnabled = Values::NONE, bool $excludeAllAddressRequired = Values::NONE, bool $excludeLocalAddressRequired = Values::NONE, bool $excludeForeignAddressRequired = Values::NONE, bool $beta = Values::NONE, string $nearNumber = Values::NONE, string $nearLatLong = Values::NONE, int $distance = Values::NONE, string $inPostalCode = Values::NONE, string $inRegion = Values::NONE, string $inRateCenter = Values::NONE, string $inLata = Values::NONE, string $inLocality = Values::NONE, bool $faxEnabled = Values::NONE): ReadSharedCostOptions { return new ReadSharedCostOptions($areaCode, $contains, $smsEnabled, $mmsEnabled, $voiceEnabled, $excludeAllAddressRequired, $excludeLocalAddressRequired, $excludeForeignAddressRequired, $beta, $nearNumber, $nearLatLong, $distance, $inPostalCode, $inRegion, $inRateCenter, $inLata, $inLocality, $faxEnabled); } } class ReadSharedCostOptions extends Options { /** * @param int $areaCode The area code of the phone numbers to read * @param string $contains The pattern on which to match phone numbers * @param bool $smsEnabled Whether the phone numbers can receive text messages * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @param bool $beta Whether to read phone numbers new to the Twilio platform * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @param string $inLocality Limit results to a particular locality * @param bool $faxEnabled Whether the phone numbers can receive faxes */ public function __construct(int $areaCode = Values::NONE, string $contains = Values::NONE, bool $smsEnabled = Values::NONE, bool $mmsEnabled = Values::NONE, bool $voiceEnabled = Values::NONE, bool $excludeAllAddressRequired = Values::NONE, bool $excludeLocalAddressRequired = Values::NONE, bool $excludeForeignAddressRequired = Values::NONE, bool $beta = Values::NONE, string $nearNumber = Values::NONE, string $nearLatLong = Values::NONE, int $distance = Values::NONE, string $inPostalCode = Values::NONE, string $inRegion = Values::NONE, string $inRateCenter = Values::NONE, string $inLata = Values::NONE, string $inLocality = Values::NONE, bool $faxEnabled = Values::NONE) { $this->options['areaCode'] = $areaCode; $this->options['contains'] = $contains; $this->options['smsEnabled'] = $smsEnabled; $this->options['mmsEnabled'] = $mmsEnabled; $this->options['voiceEnabled'] = $voiceEnabled; $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; $this->options['beta'] = $beta; $this->options['nearNumber'] = $nearNumber; $this->options['nearLatLong'] = $nearLatLong; $this->options['distance'] = $distance; $this->options['inPostalCode'] = $inPostalCode; $this->options['inRegion'] = $inRegion; $this->options['inRateCenter'] = $inRateCenter; $this->options['inLata'] = $inLata; $this->options['inLocality'] = $inLocality; $this->options['faxEnabled'] = $faxEnabled; } /** * The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. * * @param int $areaCode The area code of the phone numbers to read * @return $this Fluent Builder */ public function setAreaCode(int $areaCode): self { $this->options['areaCode'] = $areaCode; return $this; } /** * The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. * * @param string $contains The pattern on which to match phone numbers * @return $this Fluent Builder */ public function setContains(string $contains): self { $this->options['contains'] = $contains; return $this; } /** * Whether the phone numbers can receive text messages. Can be: `true` or `false`. * * @param bool $smsEnabled Whether the phone numbers can receive text messages * @return $this Fluent Builder */ public function setSmsEnabled(bool $smsEnabled): self { $this->options['smsEnabled'] = $smsEnabled; return $this; } /** * Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. * * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @return $this Fluent Builder */ public function setMmsEnabled(bool $mmsEnabled): self { $this->options['mmsEnabled'] = $mmsEnabled; return $this; } /** * Whether the phone numbers can receive calls. Can be: `true` or `false`. * * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @return $this Fluent Builder */ public function setVoiceEnabled(bool $voiceEnabled): self { $this->options['voiceEnabled'] = $voiceEnabled; return $this; } /** * Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @return $this Fluent Builder */ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self { $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @return $this Fluent Builder */ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self { $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @return $this Fluent Builder */ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self { $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; return $this; } /** * Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to read phone numbers new to the Twilio platform * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. * * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearNumber(string $nearNumber): self { $this->options['nearNumber'] = $nearNumber; return $this; } /** * Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. * * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearLatLong(string $nearLatLong): self { $this->options['nearLatLong'] = $nearLatLong; return $this; } /** * The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. * * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @return $this Fluent Builder */ public function setDistance(int $distance): self { $this->options['distance'] = $distance; return $this; } /** * Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. * * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @return $this Fluent Builder */ public function setInPostalCode(string $inPostalCode): self { $this->options['inPostalCode'] = $inPostalCode; return $this; } /** * Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. * * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @return $this Fluent Builder */ public function setInRegion(string $inRegion): self { $this->options['inRegion'] = $inRegion; return $this; } /** * Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. * * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @return $this Fluent Builder */ public function setInRateCenter(string $inRateCenter): self { $this->options['inRateCenter'] = $inRateCenter; return $this; } /** * Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. * * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @return $this Fluent Builder */ public function setInLata(string $inLata): self { $this->options['inLata'] = $inLata; return $this; } /** * Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. * * @param string $inLocality Limit results to a particular locality * @return $this Fluent Builder */ public function setInLocality(string $inLocality): self { $this->options['inLocality'] = $inLocality; return $this; } /** * Whether the phone numbers can receive faxes. Can be: `true` or `false`. * * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return $this Fluent Builder */ public function setFaxEnabled(bool $faxEnabled): self { $this->options['faxEnabled'] = $faxEnabled; 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.Api.V2010.ReadSharedCostOptions ' . $options . ']'; } } V2010/Account/AvailablePhoneNumberCountry/VoipInstance.php 0000644 00000006030 15111164076 0017373 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $friendlyName * @property string $phoneNumber * @property string $lata * @property string $locality * @property string $rateCenter * @property string $latitude * @property string $longitude * @property string $region * @property string $postalCode * @property string $isoCountry * @property string $addressRequirements * @property bool $beta * @property string $capabilities */ class VoipInstance extends InstanceResource { /** * Initialize the VoipInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The account_sid * @param string $countryCode The ISO-3166-1 country code of the country. */ public function __construct(Version $version, array $payload, string $accountSid, string $countryCode) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'lata' => Values::array_get($payload, 'lata'), 'locality' => Values::array_get($payload, 'locality'), 'rateCenter' => Values::array_get($payload, 'rate_center'), 'latitude' => Values::array_get($payload, 'latitude'), 'longitude' => Values::array_get($payload, 'longitude'), 'region' => Values::array_get($payload, 'region'), 'postalCode' => Values::array_get($payload, 'postal_code'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), ]; $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; } /** * 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.Api.V2010.VoipInstance]'; } } V2010/Account/AvailablePhoneNumberCountry/SharedCostInstance.php 0000644 00000006052 15111164077 0020522 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $friendlyName * @property string $phoneNumber * @property string $lata * @property string $locality * @property string $rateCenter * @property string $latitude * @property string $longitude * @property string $region * @property string $postalCode * @property string $isoCountry * @property string $addressRequirements * @property bool $beta * @property string $capabilities */ class SharedCostInstance extends InstanceResource { /** * Initialize the SharedCostInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The account_sid * @param string $countryCode The ISO-3166-1 country code of the country. */ public function __construct(Version $version, array $payload, string $accountSid, string $countryCode) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'lata' => Values::array_get($payload, 'lata'), 'locality' => Values::array_get($payload, 'locality'), 'rateCenter' => Values::array_get($payload, 'rate_center'), 'latitude' => Values::array_get($payload, 'latitude'), 'longitude' => Values::array_get($payload, 'longitude'), 'region' => Values::array_get($payload, 'region'), 'postalCode' => Values::array_get($payload, 'postal_code'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), ]; $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; } /** * 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.Api.V2010.SharedCostInstance]'; } } V2010/Account/AvailablePhoneNumberCountry/MobileOptions.php 0000644 00000040753 15111164077 0017567 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Options; use Twilio\Values; abstract class MobileOptions { /** * @param int $areaCode The area code of the phone numbers to read * @param string $contains The pattern on which to match phone numbers * @param bool $smsEnabled Whether the phone numbers can receive text messages * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @param bool $beta Whether to read phone numbers new to the Twilio platform * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @param string $inLocality Limit results to a particular locality * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return ReadMobileOptions Options builder */ public static function read(int $areaCode = Values::NONE, string $contains = Values::NONE, bool $smsEnabled = Values::NONE, bool $mmsEnabled = Values::NONE, bool $voiceEnabled = Values::NONE, bool $excludeAllAddressRequired = Values::NONE, bool $excludeLocalAddressRequired = Values::NONE, bool $excludeForeignAddressRequired = Values::NONE, bool $beta = Values::NONE, string $nearNumber = Values::NONE, string $nearLatLong = Values::NONE, int $distance = Values::NONE, string $inPostalCode = Values::NONE, string $inRegion = Values::NONE, string $inRateCenter = Values::NONE, string $inLata = Values::NONE, string $inLocality = Values::NONE, bool $faxEnabled = Values::NONE): ReadMobileOptions { return new ReadMobileOptions($areaCode, $contains, $smsEnabled, $mmsEnabled, $voiceEnabled, $excludeAllAddressRequired, $excludeLocalAddressRequired, $excludeForeignAddressRequired, $beta, $nearNumber, $nearLatLong, $distance, $inPostalCode, $inRegion, $inRateCenter, $inLata, $inLocality, $faxEnabled); } } class ReadMobileOptions extends Options { /** * @param int $areaCode The area code of the phone numbers to read * @param string $contains The pattern on which to match phone numbers * @param bool $smsEnabled Whether the phone numbers can receive text messages * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @param bool $beta Whether to read phone numbers new to the Twilio platform * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @param string $inLocality Limit results to a particular locality * @param bool $faxEnabled Whether the phone numbers can receive faxes */ public function __construct(int $areaCode = Values::NONE, string $contains = Values::NONE, bool $smsEnabled = Values::NONE, bool $mmsEnabled = Values::NONE, bool $voiceEnabled = Values::NONE, bool $excludeAllAddressRequired = Values::NONE, bool $excludeLocalAddressRequired = Values::NONE, bool $excludeForeignAddressRequired = Values::NONE, bool $beta = Values::NONE, string $nearNumber = Values::NONE, string $nearLatLong = Values::NONE, int $distance = Values::NONE, string $inPostalCode = Values::NONE, string $inRegion = Values::NONE, string $inRateCenter = Values::NONE, string $inLata = Values::NONE, string $inLocality = Values::NONE, bool $faxEnabled = Values::NONE) { $this->options['areaCode'] = $areaCode; $this->options['contains'] = $contains; $this->options['smsEnabled'] = $smsEnabled; $this->options['mmsEnabled'] = $mmsEnabled; $this->options['voiceEnabled'] = $voiceEnabled; $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; $this->options['beta'] = $beta; $this->options['nearNumber'] = $nearNumber; $this->options['nearLatLong'] = $nearLatLong; $this->options['distance'] = $distance; $this->options['inPostalCode'] = $inPostalCode; $this->options['inRegion'] = $inRegion; $this->options['inRateCenter'] = $inRateCenter; $this->options['inLata'] = $inLata; $this->options['inLocality'] = $inLocality; $this->options['faxEnabled'] = $faxEnabled; } /** * The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. * * @param int $areaCode The area code of the phone numbers to read * @return $this Fluent Builder */ public function setAreaCode(int $areaCode): self { $this->options['areaCode'] = $areaCode; return $this; } /** * The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. * * @param string $contains The pattern on which to match phone numbers * @return $this Fluent Builder */ public function setContains(string $contains): self { $this->options['contains'] = $contains; return $this; } /** * Whether the phone numbers can receive text messages. Can be: `true` or `false`. * * @param bool $smsEnabled Whether the phone numbers can receive text messages * @return $this Fluent Builder */ public function setSmsEnabled(bool $smsEnabled): self { $this->options['smsEnabled'] = $smsEnabled; return $this; } /** * Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. * * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @return $this Fluent Builder */ public function setMmsEnabled(bool $mmsEnabled): self { $this->options['mmsEnabled'] = $mmsEnabled; return $this; } /** * Whether the phone numbers can receive calls. Can be: `true` or `false`. * * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @return $this Fluent Builder */ public function setVoiceEnabled(bool $voiceEnabled): self { $this->options['voiceEnabled'] = $voiceEnabled; return $this; } /** * Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @return $this Fluent Builder */ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self { $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @return $this Fluent Builder */ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self { $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @return $this Fluent Builder */ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self { $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; return $this; } /** * Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to read phone numbers new to the Twilio platform * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. * * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearNumber(string $nearNumber): self { $this->options['nearNumber'] = $nearNumber; return $this; } /** * Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. * * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearLatLong(string $nearLatLong): self { $this->options['nearLatLong'] = $nearLatLong; return $this; } /** * The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. * * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @return $this Fluent Builder */ public function setDistance(int $distance): self { $this->options['distance'] = $distance; return $this; } /** * Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. * * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @return $this Fluent Builder */ public function setInPostalCode(string $inPostalCode): self { $this->options['inPostalCode'] = $inPostalCode; return $this; } /** * Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. * * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @return $this Fluent Builder */ public function setInRegion(string $inRegion): self { $this->options['inRegion'] = $inRegion; return $this; } /** * Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. * * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @return $this Fluent Builder */ public function setInRateCenter(string $inRateCenter): self { $this->options['inRateCenter'] = $inRateCenter; return $this; } /** * Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. * * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @return $this Fluent Builder */ public function setInLata(string $inLata): self { $this->options['inLata'] = $inLata; return $this; } /** * Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. * * @param string $inLocality Limit results to a particular locality * @return $this Fluent Builder */ public function setInLocality(string $inLocality): self { $this->options['inLocality'] = $inLocality; return $this; } /** * Whether the phone numbers can receive faxes. Can be: `true` or `false`. * * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return $this Fluent Builder */ public function setFaxEnabled(bool $faxEnabled): self { $this->options['faxEnabled'] = $faxEnabled; 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.Api.V2010.ReadMobileOptions ' . $options . ']'; } } V2010/Account/AvailablePhoneNumberCountry/MachineToMachineList.php 0000644 00000014532 15111164100 0020753 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class MachineToMachineList extends ListResource { /** * Construct the MachineToMachineList * * @param Version $version Version that contains the resource * @param string $accountSid The account_sid * @param string $countryCode The ISO-3166-1 country code of the country. */ public function __construct(Version $version, string $accountSid, string $countryCode) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/MachineToMachine.json'; } /** * Streams MachineToMachineInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MachineToMachineInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 MachineToMachineInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MachineToMachineInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 MachineToMachinePage Page of MachineToMachineInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MachineToMachinePage { $options = new Values($options); $params = Values::of([ 'AreaCode' => $options['areaCode'], 'Contains' => $options['contains'], 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']), 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']), 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']), 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']), 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']), 'Beta' => Serialize::booleanToString($options['beta']), 'NearNumber' => $options['nearNumber'], 'NearLatLong' => $options['nearLatLong'], 'Distance' => $options['distance'], 'InPostalCode' => $options['inPostalCode'], 'InRegion' => $options['inRegion'], 'InRateCenter' => $options['inRateCenter'], 'InLata' => $options['inLata'], 'InLocality' => $options['inLocality'], 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MachineToMachinePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MachineToMachineInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MachineToMachinePage Page of MachineToMachineInstance */ public function getPage(string $targetUrl): MachineToMachinePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MachineToMachinePage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MachineToMachineList]'; } } V2010/Account/AvailablePhoneNumberCountry/TollFreeInstance.php 0000644 00000006044 15111164101 0020164 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $friendlyName * @property string $phoneNumber * @property string $lata * @property string $locality * @property string $rateCenter * @property string $latitude * @property string $longitude * @property string $region * @property string $postalCode * @property string $isoCountry * @property string $addressRequirements * @property bool $beta * @property string $capabilities */ class TollFreeInstance extends InstanceResource { /** * Initialize the TollFreeInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The account_sid * @param string $countryCode The ISO-3166-1 country code of the country. */ public function __construct(Version $version, array $payload, string $accountSid, string $countryCode) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'lata' => Values::array_get($payload, 'lata'), 'locality' => Values::array_get($payload, 'locality'), 'rateCenter' => Values::array_get($payload, 'rate_center'), 'latitude' => Values::array_get($payload, 'latitude'), 'longitude' => Values::array_get($payload, 'longitude'), 'region' => Values::array_get($payload, 'region'), 'postalCode' => Values::array_get($payload, 'postal_code'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), ]; $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; } /** * 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.Api.V2010.TollFreeInstance]'; } } V2010/Account/AvailablePhoneNumberCountry/SharedCostList.php 0000644 00000014364 15111164101 0017662 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class SharedCostList extends ListResource { /** * Construct the SharedCostList * * @param Version $version Version that contains the resource * @param string $accountSid The account_sid * @param string $countryCode The ISO-3166-1 country code of the country. */ public function __construct(Version $version, string $accountSid, string $countryCode) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/SharedCost.json'; } /** * Streams SharedCostInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SharedCostInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 SharedCostInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of SharedCostInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 SharedCostPage Page of SharedCostInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SharedCostPage { $options = new Values($options); $params = Values::of([ 'AreaCode' => $options['areaCode'], 'Contains' => $options['contains'], 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']), 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']), 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']), 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']), 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']), 'Beta' => Serialize::booleanToString($options['beta']), 'NearNumber' => $options['nearNumber'], 'NearLatLong' => $options['nearLatLong'], 'Distance' => $options['distance'], 'InPostalCode' => $options['inPostalCode'], 'InRegion' => $options['inRegion'], 'InRateCenter' => $options['inRateCenter'], 'InLata' => $options['inLata'], 'InLocality' => $options['inLocality'], 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SharedCostPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SharedCostInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SharedCostPage Page of SharedCostInstance */ public function getPage(string $targetUrl): SharedCostPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SharedCostPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SharedCostList]'; } } V2010/Account/AvailablePhoneNumberCountry/MobileInstance.php 0000644 00000006036 15111164101 0017660 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $friendlyName * @property string $phoneNumber * @property string $lata * @property string $locality * @property string $rateCenter * @property string $latitude * @property string $longitude * @property string $region * @property string $postalCode * @property string $isoCountry * @property string $addressRequirements * @property bool $beta * @property string $capabilities */ class MobileInstance extends InstanceResource { /** * Initialize the MobileInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The account_sid * @param string $countryCode The ISO-3166-1 country code of the country. */ public function __construct(Version $version, array $payload, string $accountSid, string $countryCode) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'lata' => Values::array_get($payload, 'lata'), 'locality' => Values::array_get($payload, 'locality'), 'rateCenter' => Values::array_get($payload, 'rate_center'), 'latitude' => Values::array_get($payload, 'latitude'), 'longitude' => Values::array_get($payload, 'longitude'), 'region' => Values::array_get($payload, 'region'), 'postalCode' => Values::array_get($payload, 'postal_code'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), ]; $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; } /** * 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.Api.V2010.MobileInstance]'; } } V2010/Account/AvailablePhoneNumberCountry/NationalList.php 0000644 00000014322 15111164102 0017363 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class NationalList extends ListResource { /** * Construct the NationalList * * @param Version $version Version that contains the resource * @param string $accountSid The account_sid * @param string $countryCode The ISO-3166-1 country code of the country. */ public function __construct(Version $version, string $accountSid, string $countryCode) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/National.json'; } /** * Streams NationalInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads NationalInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 NationalInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of NationalInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 NationalPage Page of NationalInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): NationalPage { $options = new Values($options); $params = Values::of([ 'AreaCode' => $options['areaCode'], 'Contains' => $options['contains'], 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']), 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']), 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']), 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']), 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']), 'Beta' => Serialize::booleanToString($options['beta']), 'NearNumber' => $options['nearNumber'], 'NearLatLong' => $options['nearLatLong'], 'Distance' => $options['distance'], 'InPostalCode' => $options['inPostalCode'], 'InRegion' => $options['inRegion'], 'InRateCenter' => $options['inRateCenter'], 'InLata' => $options['inLata'], 'InLocality' => $options['inLocality'], 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new NationalPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of NationalInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return NationalPage Page of NationalInstance */ public function getPage(string $targetUrl): NationalPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new NationalPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NationalList]'; } } V2010/Account/AvailablePhoneNumberCountry/LocalOptions.php 0000644 00000041052 15111164102 0017370 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Options; use Twilio\Values; abstract class LocalOptions { /** * @param int $areaCode The area code of the phone numbers to read * @param string $contains The pattern on which to match phone numbers * @param bool $smsEnabled Whether the phone numbers can receive text messages * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @param bool $beta Whether to read phone numbers new to the Twilio platform * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @param string $inLocality Limit results to a particular locality * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return ReadLocalOptions Options builder */ public static function read(int $areaCode = Values::NONE, string $contains = Values::NONE, bool $smsEnabled = Values::NONE, bool $mmsEnabled = Values::NONE, bool $voiceEnabled = Values::NONE, bool $excludeAllAddressRequired = Values::NONE, bool $excludeLocalAddressRequired = Values::NONE, bool $excludeForeignAddressRequired = Values::NONE, bool $beta = Values::NONE, string $nearNumber = Values::NONE, string $nearLatLong = Values::NONE, int $distance = Values::NONE, string $inPostalCode = Values::NONE, string $inRegion = Values::NONE, string $inRateCenter = Values::NONE, string $inLata = Values::NONE, string $inLocality = Values::NONE, bool $faxEnabled = Values::NONE): ReadLocalOptions { return new ReadLocalOptions($areaCode, $contains, $smsEnabled, $mmsEnabled, $voiceEnabled, $excludeAllAddressRequired, $excludeLocalAddressRequired, $excludeForeignAddressRequired, $beta, $nearNumber, $nearLatLong, $distance, $inPostalCode, $inRegion, $inRateCenter, $inLata, $inLocality, $faxEnabled); } } class ReadLocalOptions extends Options { /** * @param int $areaCode The area code of the phone numbers to read * @param string $contains The pattern on which to match phone numbers * @param bool $smsEnabled Whether the phone numbers can receive text messages * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @param bool $beta Whether to read phone numbers new to the Twilio platform * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @param string $inLocality Limit results to a particular locality * @param bool $faxEnabled Whether the phone numbers can receive faxes */ public function __construct(int $areaCode = Values::NONE, string $contains = Values::NONE, bool $smsEnabled = Values::NONE, bool $mmsEnabled = Values::NONE, bool $voiceEnabled = Values::NONE, bool $excludeAllAddressRequired = Values::NONE, bool $excludeLocalAddressRequired = Values::NONE, bool $excludeForeignAddressRequired = Values::NONE, bool $beta = Values::NONE, string $nearNumber = Values::NONE, string $nearLatLong = Values::NONE, int $distance = Values::NONE, string $inPostalCode = Values::NONE, string $inRegion = Values::NONE, string $inRateCenter = Values::NONE, string $inLata = Values::NONE, string $inLocality = Values::NONE, bool $faxEnabled = Values::NONE) { $this->options['areaCode'] = $areaCode; $this->options['contains'] = $contains; $this->options['smsEnabled'] = $smsEnabled; $this->options['mmsEnabled'] = $mmsEnabled; $this->options['voiceEnabled'] = $voiceEnabled; $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; $this->options['beta'] = $beta; $this->options['nearNumber'] = $nearNumber; $this->options['nearLatLong'] = $nearLatLong; $this->options['distance'] = $distance; $this->options['inPostalCode'] = $inPostalCode; $this->options['inRegion'] = $inRegion; $this->options['inRateCenter'] = $inRateCenter; $this->options['inLata'] = $inLata; $this->options['inLocality'] = $inLocality; $this->options['faxEnabled'] = $faxEnabled; } /** * The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. * * @param int $areaCode The area code of the phone numbers to read * @return $this Fluent Builder */ public function setAreaCode(int $areaCode): self { $this->options['areaCode'] = $areaCode; return $this; } /** * The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-number-pattern) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-character-pattern). If specified, this value must have at least two characters. * * @param string $contains The pattern on which to match phone numbers * @return $this Fluent Builder */ public function setContains(string $contains): self { $this->options['contains'] = $contains; return $this; } /** * Whether the phone numbers can receive text messages. Can be: `true` or `false`. * * @param bool $smsEnabled Whether the phone numbers can receive text messages * @return $this Fluent Builder */ public function setSmsEnabled(bool $smsEnabled): self { $this->options['smsEnabled'] = $smsEnabled; return $this; } /** * Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. * * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @return $this Fluent Builder */ public function setMmsEnabled(bool $mmsEnabled): self { $this->options['mmsEnabled'] = $mmsEnabled; return $this; } /** * Whether the phone numbers can receive calls. Can be: `true` or `false`. * * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @return $this Fluent Builder */ public function setVoiceEnabled(bool $voiceEnabled): self { $this->options['voiceEnabled'] = $voiceEnabled; return $this; } /** * Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @return $this Fluent Builder */ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self { $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @return $this Fluent Builder */ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self { $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @return $this Fluent Builder */ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self { $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; return $this; } /** * Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to read phone numbers new to the Twilio platform * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. * * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearNumber(string $nearNumber): self { $this->options['nearNumber'] = $nearNumber; return $this; } /** * Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. * * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearLatLong(string $nearLatLong): self { $this->options['nearLatLong'] = $nearLatLong; return $this; } /** * The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. * * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @return $this Fluent Builder */ public function setDistance(int $distance): self { $this->options['distance'] = $distance; return $this; } /** * Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. * * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @return $this Fluent Builder */ public function setInPostalCode(string $inPostalCode): self { $this->options['inPostalCode'] = $inPostalCode; return $this; } /** * Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. * * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @return $this Fluent Builder */ public function setInRegion(string $inRegion): self { $this->options['inRegion'] = $inRegion; return $this; } /** * Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. * * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @return $this Fluent Builder */ public function setInRateCenter(string $inRateCenter): self { $this->options['inRateCenter'] = $inRateCenter; return $this; } /** * Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. * * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @return $this Fluent Builder */ public function setInLata(string $inLata): self { $this->options['inLata'] = $inLata; return $this; } /** * Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. * * @param string $inLocality Limit results to a particular locality * @return $this Fluent Builder */ public function setInLocality(string $inLocality): self { $this->options['inLocality'] = $inLocality; return $this; } /** * Whether the phone numbers can receive faxes. Can be: `true` or `false`. * * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return $this Fluent Builder */ public function setFaxEnabled(bool $faxEnabled): self { $this->options['faxEnabled'] = $faxEnabled; 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.Api.V2010.ReadLocalOptions ' . $options . ']'; } } V2010/Account/AvailablePhoneNumberCountry/SharedCostPage.php 0000644 00000002514 15111164103 0017617 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class SharedCostPage 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 SharedCostInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\SharedCostInstance */ public function buildInstance(array $payload): SharedCostInstance { return new SharedCostInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SharedCostPage]'; } } V2010/Account/AvailablePhoneNumberCountry/VoipOptions.php 0000644 00000040737 15111164103 0017265 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Options; use Twilio\Values; abstract class VoipOptions { /** * @param int $areaCode The area code of the phone numbers to read * @param string $contains The pattern on which to match phone numbers * @param bool $smsEnabled Whether the phone numbers can receive text messages * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @param bool $beta Whether to read phone numbers new to the Twilio platform * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @param string $inLocality Limit results to a particular locality * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return ReadVoipOptions Options builder */ public static function read(int $areaCode = Values::NONE, string $contains = Values::NONE, bool $smsEnabled = Values::NONE, bool $mmsEnabled = Values::NONE, bool $voiceEnabled = Values::NONE, bool $excludeAllAddressRequired = Values::NONE, bool $excludeLocalAddressRequired = Values::NONE, bool $excludeForeignAddressRequired = Values::NONE, bool $beta = Values::NONE, string $nearNumber = Values::NONE, string $nearLatLong = Values::NONE, int $distance = Values::NONE, string $inPostalCode = Values::NONE, string $inRegion = Values::NONE, string $inRateCenter = Values::NONE, string $inLata = Values::NONE, string $inLocality = Values::NONE, bool $faxEnabled = Values::NONE): ReadVoipOptions { return new ReadVoipOptions($areaCode, $contains, $smsEnabled, $mmsEnabled, $voiceEnabled, $excludeAllAddressRequired, $excludeLocalAddressRequired, $excludeForeignAddressRequired, $beta, $nearNumber, $nearLatLong, $distance, $inPostalCode, $inRegion, $inRateCenter, $inLata, $inLocality, $faxEnabled); } } class ReadVoipOptions extends Options { /** * @param int $areaCode The area code of the phone numbers to read * @param string $contains The pattern on which to match phone numbers * @param bool $smsEnabled Whether the phone numbers can receive text messages * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @param bool $beta Whether to read phone numbers new to the Twilio platform * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @param string $inLocality Limit results to a particular locality * @param bool $faxEnabled Whether the phone numbers can receive faxes */ public function __construct(int $areaCode = Values::NONE, string $contains = Values::NONE, bool $smsEnabled = Values::NONE, bool $mmsEnabled = Values::NONE, bool $voiceEnabled = Values::NONE, bool $excludeAllAddressRequired = Values::NONE, bool $excludeLocalAddressRequired = Values::NONE, bool $excludeForeignAddressRequired = Values::NONE, bool $beta = Values::NONE, string $nearNumber = Values::NONE, string $nearLatLong = Values::NONE, int $distance = Values::NONE, string $inPostalCode = Values::NONE, string $inRegion = Values::NONE, string $inRateCenter = Values::NONE, string $inLata = Values::NONE, string $inLocality = Values::NONE, bool $faxEnabled = Values::NONE) { $this->options['areaCode'] = $areaCode; $this->options['contains'] = $contains; $this->options['smsEnabled'] = $smsEnabled; $this->options['mmsEnabled'] = $mmsEnabled; $this->options['voiceEnabled'] = $voiceEnabled; $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; $this->options['beta'] = $beta; $this->options['nearNumber'] = $nearNumber; $this->options['nearLatLong'] = $nearLatLong; $this->options['distance'] = $distance; $this->options['inPostalCode'] = $inPostalCode; $this->options['inRegion'] = $inRegion; $this->options['inRateCenter'] = $inRateCenter; $this->options['inLata'] = $inLata; $this->options['inLocality'] = $inLocality; $this->options['faxEnabled'] = $faxEnabled; } /** * The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. * * @param int $areaCode The area code of the phone numbers to read * @return $this Fluent Builder */ public function setAreaCode(int $areaCode): self { $this->options['areaCode'] = $areaCode; return $this; } /** * The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. * * @param string $contains The pattern on which to match phone numbers * @return $this Fluent Builder */ public function setContains(string $contains): self { $this->options['contains'] = $contains; return $this; } /** * Whether the phone numbers can receive text messages. Can be: `true` or `false`. * * @param bool $smsEnabled Whether the phone numbers can receive text messages * @return $this Fluent Builder */ public function setSmsEnabled(bool $smsEnabled): self { $this->options['smsEnabled'] = $smsEnabled; return $this; } /** * Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. * * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @return $this Fluent Builder */ public function setMmsEnabled(bool $mmsEnabled): self { $this->options['mmsEnabled'] = $mmsEnabled; return $this; } /** * Whether the phone numbers can receive calls. Can be: `true` or `false`. * * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @return $this Fluent Builder */ public function setVoiceEnabled(bool $voiceEnabled): self { $this->options['voiceEnabled'] = $voiceEnabled; return $this; } /** * Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @return $this Fluent Builder */ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self { $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @return $this Fluent Builder */ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self { $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @return $this Fluent Builder */ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self { $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; return $this; } /** * Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to read phone numbers new to the Twilio platform * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. * * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearNumber(string $nearNumber): self { $this->options['nearNumber'] = $nearNumber; return $this; } /** * Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. * * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearLatLong(string $nearLatLong): self { $this->options['nearLatLong'] = $nearLatLong; return $this; } /** * The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. * * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @return $this Fluent Builder */ public function setDistance(int $distance): self { $this->options['distance'] = $distance; return $this; } /** * Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. * * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @return $this Fluent Builder */ public function setInPostalCode(string $inPostalCode): self { $this->options['inPostalCode'] = $inPostalCode; return $this; } /** * Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. * * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @return $this Fluent Builder */ public function setInRegion(string $inRegion): self { $this->options['inRegion'] = $inRegion; return $this; } /** * Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. * * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @return $this Fluent Builder */ public function setInRateCenter(string $inRateCenter): self { $this->options['inRateCenter'] = $inRateCenter; return $this; } /** * Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. * * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @return $this Fluent Builder */ public function setInLata(string $inLata): self { $this->options['inLata'] = $inLata; return $this; } /** * Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. * * @param string $inLocality Limit results to a particular locality * @return $this Fluent Builder */ public function setInLocality(string $inLocality): self { $this->options['inLocality'] = $inLocality; return $this; } /** * Whether the phone numbers can receive faxes. Can be: `true` or `false`. * * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return $this Fluent Builder */ public function setFaxEnabled(bool $faxEnabled): self { $this->options['faxEnabled'] = $faxEnabled; 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.Api.V2010.ReadVoipOptions ' . $options . ']'; } } V2010/Account/AvailablePhoneNumberCountry/VoipPage.php 0000644 00000002450 15111164104 0016475 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class VoipPage 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 VoipInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\VoipInstance */ public function buildInstance(array $payload): VoipInstance { return new VoipInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.VoipPage]'; } } V2010/Account/AvailablePhoneNumberCountry/NationalOptions.php 0000644 00000040767 15111164104 0020121 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Options; use Twilio\Values; abstract class NationalOptions { /** * @param int $areaCode The area code of the phone numbers to read * @param string $contains The pattern on which to match phone numbers * @param bool $smsEnabled Whether the phone numbers can receive text messages * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @param bool $beta Whether to read phone numbers new to the Twilio platform * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @param string $inLocality Limit results to a particular locality * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return ReadNationalOptions Options builder */ public static function read(int $areaCode = Values::NONE, string $contains = Values::NONE, bool $smsEnabled = Values::NONE, bool $mmsEnabled = Values::NONE, bool $voiceEnabled = Values::NONE, bool $excludeAllAddressRequired = Values::NONE, bool $excludeLocalAddressRequired = Values::NONE, bool $excludeForeignAddressRequired = Values::NONE, bool $beta = Values::NONE, string $nearNumber = Values::NONE, string $nearLatLong = Values::NONE, int $distance = Values::NONE, string $inPostalCode = Values::NONE, string $inRegion = Values::NONE, string $inRateCenter = Values::NONE, string $inLata = Values::NONE, string $inLocality = Values::NONE, bool $faxEnabled = Values::NONE): ReadNationalOptions { return new ReadNationalOptions($areaCode, $contains, $smsEnabled, $mmsEnabled, $voiceEnabled, $excludeAllAddressRequired, $excludeLocalAddressRequired, $excludeForeignAddressRequired, $beta, $nearNumber, $nearLatLong, $distance, $inPostalCode, $inRegion, $inRateCenter, $inLata, $inLocality, $faxEnabled); } } class ReadNationalOptions extends Options { /** * @param int $areaCode The area code of the phone numbers to read * @param string $contains The pattern on which to match phone numbers * @param bool $smsEnabled Whether the phone numbers can receive text messages * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @param bool $beta Whether to read phone numbers new to the Twilio platform * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @param string $inLocality Limit results to a particular locality * @param bool $faxEnabled Whether the phone numbers can receive faxes */ public function __construct(int $areaCode = Values::NONE, string $contains = Values::NONE, bool $smsEnabled = Values::NONE, bool $mmsEnabled = Values::NONE, bool $voiceEnabled = Values::NONE, bool $excludeAllAddressRequired = Values::NONE, bool $excludeLocalAddressRequired = Values::NONE, bool $excludeForeignAddressRequired = Values::NONE, bool $beta = Values::NONE, string $nearNumber = Values::NONE, string $nearLatLong = Values::NONE, int $distance = Values::NONE, string $inPostalCode = Values::NONE, string $inRegion = Values::NONE, string $inRateCenter = Values::NONE, string $inLata = Values::NONE, string $inLocality = Values::NONE, bool $faxEnabled = Values::NONE) { $this->options['areaCode'] = $areaCode; $this->options['contains'] = $contains; $this->options['smsEnabled'] = $smsEnabled; $this->options['mmsEnabled'] = $mmsEnabled; $this->options['voiceEnabled'] = $voiceEnabled; $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; $this->options['beta'] = $beta; $this->options['nearNumber'] = $nearNumber; $this->options['nearLatLong'] = $nearLatLong; $this->options['distance'] = $distance; $this->options['inPostalCode'] = $inPostalCode; $this->options['inRegion'] = $inRegion; $this->options['inRateCenter'] = $inRateCenter; $this->options['inLata'] = $inLata; $this->options['inLocality'] = $inLocality; $this->options['faxEnabled'] = $faxEnabled; } /** * The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. * * @param int $areaCode The area code of the phone numbers to read * @return $this Fluent Builder */ public function setAreaCode(int $areaCode): self { $this->options['areaCode'] = $areaCode; return $this; } /** * The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. * * @param string $contains The pattern on which to match phone numbers * @return $this Fluent Builder */ public function setContains(string $contains): self { $this->options['contains'] = $contains; return $this; } /** * Whether the phone numbers can receive text messages. Can be: `true` or `false`. * * @param bool $smsEnabled Whether the phone numbers can receive text messages * @return $this Fluent Builder */ public function setSmsEnabled(bool $smsEnabled): self { $this->options['smsEnabled'] = $smsEnabled; return $this; } /** * Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. * * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @return $this Fluent Builder */ public function setMmsEnabled(bool $mmsEnabled): self { $this->options['mmsEnabled'] = $mmsEnabled; return $this; } /** * Whether the phone numbers can receive calls. Can be: `true` or `false`. * * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @return $this Fluent Builder */ public function setVoiceEnabled(bool $voiceEnabled): self { $this->options['voiceEnabled'] = $voiceEnabled; return $this; } /** * Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @return $this Fluent Builder */ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self { $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @return $this Fluent Builder */ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self { $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @return $this Fluent Builder */ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self { $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; return $this; } /** * Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to read phone numbers new to the Twilio platform * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. * * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearNumber(string $nearNumber): self { $this->options['nearNumber'] = $nearNumber; return $this; } /** * Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. * * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearLatLong(string $nearLatLong): self { $this->options['nearLatLong'] = $nearLatLong; return $this; } /** * The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. * * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @return $this Fluent Builder */ public function setDistance(int $distance): self { $this->options['distance'] = $distance; return $this; } /** * Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. * * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @return $this Fluent Builder */ public function setInPostalCode(string $inPostalCode): self { $this->options['inPostalCode'] = $inPostalCode; return $this; } /** * Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. * * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @return $this Fluent Builder */ public function setInRegion(string $inRegion): self { $this->options['inRegion'] = $inRegion; return $this; } /** * Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. * * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @return $this Fluent Builder */ public function setInRateCenter(string $inRateCenter): self { $this->options['inRateCenter'] = $inRateCenter; return $this; } /** * Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. * * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @return $this Fluent Builder */ public function setInLata(string $inLata): self { $this->options['inLata'] = $inLata; return $this; } /** * Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. * * @param string $inLocality Limit results to a particular locality * @return $this Fluent Builder */ public function setInLocality(string $inLocality): self { $this->options['inLocality'] = $inLocality; return $this; } /** * Whether the phone numbers can receive faxes. Can be: `true` or `false`. * * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return $this Fluent Builder */ public function setFaxEnabled(bool $faxEnabled): self { $this->options['faxEnabled'] = $faxEnabled; 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.Api.V2010.ReadNationalOptions ' . $options . ']'; } } V2010/Account/AvailablePhoneNumberCountry/MobilePage.php 0000644 00000002464 15111164105 0016775 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class MobilePage 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 MobileInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MobileInstance */ public function buildInstance(array $payload): MobileInstance { return new MobileInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MobilePage]'; } } V2010/Account/AvailablePhoneNumberCountry/MachineToMachineInstance.php 0000644 00000006074 15111164105 0021613 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $friendlyName * @property string $phoneNumber * @property string $lata * @property string $locality * @property string $rateCenter * @property string $latitude * @property string $longitude * @property string $region * @property string $postalCode * @property string $isoCountry * @property string $addressRequirements * @property bool $beta * @property string $capabilities */ class MachineToMachineInstance extends InstanceResource { /** * Initialize the MachineToMachineInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The account_sid * @param string $countryCode The ISO-3166-1 country code of the country. */ public function __construct(Version $version, array $payload, string $accountSid, string $countryCode) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'lata' => Values::array_get($payload, 'lata'), 'locality' => Values::array_get($payload, 'locality'), 'rateCenter' => Values::array_get($payload, 'rate_center'), 'latitude' => Values::array_get($payload, 'latitude'), 'longitude' => Values::array_get($payload, 'longitude'), 'region' => Values::array_get($payload, 'region'), 'postalCode' => Values::array_get($payload, 'postal_code'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), ]; $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; } /** * 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.Api.V2010.MachineToMachineInstance]'; } } V2010/Account/AvailablePhoneNumberCountry/TollFreeList.php 0000644 00000014322 15111164106 0017336 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class TollFreeList extends ListResource { /** * Construct the TollFreeList * * @param Version $version Version that contains the resource * @param string $accountSid The account_sid * @param string $countryCode The ISO-3166-1 country code of the country. */ public function __construct(Version $version, string $accountSid, string $countryCode) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/TollFree.json'; } /** * Streams TollFreeInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TollFreeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 TollFreeInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of TollFreeInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 TollFreePage Page of TollFreeInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TollFreePage { $options = new Values($options); $params = Values::of([ 'AreaCode' => $options['areaCode'], 'Contains' => $options['contains'], 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']), 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']), 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']), 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']), 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']), 'Beta' => Serialize::booleanToString($options['beta']), 'NearNumber' => $options['nearNumber'], 'NearLatLong' => $options['nearLatLong'], 'Distance' => $options['distance'], 'InPostalCode' => $options['inPostalCode'], 'InRegion' => $options['inRegion'], 'InRateCenter' => $options['inRateCenter'], 'InLata' => $options['inLata'], 'InLocality' => $options['inLocality'], 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TollFreePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TollFreeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TollFreePage Page of TollFreeInstance */ public function getPage(string $targetUrl): TollFreePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TollFreePage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TollFreeList]'; } } V2010/Account/AvailablePhoneNumberCountry/TollFreeOptions.php 0000644 00000040767 15111164106 0020072 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry; use Twilio\Options; use Twilio\Values; abstract class TollFreeOptions { /** * @param int $areaCode The area code of the phone numbers to read * @param string $contains The pattern on which to match phone numbers * @param bool $smsEnabled Whether the phone numbers can receive text messages * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @param bool $beta Whether to read phone numbers new to the Twilio platform * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @param string $inLocality Limit results to a particular locality * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return ReadTollFreeOptions Options builder */ public static function read(int $areaCode = Values::NONE, string $contains = Values::NONE, bool $smsEnabled = Values::NONE, bool $mmsEnabled = Values::NONE, bool $voiceEnabled = Values::NONE, bool $excludeAllAddressRequired = Values::NONE, bool $excludeLocalAddressRequired = Values::NONE, bool $excludeForeignAddressRequired = Values::NONE, bool $beta = Values::NONE, string $nearNumber = Values::NONE, string $nearLatLong = Values::NONE, int $distance = Values::NONE, string $inPostalCode = Values::NONE, string $inRegion = Values::NONE, string $inRateCenter = Values::NONE, string $inLata = Values::NONE, string $inLocality = Values::NONE, bool $faxEnabled = Values::NONE): ReadTollFreeOptions { return new ReadTollFreeOptions($areaCode, $contains, $smsEnabled, $mmsEnabled, $voiceEnabled, $excludeAllAddressRequired, $excludeLocalAddressRequired, $excludeForeignAddressRequired, $beta, $nearNumber, $nearLatLong, $distance, $inPostalCode, $inRegion, $inRateCenter, $inLata, $inLocality, $faxEnabled); } } class ReadTollFreeOptions extends Options { /** * @param int $areaCode The area code of the phone numbers to read * @param string $contains The pattern on which to match phone numbers * @param bool $smsEnabled Whether the phone numbers can receive text messages * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @param bool $beta Whether to read phone numbers new to the Twilio platform * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @param string $inLocality Limit results to a particular locality * @param bool $faxEnabled Whether the phone numbers can receive faxes */ public function __construct(int $areaCode = Values::NONE, string $contains = Values::NONE, bool $smsEnabled = Values::NONE, bool $mmsEnabled = Values::NONE, bool $voiceEnabled = Values::NONE, bool $excludeAllAddressRequired = Values::NONE, bool $excludeLocalAddressRequired = Values::NONE, bool $excludeForeignAddressRequired = Values::NONE, bool $beta = Values::NONE, string $nearNumber = Values::NONE, string $nearLatLong = Values::NONE, int $distance = Values::NONE, string $inPostalCode = Values::NONE, string $inRegion = Values::NONE, string $inRateCenter = Values::NONE, string $inLata = Values::NONE, string $inLocality = Values::NONE, bool $faxEnabled = Values::NONE) { $this->options['areaCode'] = $areaCode; $this->options['contains'] = $contains; $this->options['smsEnabled'] = $smsEnabled; $this->options['mmsEnabled'] = $mmsEnabled; $this->options['voiceEnabled'] = $voiceEnabled; $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; $this->options['beta'] = $beta; $this->options['nearNumber'] = $nearNumber; $this->options['nearLatLong'] = $nearLatLong; $this->options['distance'] = $distance; $this->options['inPostalCode'] = $inPostalCode; $this->options['inRegion'] = $inRegion; $this->options['inRateCenter'] = $inRateCenter; $this->options['inLata'] = $inLata; $this->options['inLocality'] = $inLocality; $this->options['faxEnabled'] = $faxEnabled; } /** * The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. * * @param int $areaCode The area code of the phone numbers to read * @return $this Fluent Builder */ public function setAreaCode(int $areaCode): self { $this->options['areaCode'] = $areaCode; return $this; } /** * The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. * * @param string $contains The pattern on which to match phone numbers * @return $this Fluent Builder */ public function setContains(string $contains): self { $this->options['contains'] = $contains; return $this; } /** * Whether the phone numbers can receive text messages. Can be: `true` or `false`. * * @param bool $smsEnabled Whether the phone numbers can receive text messages * @return $this Fluent Builder */ public function setSmsEnabled(bool $smsEnabled): self { $this->options['smsEnabled'] = $smsEnabled; return $this; } /** * Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. * * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @return $this Fluent Builder */ public function setMmsEnabled(bool $mmsEnabled): self { $this->options['mmsEnabled'] = $mmsEnabled; return $this; } /** * Whether the phone numbers can receive calls. Can be: `true` or `false`. * * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @return $this Fluent Builder */ public function setVoiceEnabled(bool $voiceEnabled): self { $this->options['voiceEnabled'] = $voiceEnabled; return $this; } /** * Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @return $this Fluent Builder */ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self { $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @return $this Fluent Builder */ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self { $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @return $this Fluent Builder */ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self { $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; return $this; } /** * Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to read phone numbers new to the Twilio platform * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. * * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearNumber(string $nearNumber): self { $this->options['nearNumber'] = $nearNumber; return $this; } /** * Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. * * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearLatLong(string $nearLatLong): self { $this->options['nearLatLong'] = $nearLatLong; return $this; } /** * The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. * * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @return $this Fluent Builder */ public function setDistance(int $distance): self { $this->options['distance'] = $distance; return $this; } /** * Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. * * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @return $this Fluent Builder */ public function setInPostalCode(string $inPostalCode): self { $this->options['inPostalCode'] = $inPostalCode; return $this; } /** * Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. * * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @return $this Fluent Builder */ public function setInRegion(string $inRegion): self { $this->options['inRegion'] = $inRegion; return $this; } /** * Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. * * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @return $this Fluent Builder */ public function setInRateCenter(string $inRateCenter): self { $this->options['inRateCenter'] = $inRateCenter; return $this; } /** * Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. * * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @return $this Fluent Builder */ public function setInLata(string $inLata): self { $this->options['inLata'] = $inLata; return $this; } /** * Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. * * @param string $inLocality Limit results to a particular locality * @return $this Fluent Builder */ public function setInLocality(string $inLocality): self { $this->options['inLocality'] = $inLocality; return $this; } /** * Whether the phone numbers can receive faxes. Can be: `true` or `false`. * * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return $this Fluent Builder */ public function setFaxEnabled(bool $faxEnabled): self { $this->options['faxEnabled'] = $faxEnabled; 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.Api.V2010.ReadTollFreeOptions ' . $options . ']'; } } V2010/Account/ConnectAppContext.php 0000644 00000006431 15111164107 0012761 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Serialize; use Twilio\Values; use Twilio\Version; class ConnectAppContext extends InstanceContext { /** * Initialize the ConnectAppContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/ConnectApps/' . \rawurlencode($sid) . '.json'; } /** * Fetch the ConnectAppInstance * * @return ConnectAppInstance Fetched ConnectAppInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConnectAppInstance { $payload = $this->version->fetch('GET', $this->uri); return new ConnectAppInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the ConnectAppInstance * * @param array|Options $options Optional Arguments * @return ConnectAppInstance Updated ConnectAppInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConnectAppInstance { $options = new Values($options); $data = Values::of([ 'AuthorizeRedirectUrl' => $options['authorizeRedirectUrl'], 'CompanyName' => $options['companyName'], 'DeauthorizeCallbackMethod' => $options['deauthorizeCallbackMethod'], 'DeauthorizeCallbackUrl' => $options['deauthorizeCallbackUrl'], 'Description' => $options['description'], 'FriendlyName' => $options['friendlyName'], 'HomepageUrl' => $options['homepageUrl'], 'Permissions' => Serialize::map($options['permissions'], function($e) { return $e; }), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ConnectAppInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the ConnectAppInstance * * @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.Api.V2010.ConnectAppContext ' . \implode(' ', $context) . ']'; } } V2010/Account/NewKeyPage.php 0000644 00000002242 15111164107 0011355 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class NewKeyPage 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 NewKeyInstance \Twilio\Rest\Api\V2010\Account\NewKeyInstance */ public function buildInstance(array $payload): NewKeyInstance { return new NewKeyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NewKeyPage]'; } } V2010/Account/Call/UserDefinedMessageList.php 0000644 00000004014 15111164110 0014560 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; class UserDefinedMessageList extends ListResource { /** * Construct the UserDefinedMessageList * * @param Version $version Version that contains the resource * @param string $accountSid Account SID. * @param string $callSid Call SID. */ public function __construct(Version $version, string $accountSid, string $callSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/UserDefinedMessages.json'; } /** * Create the UserDefinedMessageInstance * * @param string $content The User Defined Message in the form of URL-encoded * JSON string. * @param array|Options $options Optional Arguments * @return UserDefinedMessageInstance Created UserDefinedMessageInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $content, array $options = []): UserDefinedMessageInstance { $options = new Values($options); $data = Values::of(['Content' => $content, 'IdempotencyKey' => $options['idempotencyKey'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new UserDefinedMessageInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.UserDefinedMessageList]'; } } V2010/Account/Call/FeedbackContext.php 0000644 00000006663 15111164110 0013267 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Serialize; use Twilio\Values; use Twilio\Version; class FeedbackContext extends InstanceContext { /** * Initialize the FeedbackContext * * @param Version $version Version that contains the resource * @param string $accountSid The unique sid that identifies this account * @param string $callSid The call sid that uniquely identifies the call */ public function __construct(Version $version, $accountSid, $callSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Feedback.json'; } /** * Fetch the FeedbackInstance * * @return FeedbackInstance Fetched FeedbackInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FeedbackInstance { $payload = $this->version->fetch('GET', $this->uri); return new FeedbackInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Create the FeedbackInstance * * @param int $qualityScore The call quality expressed as an integer from 1 to 5 * @param array|Options $options Optional Arguments * @return FeedbackInstance Created FeedbackInstance * @throws TwilioException When an HTTP error occurs. */ public function create(int $qualityScore, array $options = []): FeedbackInstance { $options = new Values($options); $data = Values::of([ 'QualityScore' => $qualityScore, 'Issue' => Serialize::map($options['issue'], function($e) { return $e; }), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FeedbackInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Update the FeedbackInstance * * @param array|Options $options Optional Arguments * @return FeedbackInstance Updated FeedbackInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FeedbackInstance { $options = new Values($options); $data = Values::of([ 'QualityScore' => $options['qualityScore'], 'Issue' => Serialize::map($options['issue'], function($e) { return $e; }), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new FeedbackInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * 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.Api.V2010.FeedbackContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Call/SiprecPage.php 0000644 00000002402 15111164111 0012244 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class SiprecPage 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 SiprecInstance \Twilio\Rest\Api\V2010\Account\Call\SiprecInstance */ public function buildInstance(array $payload): SiprecInstance { return new SiprecInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SiprecPage]'; } } V2010/Account/Call/SiprecList.php 0000644 00000035400 15111164111 0012307 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; class SiprecList extends ListResource { /** * Construct the SiprecList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created this resource * @param string $callSid The SID of the Call the resource is associated with */ public function __construct(Version $version, string $accountSid, string $callSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Siprec.json'; } /** * Create the SiprecInstance * * @param array|Options $options Optional Arguments * @return SiprecInstance Created SiprecInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): SiprecInstance { $options = new Values($options); $data = Values::of([ 'Name' => $options['name'], 'ConnectorName' => $options['connectorName'], 'Track' => $options['track'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'Parameter1.Name' => $options['parameter1Name'], 'Parameter1.Value' => $options['parameter1Value'], 'Parameter2.Name' => $options['parameter2Name'], 'Parameter2.Value' => $options['parameter2Value'], 'Parameter3.Name' => $options['parameter3Name'], 'Parameter3.Value' => $options['parameter3Value'], 'Parameter4.Name' => $options['parameter4Name'], 'Parameter4.Value' => $options['parameter4Value'], 'Parameter5.Name' => $options['parameter5Name'], 'Parameter5.Value' => $options['parameter5Value'], 'Parameter6.Name' => $options['parameter6Name'], 'Parameter6.Value' => $options['parameter6Value'], 'Parameter7.Name' => $options['parameter7Name'], 'Parameter7.Value' => $options['parameter7Value'], 'Parameter8.Name' => $options['parameter8Name'], 'Parameter8.Value' => $options['parameter8Value'], 'Parameter9.Name' => $options['parameter9Name'], 'Parameter9.Value' => $options['parameter9Value'], 'Parameter10.Name' => $options['parameter10Name'], 'Parameter10.Value' => $options['parameter10Value'], 'Parameter11.Name' => $options['parameter11Name'], 'Parameter11.Value' => $options['parameter11Value'], 'Parameter12.Name' => $options['parameter12Name'], 'Parameter12.Value' => $options['parameter12Value'], 'Parameter13.Name' => $options['parameter13Name'], 'Parameter13.Value' => $options['parameter13Value'], 'Parameter14.Name' => $options['parameter14Name'], 'Parameter14.Value' => $options['parameter14Value'], 'Parameter15.Name' => $options['parameter15Name'], 'Parameter15.Value' => $options['parameter15Value'], 'Parameter16.Name' => $options['parameter16Name'], 'Parameter16.Value' => $options['parameter16Value'], 'Parameter17.Name' => $options['parameter17Name'], 'Parameter17.Value' => $options['parameter17Value'], 'Parameter18.Name' => $options['parameter18Name'], 'Parameter18.Value' => $options['parameter18Value'], 'Parameter19.Name' => $options['parameter19Name'], 'Parameter19.Value' => $options['parameter19Value'], 'Parameter20.Name' => $options['parameter20Name'], 'Parameter20.Value' => $options['parameter20Value'], 'Parameter21.Name' => $options['parameter21Name'], 'Parameter21.Value' => $options['parameter21Value'], 'Parameter22.Name' => $options['parameter22Name'], 'Parameter22.Value' => $options['parameter22Value'], 'Parameter23.Name' => $options['parameter23Name'], 'Parameter23.Value' => $options['parameter23Value'], 'Parameter24.Name' => $options['parameter24Name'], 'Parameter24.Value' => $options['parameter24Value'], 'Parameter25.Name' => $options['parameter25Name'], 'Parameter25.Value' => $options['parameter25Value'], 'Parameter26.Name' => $options['parameter26Name'], 'Parameter26.Value' => $options['parameter26Value'], 'Parameter27.Name' => $options['parameter27Name'], 'Parameter27.Value' => $options['parameter27Value'], 'Parameter28.Name' => $options['parameter28Name'], 'Parameter28.Value' => $options['parameter28Value'], 'Parameter29.Name' => $options['parameter29Name'], 'Parameter29.Value' => $options['parameter29Value'], 'Parameter30.Name' => $options['parameter30Name'], 'Parameter30.Value' => $options['parameter30Value'], 'Parameter31.Name' => $options['parameter31Name'], 'Parameter31.Value' => $options['parameter31Value'], 'Parameter32.Name' => $options['parameter32Name'], 'Parameter32.Value' => $options['parameter32Value'], 'Parameter33.Name' => $options['parameter33Name'], 'Parameter33.Value' => $options['parameter33Value'], 'Parameter34.Name' => $options['parameter34Name'], 'Parameter34.Value' => $options['parameter34Value'], 'Parameter35.Name' => $options['parameter35Name'], 'Parameter35.Value' => $options['parameter35Value'], 'Parameter36.Name' => $options['parameter36Name'], 'Parameter36.Value' => $options['parameter36Value'], 'Parameter37.Name' => $options['parameter37Name'], 'Parameter37.Value' => $options['parameter37Value'], 'Parameter38.Name' => $options['parameter38Name'], 'Parameter38.Value' => $options['parameter38Value'], 'Parameter39.Name' => $options['parameter39Name'], 'Parameter39.Value' => $options['parameter39Value'], 'Parameter40.Name' => $options['parameter40Name'], 'Parameter40.Value' => $options['parameter40Value'], 'Parameter41.Name' => $options['parameter41Name'], 'Parameter41.Value' => $options['parameter41Value'], 'Parameter42.Name' => $options['parameter42Name'], 'Parameter42.Value' => $options['parameter42Value'], 'Parameter43.Name' => $options['parameter43Name'], 'Parameter43.Value' => $options['parameter43Value'], 'Parameter44.Name' => $options['parameter44Name'], 'Parameter44.Value' => $options['parameter44Value'], 'Parameter45.Name' => $options['parameter45Name'], 'Parameter45.Value' => $options['parameter45Value'], 'Parameter46.Name' => $options['parameter46Name'], 'Parameter46.Value' => $options['parameter46Value'], 'Parameter47.Name' => $options['parameter47Name'], 'Parameter47.Value' => $options['parameter47Value'], 'Parameter48.Name' => $options['parameter48Name'], 'Parameter48.Value' => $options['parameter48Value'], 'Parameter49.Name' => $options['parameter49Name'], 'Parameter49.Value' => $options['parameter49Value'], 'Parameter50.Name' => $options['parameter50Name'], 'Parameter50.Value' => $options['parameter50Value'], 'Parameter51.Name' => $options['parameter51Name'], 'Parameter51.Value' => $options['parameter51Value'], 'Parameter52.Name' => $options['parameter52Name'], 'Parameter52.Value' => $options['parameter52Value'], 'Parameter53.Name' => $options['parameter53Name'], 'Parameter53.Value' => $options['parameter53Value'], 'Parameter54.Name' => $options['parameter54Name'], 'Parameter54.Value' => $options['parameter54Value'], 'Parameter55.Name' => $options['parameter55Name'], 'Parameter55.Value' => $options['parameter55Value'], 'Parameter56.Name' => $options['parameter56Name'], 'Parameter56.Value' => $options['parameter56Value'], 'Parameter57.Name' => $options['parameter57Name'], 'Parameter57.Value' => $options['parameter57Value'], 'Parameter58.Name' => $options['parameter58Name'], 'Parameter58.Value' => $options['parameter58Value'], 'Parameter59.Name' => $options['parameter59Name'], 'Parameter59.Value' => $options['parameter59Value'], 'Parameter60.Name' => $options['parameter60Name'], 'Parameter60.Value' => $options['parameter60Value'], 'Parameter61.Name' => $options['parameter61Name'], 'Parameter61.Value' => $options['parameter61Value'], 'Parameter62.Name' => $options['parameter62Name'], 'Parameter62.Value' => $options['parameter62Value'], 'Parameter63.Name' => $options['parameter63Name'], 'Parameter63.Value' => $options['parameter63Value'], 'Parameter64.Name' => $options['parameter64Name'], 'Parameter64.Value' => $options['parameter64Value'], 'Parameter65.Name' => $options['parameter65Name'], 'Parameter65.Value' => $options['parameter65Value'], 'Parameter66.Name' => $options['parameter66Name'], 'Parameter66.Value' => $options['parameter66Value'], 'Parameter67.Name' => $options['parameter67Name'], 'Parameter67.Value' => $options['parameter67Value'], 'Parameter68.Name' => $options['parameter68Name'], 'Parameter68.Value' => $options['parameter68Value'], 'Parameter69.Name' => $options['parameter69Name'], 'Parameter69.Value' => $options['parameter69Value'], 'Parameter70.Name' => $options['parameter70Name'], 'Parameter70.Value' => $options['parameter70Value'], 'Parameter71.Name' => $options['parameter71Name'], 'Parameter71.Value' => $options['parameter71Value'], 'Parameter72.Name' => $options['parameter72Name'], 'Parameter72.Value' => $options['parameter72Value'], 'Parameter73.Name' => $options['parameter73Name'], 'Parameter73.Value' => $options['parameter73Value'], 'Parameter74.Name' => $options['parameter74Name'], 'Parameter74.Value' => $options['parameter74Value'], 'Parameter75.Name' => $options['parameter75Name'], 'Parameter75.Value' => $options['parameter75Value'], 'Parameter76.Name' => $options['parameter76Name'], 'Parameter76.Value' => $options['parameter76Value'], 'Parameter77.Name' => $options['parameter77Name'], 'Parameter77.Value' => $options['parameter77Value'], 'Parameter78.Name' => $options['parameter78Name'], 'Parameter78.Value' => $options['parameter78Value'], 'Parameter79.Name' => $options['parameter79Name'], 'Parameter79.Value' => $options['parameter79Value'], 'Parameter80.Name' => $options['parameter80Name'], 'Parameter80.Value' => $options['parameter80Value'], 'Parameter81.Name' => $options['parameter81Name'], 'Parameter81.Value' => $options['parameter81Value'], 'Parameter82.Name' => $options['parameter82Name'], 'Parameter82.Value' => $options['parameter82Value'], 'Parameter83.Name' => $options['parameter83Name'], 'Parameter83.Value' => $options['parameter83Value'], 'Parameter84.Name' => $options['parameter84Name'], 'Parameter84.Value' => $options['parameter84Value'], 'Parameter85.Name' => $options['parameter85Name'], 'Parameter85.Value' => $options['parameter85Value'], 'Parameter86.Name' => $options['parameter86Name'], 'Parameter86.Value' => $options['parameter86Value'], 'Parameter87.Name' => $options['parameter87Name'], 'Parameter87.Value' => $options['parameter87Value'], 'Parameter88.Name' => $options['parameter88Name'], 'Parameter88.Value' => $options['parameter88Value'], 'Parameter89.Name' => $options['parameter89Name'], 'Parameter89.Value' => $options['parameter89Value'], 'Parameter90.Name' => $options['parameter90Name'], 'Parameter90.Value' => $options['parameter90Value'], 'Parameter91.Name' => $options['parameter91Name'], 'Parameter91.Value' => $options['parameter91Value'], 'Parameter92.Name' => $options['parameter92Name'], 'Parameter92.Value' => $options['parameter92Value'], 'Parameter93.Name' => $options['parameter93Name'], 'Parameter93.Value' => $options['parameter93Value'], 'Parameter94.Name' => $options['parameter94Name'], 'Parameter94.Value' => $options['parameter94Value'], 'Parameter95.Name' => $options['parameter95Name'], 'Parameter95.Value' => $options['parameter95Value'], 'Parameter96.Name' => $options['parameter96Name'], 'Parameter96.Value' => $options['parameter96Value'], 'Parameter97.Name' => $options['parameter97Name'], 'Parameter97.Value' => $options['parameter97Value'], 'Parameter98.Name' => $options['parameter98Name'], 'Parameter98.Value' => $options['parameter98Value'], 'Parameter99.Name' => $options['parameter99Name'], 'Parameter99.Value' => $options['parameter99Value'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SiprecInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Constructs a SiprecContext * * @param string $sid The SID of the Siprec resource, or the `name` */ public function getContext(string $sid): SiprecContext { return new SiprecContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SiprecList]'; } } V2010/Account/Call/FeedbackPage.php 0000644 00000002416 15111164112 0012511 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class FeedbackPage 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 FeedbackInstance \Twilio\Rest\Api\V2010\Account\Call\FeedbackInstance */ public function buildInstance(array $payload): FeedbackInstance { return new FeedbackInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.FeedbackPage]'; } } V2010/Account/Call/UserDefinedMessageSubscriptionOptions.php 0000644 00000005362 15111164112 0017716 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Options; use Twilio\Values; abstract class UserDefinedMessageSubscriptionOptions { /** * @param string $idempotencyKey A unique string value to identify API call. * This should be a unique string value per API * call and can be a randomly generated. * @param string $method HTTP method used with the callback. * @return CreateUserDefinedMessageSubscriptionOptions Options builder */ public static function create(string $idempotencyKey = Values::NONE, string $method = Values::NONE): CreateUserDefinedMessageSubscriptionOptions { return new CreateUserDefinedMessageSubscriptionOptions($idempotencyKey, $method); } } class CreateUserDefinedMessageSubscriptionOptions extends Options { /** * @param string $idempotencyKey A unique string value to identify API call. * This should be a unique string value per API * call and can be a randomly generated. * @param string $method HTTP method used with the callback. */ public function __construct(string $idempotencyKey = Values::NONE, string $method = Values::NONE) { $this->options['idempotencyKey'] = $idempotencyKey; $this->options['method'] = $method; } /** * A unique string value to identify API call. This should be a unique string value per API call and can be a randomly generated. * * @param string $idempotencyKey A unique string value to identify API call. * This should be a unique string value per API * call and can be a randomly generated. * @return $this Fluent Builder */ public function setIdempotencyKey(string $idempotencyKey): self { $this->options['idempotencyKey'] = $idempotencyKey; return $this; } /** * The HTTP method Twilio will use when requesting the above `Url`. Either `GET` or `POST`. Default is `POST`. * * @param string $method HTTP method used with the callback. * @return $this Fluent Builder */ public function setMethod(string $method): self { $this->options['method'] = $method; 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.Api.V2010.CreateUserDefinedMessageSubscriptionOptions ' . $options . ']'; } } V2010/Account/Call/NotificationList.php 0000644 00000013317 15111164113 0013515 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class NotificationList extends ListResource { /** * Construct the NotificationList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $callSid The SID of the Call the resource is associated with */ public function __construct(Version $version, string $accountSid, string $callSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Notifications.json'; } /** * Streams NotificationInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads NotificationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 NotificationInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of NotificationInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 NotificationPage Page of NotificationInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): NotificationPage { $options = new Values($options); $params = Values::of([ 'Log' => $options['log'], 'MessageDate<' => Serialize::iso8601Date($options['messageDateBefore']), 'MessageDate' => Serialize::iso8601Date($options['messageDate']), 'MessageDate>' => Serialize::iso8601Date($options['messageDateAfter']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new NotificationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of NotificationInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return NotificationPage Page of NotificationInstance */ public function getPage(string $targetUrl): NotificationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new NotificationPage($this->version, $response, $this->solution); } /** * Constructs a NotificationContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): NotificationContext { return new NotificationContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NotificationList]'; } } V2010/Account/Call/UserDefinedMessageSubscriptionInstance.php 0000644 00000007116 15111164113 0020027 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $callSid * @property string $sid * @property \DateTime $dateCreated * @property string $uri */ class UserDefinedMessageSubscriptionInstance extends InstanceResource { /** * Initialize the UserDefinedMessageSubscriptionInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid Account SID. * @param string $callSid Call SID. * @param string $sid User Defined Message Subscription SID. */ public function __construct(Version $version, array $payload, string $accountSid, string $callSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'sid' => Values::array_get($payload, 'sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UserDefinedMessageSubscriptionContext Context for this * UserDefinedMessageSubscriptionInstance */ protected function proxy(): UserDefinedMessageSubscriptionContext { if (!$this->context) { $this->context = new UserDefinedMessageSubscriptionContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the UserDefinedMessageSubscriptionInstance * * @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.Api.V2010.UserDefinedMessageSubscriptionInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Call/RecordingList.php 0000644 00000015357 15111164113 0013011 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class RecordingList extends ListResource { /** * Construct the RecordingList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $callSid The SID of the Call the resource is associated with */ public function __construct(Version $version, string $accountSid, string $callSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Recordings.json'; } /** * Create the RecordingInstance * * @param array|Options $options Optional Arguments * @return RecordingInstance Created RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): RecordingInstance { $options = new Values($options); $data = Values::of([ 'RecordingStatusCallbackEvent' => Serialize::map($options['recordingStatusCallbackEvent'], function($e) { return $e; }), 'RecordingStatusCallback' => $options['recordingStatusCallback'], 'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'], 'Trim' => $options['trim'], 'RecordingChannels' => $options['recordingChannels'], 'RecordingTrack' => $options['recordingTrack'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new RecordingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Streams RecordingInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RecordingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 RecordingInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of RecordingInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 RecordingPage Page of RecordingInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RecordingPage { $options = new Values($options); $params = Values::of([ 'DateCreated<' => Serialize::iso8601Date($options['dateCreatedBefore']), 'DateCreated' => Serialize::iso8601Date($options['dateCreated']), 'DateCreated>' => Serialize::iso8601Date($options['dateCreatedAfter']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RecordingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RecordingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RecordingPage Page of RecordingInstance */ public function getPage(string $targetUrl): RecordingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RecordingPage($this->version, $response, $this->solution); } /** * Constructs a RecordingContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): RecordingContext { return new RecordingContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.RecordingList]'; } } V2010/Account/Call/EventList.php 0000644 00000011067 15111164114 0012151 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class EventList extends ListResource { /** * Construct the EventList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created this resource * @param string $callSid The unique string that identifies this resource */ public function __construct(Version $version, string $accountSid, string $callSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Events.json'; } /** * Streams EventInstance 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 EventInstance 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 EventInstance[] 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 EventInstance 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 EventPage Page of EventInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): EventPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new EventPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of EventInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return EventPage Page of EventInstance */ public function getPage(string $targetUrl): EventPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new EventPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.EventList]'; } } V2010/Account/Call/PaymentInstance.php 0000644 00000010626 15111164114 0013336 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; /** * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. * * @property string $accountSid * @property string $callSid * @property string $sid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $uri */ class PaymentInstance extends InstanceResource { /** * Initialize the PaymentInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the Payments * resource. * @param string $callSid The SID of the Call the resource is associated with. * @param string $sid The SID of Payments session */ public function __construct(Version $version, array $payload, string $accountSid, string $callSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'sid' => Values::array_get($payload, 'sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return PaymentContext Context for this PaymentInstance */ protected function proxy(): PaymentContext { if (!$this->context) { $this->context = new PaymentContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the PaymentInstance * * @param string $idempotencyKey A unique token that will be used to ensure * that multiple API calls with the same * information do not result in multiple * transactions. * @param string $statusCallback Provide an absolute or relative URL to receive * status updates regarding your Pay session. * @param array|Options $options Optional Arguments * @return PaymentInstance Updated PaymentInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $idempotencyKey, string $statusCallback, array $options = []): PaymentInstance { return $this->proxy()->update($idempotencyKey, $statusCallback, $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.Api.V2010.PaymentInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Call/NotificationPage.php 0000644 00000002446 15111164114 0013460 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class NotificationPage 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 NotificationInstance \Twilio\Rest\Api\V2010\Account\Call\NotificationInstance */ public function buildInstance(array $payload): NotificationInstance { return new NotificationInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NotificationPage]'; } } V2010/Account/Call/RecordingOptions.php 0000644 00000030400 15111164115 0013515 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Options; use Twilio\Values; abstract class RecordingOptions { /** * @param string[] $recordingStatusCallbackEvent The recording status changes * that should generate a callback * @param string $recordingStatusCallback The callback URL on each selected * recording event * @param string $recordingStatusCallbackMethod The HTTP method we should use * to call * `recording_status_callback` * @param string $trim Whether to trim the silence in the recording * @param string $recordingChannels The number of channels that the output * recording will be configured with * @param string $recordingTrack Which track(s) to record * @return CreateRecordingOptions Options builder */ public static function create(array $recordingStatusCallbackEvent = Values::ARRAY_NONE, string $recordingStatusCallback = Values::NONE, string $recordingStatusCallbackMethod = Values::NONE, string $trim = Values::NONE, string $recordingChannels = Values::NONE, string $recordingTrack = Values::NONE): CreateRecordingOptions { return new CreateRecordingOptions($recordingStatusCallbackEvent, $recordingStatusCallback, $recordingStatusCallbackMethod, $trim, $recordingChannels, $recordingTrack); } /** * @param string $pauseBehavior Whether to record or not during the pause * period. * @return UpdateRecordingOptions Options builder */ public static function update(string $pauseBehavior = Values::NONE): UpdateRecordingOptions { return new UpdateRecordingOptions($pauseBehavior); } /** * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to * read * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to * read * @return ReadRecordingOptions Options builder */ public static function read(string $dateCreatedBefore = Values::NONE, string $dateCreated = Values::NONE, string $dateCreatedAfter = Values::NONE): ReadRecordingOptions { return new ReadRecordingOptions($dateCreatedBefore, $dateCreated, $dateCreatedAfter); } } class CreateRecordingOptions extends Options { /** * @param string[] $recordingStatusCallbackEvent The recording status changes * that should generate a callback * @param string $recordingStatusCallback The callback URL on each selected * recording event * @param string $recordingStatusCallbackMethod The HTTP method we should use * to call * `recording_status_callback` * @param string $trim Whether to trim the silence in the recording * @param string $recordingChannels The number of channels that the output * recording will be configured with * @param string $recordingTrack Which track(s) to record */ public function __construct(array $recordingStatusCallbackEvent = Values::ARRAY_NONE, string $recordingStatusCallback = Values::NONE, string $recordingStatusCallbackMethod = Values::NONE, string $trim = Values::NONE, string $recordingChannels = Values::NONE, string $recordingTrack = Values::NONE) { $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent; $this->options['recordingStatusCallback'] = $recordingStatusCallback; $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; $this->options['trim'] = $trim; $this->options['recordingChannels'] = $recordingChannels; $this->options['recordingTrack'] = $recordingTrack; } /** * The recording status events on which we should call the `recording_status_callback` URL. Can be: `in-progress`, `completed` and `absent` and the default is `completed`. Separate multiple event values with a space. * * @param string[] $recordingStatusCallbackEvent The recording status changes * that should generate a callback * @return $this Fluent Builder */ public function setRecordingStatusCallbackEvent(array $recordingStatusCallbackEvent): self { $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent; return $this; } /** * The URL we should call using the `recording_status_callback_method` on each recording event specified in `recording_status_callback_event`. For more information, see [RecordingStatusCallback parameters](https://www.twilio.com/docs/voice/api/recording#recordingstatuscallback). * * @param string $recordingStatusCallback The callback URL on each selected * recording event * @return $this Fluent Builder */ public function setRecordingStatusCallback(string $recordingStatusCallback): self { $this->options['recordingStatusCallback'] = $recordingStatusCallback; return $this; } /** * The HTTP method we should use to call `recording_status_callback`. Can be: `GET` or `POST` and the default is `POST`. * * @param string $recordingStatusCallbackMethod The HTTP method we should use * to call * `recording_status_callback` * @return $this Fluent Builder */ public function setRecordingStatusCallbackMethod(string $recordingStatusCallbackMethod): self { $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; return $this; } /** * Whether to trim any leading and trailing silence in the recording. Can be: `trim-silence` or `do-not-trim` and the default is `do-not-trim`. `trim-silence` trims the silence from the beginning and end of the recording and `do-not-trim` does not. * * @param string $trim Whether to trim the silence in the recording * @return $this Fluent Builder */ public function setTrim(string $trim): self { $this->options['trim'] = $trim; return $this; } /** * The number of channels used in the recording. Can be: `mono` or `dual` and the default is `mono`. `mono` records all parties of the call into one channel. `dual` records each party of a 2-party call into separate channels. * * @param string $recordingChannels The number of channels that the output * recording will be configured with * @return $this Fluent Builder */ public function setRecordingChannels(string $recordingChannels): self { $this->options['recordingChannels'] = $recordingChannels; return $this; } /** * The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. * * @param string $recordingTrack Which track(s) to record * @return $this Fluent Builder */ public function setRecordingTrack(string $recordingTrack): self { $this->options['recordingTrack'] = $recordingTrack; 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.Api.V2010.CreateRecordingOptions ' . $options . ']'; } } class UpdateRecordingOptions extends Options { /** * @param string $pauseBehavior Whether to record or not during the pause * period. */ public function __construct(string $pauseBehavior = Values::NONE) { $this->options['pauseBehavior'] = $pauseBehavior; } /** * Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. * * @param string $pauseBehavior Whether to record or not during the pause * period. * @return $this Fluent Builder */ public function setPauseBehavior(string $pauseBehavior): self { $this->options['pauseBehavior'] = $pauseBehavior; 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.Api.V2010.UpdateRecordingOptions ' . $options . ']'; } } class ReadRecordingOptions extends Options { /** * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to * read * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to * read */ public function __construct(string $dateCreatedBefore = Values::NONE, string $dateCreated = Values::NONE, string $dateCreatedAfter = Values::NONE) { $this->options['dateCreatedBefore'] = $dateCreatedBefore; $this->options['dateCreated'] = $dateCreated; $this->options['dateCreatedAfter'] = $dateCreatedAfter; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. * * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to * read * @return $this Fluent Builder */ public function setDateCreatedBefore(string $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. * * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read * @return $this Fluent Builder */ public function setDateCreated(string $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. * * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to * read * @return $this Fluent Builder */ public function setDateCreatedAfter(string $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; 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.Api.V2010.ReadRecordingOptions ' . $options . ']'; } } V2010/Account/Call/PaymentList.php 0000644 00000007472 15111164116 0012514 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Values; use Twilio\Version; /** * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. */ class PaymentList extends ListResource { /** * Construct the PaymentList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the Payments * resource. * @param string $callSid The SID of the Call the resource is associated with. */ public function __construct(Version $version, string $accountSid, string $callSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Payments.json'; } /** * Create the PaymentInstance * * @param string $idempotencyKey A unique token that will be used to ensure * that multiple API calls with the same * information do not result in multiple * transactions. * @param string $statusCallback Provide an absolute or relative URL to receive * status updates regarding your Pay session.. * @param array|Options $options Optional Arguments * @return PaymentInstance Created PaymentInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $idempotencyKey, string $statusCallback, array $options = []): PaymentInstance { $options = new Values($options); $data = Values::of([ 'IdempotencyKey' => $idempotencyKey, 'StatusCallback' => $statusCallback, 'BankAccountType' => $options['bankAccountType'], 'ChargeAmount' => $options['chargeAmount'], 'Currency' => $options['currency'], 'Description' => $options['description'], 'Input' => $options['input'], 'MinPostalCodeLength' => $options['minPostalCodeLength'], 'Parameter' => Serialize::jsonObject($options['parameter']), 'PaymentConnector' => $options['paymentConnector'], 'PaymentMethod' => $options['paymentMethod'], 'PostalCode' => Serialize::booleanToString($options['postalCode']), 'SecurityCode' => Serialize::booleanToString($options['securityCode']), 'Timeout' => $options['timeout'], 'TokenType' => $options['tokenType'], 'ValidCardTypes' => $options['validCardTypes'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new PaymentInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Constructs a PaymentContext * * @param string $sid The SID of Payments session */ public function getContext(string $sid): PaymentContext { return new PaymentContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.PaymentList]'; } } V2010/Account/Call/UserDefinedMessageOptions.php 0000644 00000004107 15111164116 0015311 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Options; use Twilio\Values; abstract class UserDefinedMessageOptions { /** * @param string $idempotencyKey A unique string value to identify API call. * This should be a unique string value per API * call and can be a randomly generated. * @return CreateUserDefinedMessageOptions Options builder */ public static function create(string $idempotencyKey = Values::NONE): CreateUserDefinedMessageOptions { return new CreateUserDefinedMessageOptions($idempotencyKey); } } class CreateUserDefinedMessageOptions extends Options { /** * @param string $idempotencyKey A unique string value to identify API call. * This should be a unique string value per API * call and can be a randomly generated. */ public function __construct(string $idempotencyKey = Values::NONE) { $this->options['idempotencyKey'] = $idempotencyKey; } /** * A unique string value to identify API call. This should be a unique string value per API call and can be a randomly generated. * * @param string $idempotencyKey A unique string value to identify API call. * This should be a unique string value per API * call and can be a randomly generated. * @return $this Fluent Builder */ public function setIdempotencyKey(string $idempotencyKey): self { $this->options['idempotencyKey'] = $idempotencyKey; 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.Api.V2010.CreateUserDefinedMessageOptions ' . $options . ']'; } } V2010/Account/Call/RecordingContext.php 0000644 00000006070 15111164116 0013515 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Values; use Twilio\Version; class RecordingContext extends InstanceContext { /** * Initialize the RecordingContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $callSid The Call SID of the resource to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $callSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Recordings/' . \rawurlencode($sid) . '.json'; } /** * Update the RecordingInstance * * @param string $status The new status of the recording * @param array|Options $options Optional Arguments * @return RecordingInstance Updated RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status, array $options = []): RecordingInstance { $options = new Values($options); $data = Values::of(['Status' => $status, 'PauseBehavior' => $options['pauseBehavior'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RecordingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } /** * Fetch the RecordingInstance * * @return RecordingInstance Fetched RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RecordingInstance { $payload = $this->version->fetch('GET', $this->uri); return new RecordingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } /** * Delete the RecordingInstance * * @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.Api.V2010.RecordingContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Call/EventPage.php 0000644 00000002374 15111164117 0012116 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class EventPage 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 EventInstance \Twilio\Rest\Api\V2010\Account\Call\EventInstance */ public function buildInstance(array $payload): EventInstance { return new EventInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.EventPage]'; } } V2010/Account/Call/FeedbackSummaryList.php 0000644 00000005056 15111164117 0014136 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Values; use Twilio\Version; class FeedbackSummaryList extends ListResource { /** * Construct the FeedbackSummaryList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created this resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/FeedbackSummary.json'; } /** * Create the FeedbackSummaryInstance * * @param \DateTime $startDate Only include feedback given on or after this date * @param \DateTime $endDate Only include feedback given on or before this date * @param array|Options $options Optional Arguments * @return FeedbackSummaryInstance Created FeedbackSummaryInstance * @throws TwilioException When an HTTP error occurs. */ public function create(\DateTime $startDate, \DateTime $endDate, array $options = []): FeedbackSummaryInstance { $options = new Values($options); $data = Values::of([ 'StartDate' => Serialize::iso8601Date($startDate), 'EndDate' => Serialize::iso8601Date($endDate), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FeedbackSummaryInstance($this->version, $payload, $this->solution['accountSid']); } /** * Constructs a FeedbackSummaryContext * * @param string $sid A string that uniquely identifies this feedback summary * resource */ public function getContext(string $sid): FeedbackSummaryContext { return new FeedbackSummaryContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.FeedbackSummaryList]'; } } V2010/Account/Call/StreamPage.php 0000644 00000002402 15111164120 0012252 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class StreamPage 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 StreamInstance \Twilio\Rest\Api\V2010\Account\Call\StreamInstance */ public function buildInstance(array $payload): StreamInstance { return new StreamInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.StreamPage]'; } } V2010/Account/Call/StreamContext.php 0000644 00000004071 15111164120 0013026 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; class StreamContext extends InstanceContext { /** * Initialize the StreamContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created this resource * @param string $callSid The SID of the Call the resource is associated with * @param string $sid The SID of the Stream resource, or the `name` */ public function __construct(Version $version, $accountSid, $callSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Streams/' . \rawurlencode($sid) . '.json'; } /** * Update the StreamInstance * * @param string $status The status. Must have the value `stopped` * @return StreamInstance Updated StreamInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): StreamInstance { $data = Values::of(['Status' => $status, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new StreamInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } /** * 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.Api.V2010.StreamContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Call/StreamInstance.php 0000644 00000007275 15111164120 0013157 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $sid * @property string $accountSid * @property string $callSid * @property string $name * @property string $status * @property \DateTime $dateUpdated * @property string $uri */ class StreamInstance extends InstanceResource { /** * Initialize the StreamInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created this resource * @param string $callSid The SID of the Call the resource is associated with * @param string $sid The SID of the Stream resource, or the `name` */ public function __construct(Version $version, array $payload, string $accountSid, string $callSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'name' => Values::array_get($payload, 'name'), 'status' => Values::array_get($payload, 'status'), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return StreamContext Context for this StreamInstance */ protected function proxy(): StreamContext { if (!$this->context) { $this->context = new StreamContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the StreamInstance * * @param string $status The status. Must have the value `stopped` * @return StreamInstance Updated StreamInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): StreamInstance { return $this->proxy()->update($status); } /** * 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.Api.V2010.StreamInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Call/RecordingInstance.php 0000644 00000012752 15111164121 0013635 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property string $callSid * @property string $conferenceSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property \DateTime $startTime * @property string $duration * @property string $sid * @property string $price * @property string $uri * @property array $encryptionDetails * @property string $priceUnit * @property string $status * @property int $channels * @property string $source * @property int $errorCode * @property string $track */ class RecordingInstance extends InstanceResource { /** * Initialize the RecordingInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $callSid The SID of the Call the resource is associated with * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $callSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'callSid' => Values::array_get($payload, 'call_sid'), 'conferenceSid' => Values::array_get($payload, 'conference_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'duration' => Values::array_get($payload, 'duration'), 'sid' => Values::array_get($payload, 'sid'), 'price' => Values::array_get($payload, 'price'), 'uri' => Values::array_get($payload, 'uri'), 'encryptionDetails' => Values::array_get($payload, 'encryption_details'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'status' => Values::array_get($payload, 'status'), 'channels' => Values::array_get($payload, 'channels'), 'source' => Values::array_get($payload, 'source'), 'errorCode' => Values::array_get($payload, 'error_code'), 'track' => Values::array_get($payload, 'track'), ]; $this->solution = [ 'accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RecordingContext Context for this RecordingInstance */ protected function proxy(): RecordingContext { if (!$this->context) { $this->context = new RecordingContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the RecordingInstance * * @param string $status The new status of the recording * @param array|Options $options Optional Arguments * @return RecordingInstance Updated RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status, array $options = []): RecordingInstance { return $this->proxy()->update($status, $options); } /** * Fetch the RecordingInstance * * @return RecordingInstance Fetched RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RecordingInstance { return $this->proxy()->fetch(); } /** * Delete the RecordingInstance * * @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.Api.V2010.RecordingInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Call/NotificationInstance.php 0000644 00000011436 15111164121 0014345 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property string $callSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $errorCode * @property string $log * @property \DateTime $messageDate * @property string $messageText * @property string $moreInfo * @property string $requestMethod * @property string $requestUrl * @property string $requestVariables * @property string $responseBody * @property string $responseHeaders * @property string $sid * @property string $uri */ class NotificationInstance extends InstanceResource { /** * Initialize the NotificationInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $callSid The SID of the Call the resource is associated with * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $callSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'callSid' => Values::array_get($payload, 'call_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'errorCode' => Values::array_get($payload, 'error_code'), 'log' => Values::array_get($payload, 'log'), 'messageDate' => Deserialize::dateTime(Values::array_get($payload, 'message_date')), 'messageText' => Values::array_get($payload, 'message_text'), 'moreInfo' => Values::array_get($payload, 'more_info'), 'requestMethod' => Values::array_get($payload, 'request_method'), 'requestUrl' => Values::array_get($payload, 'request_url'), 'requestVariables' => Values::array_get($payload, 'request_variables'), 'responseBody' => Values::array_get($payload, 'response_body'), 'responseHeaders' => Values::array_get($payload, 'response_headers'), 'sid' => Values::array_get($payload, 'sid'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return NotificationContext Context for this NotificationInstance */ protected function proxy(): NotificationContext { if (!$this->context) { $this->context = new NotificationContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the NotificationInstance * * @return NotificationInstance Fetched NotificationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NotificationInstance { 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.Api.V2010.NotificationInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Call/NotificationOptions.php 0000644 00000007373 15111164122 0014242 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Options; use Twilio\Values; abstract class NotificationOptions { /** * @param int $log Filter by log level * @param string $messageDateBefore Filter by date * @param string $messageDate Filter by date * @param string $messageDateAfter Filter by date * @return ReadNotificationOptions Options builder */ public static function read(int $log = Values::NONE, string $messageDateBefore = Values::NONE, string $messageDate = Values::NONE, string $messageDateAfter = Values::NONE): ReadNotificationOptions { return new ReadNotificationOptions($log, $messageDateBefore, $messageDate, $messageDateAfter); } } class ReadNotificationOptions extends Options { /** * @param int $log Filter by log level * @param string $messageDateBefore Filter by date * @param string $messageDate Filter by date * @param string $messageDateAfter Filter by date */ public function __construct(int $log = Values::NONE, string $messageDateBefore = Values::NONE, string $messageDate = Values::NONE, string $messageDateAfter = Values::NONE) { $this->options['log'] = $log; $this->options['messageDateBefore'] = $messageDateBefore; $this->options['messageDate'] = $messageDate; $this->options['messageDateAfter'] = $messageDateAfter; } /** * Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read. * * @param int $log Filter by log level * @return $this Fluent Builder */ public function setLog(int $log): self { $this->options['log'] = $log; return $this; } /** * Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. * * @param string $messageDateBefore Filter by date * @return $this Fluent Builder */ public function setMessageDateBefore(string $messageDateBefore): self { $this->options['messageDateBefore'] = $messageDateBefore; return $this; } /** * Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. * * @param string $messageDate Filter by date * @return $this Fluent Builder */ public function setMessageDate(string $messageDate): self { $this->options['messageDate'] = $messageDate; return $this; } /** * Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. * * @param string $messageDateAfter Filter by date * @return $this Fluent Builder */ public function setMessageDateAfter(string $messageDateAfter): self { $this->options['messageDateAfter'] = $messageDateAfter; 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.Api.V2010.ReadNotificationOptions ' . $options . ']'; } } V2010/Account/Call/UserDefinedMessageSubscriptionPage.php 0000644 00000002622 15111164122 0017134 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class UserDefinedMessageSubscriptionPage 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 UserDefinedMessageSubscriptionInstance \Twilio\Rest\Api\V2010\Account\Call\UserDefinedMessageSubscriptionInstance */ public function buildInstance(array $payload): UserDefinedMessageSubscriptionInstance { return new UserDefinedMessageSubscriptionInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.UserDefinedMessageSubscriptionPage]'; } } V2010/Account/Call/SiprecInstance.php 0000644 00000007275 15111164122 0013153 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $sid * @property string $accountSid * @property string $callSid * @property string $name * @property string $status * @property \DateTime $dateUpdated * @property string $uri */ class SiprecInstance extends InstanceResource { /** * Initialize the SiprecInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created this resource * @param string $callSid The SID of the Call the resource is associated with * @param string $sid The SID of the Siprec resource, or the `name` */ public function __construct(Version $version, array $payload, string $accountSid, string $callSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'name' => Values::array_get($payload, 'name'), 'status' => Values::array_get($payload, 'status'), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SiprecContext Context for this SiprecInstance */ protected function proxy(): SiprecContext { if (!$this->context) { $this->context = new SiprecContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the SiprecInstance * * @param string $status The status. Must have the value `stopped` * @return SiprecInstance Updated SiprecInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): SiprecInstance { return $this->proxy()->update($status); } /** * 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.Api.V2010.SiprecInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Call/RecordingPage.php 0000644 00000002424 15111164123 0012742 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class RecordingPage 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 RecordingInstance \Twilio\Rest\Api\V2010\Account\Call\RecordingInstance */ public function buildInstance(array $payload): RecordingInstance { return new RecordingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.RecordingPage]'; } } V2010/Account/Call/PaymentPage.php 0000644 00000002723 15111164123 0012445 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; /** * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. */ class PaymentPage 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 PaymentInstance \Twilio\Rest\Api\V2010\Account\Call\PaymentInstance */ public function buildInstance(array $payload): PaymentInstance { return new PaymentInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.PaymentPage]'; } } V2010/Account/Call/FeedbackSummaryOptions.php 0000644 00000007303 15111164124 0014651 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Options; use Twilio\Values; abstract class FeedbackSummaryOptions { /** * @param bool $includeSubaccounts `true` includes feedback from the specified * account and its subaccounts * @param string $statusCallback The URL that we will request when the feedback * summary is complete * @param string $statusCallbackMethod The HTTP method we use to make requests * to the StatusCallback URL * @return CreateFeedbackSummaryOptions Options builder */ public static function create(bool $includeSubaccounts = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE): CreateFeedbackSummaryOptions { return new CreateFeedbackSummaryOptions($includeSubaccounts, $statusCallback, $statusCallbackMethod); } } class CreateFeedbackSummaryOptions extends Options { /** * @param bool $includeSubaccounts `true` includes feedback from the specified * account and its subaccounts * @param string $statusCallback The URL that we will request when the feedback * summary is complete * @param string $statusCallbackMethod The HTTP method we use to make requests * to the StatusCallback URL */ public function __construct(bool $includeSubaccounts = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE) { $this->options['includeSubaccounts'] = $includeSubaccounts; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; } /** * Whether to also include Feedback resources from all subaccounts. `true` includes feedback from all subaccounts and `false`, the default, includes feedback from only the specified account. * * @param bool $includeSubaccounts `true` includes feedback from the specified * account and its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; return $this; } /** * The URL that we will request when the feedback summary is complete. * * @param string $statusCallback The URL that we will request when the feedback * summary is complete * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method (`GET` or `POST`) we use to make the request to the `StatusCallback` URL. * * @param string $statusCallbackMethod The HTTP method we use to make requests * to the StatusCallback URL * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; 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.Api.V2010.CreateFeedbackSummaryOptions ' . $options . ']'; } } V2010/Account/Call/StreamList.php 0000644 00000035475 15111164124 0012335 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; class StreamList extends ListResource { /** * Construct the StreamList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created this resource * @param string $callSid The SID of the Call the resource is associated with */ public function __construct(Version $version, string $accountSid, string $callSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Streams.json'; } /** * Create the StreamInstance * * @param string $url Url where WebSocket connection will be established. * @param array|Options $options Optional Arguments * @return StreamInstance Created StreamInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $url, array $options = []): StreamInstance { $options = new Values($options); $data = Values::of([ 'Url' => $url, 'Name' => $options['name'], 'Track' => $options['track'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'Parameter1.Name' => $options['parameter1Name'], 'Parameter1.Value' => $options['parameter1Value'], 'Parameter2.Name' => $options['parameter2Name'], 'Parameter2.Value' => $options['parameter2Value'], 'Parameter3.Name' => $options['parameter3Name'], 'Parameter3.Value' => $options['parameter3Value'], 'Parameter4.Name' => $options['parameter4Name'], 'Parameter4.Value' => $options['parameter4Value'], 'Parameter5.Name' => $options['parameter5Name'], 'Parameter5.Value' => $options['parameter5Value'], 'Parameter6.Name' => $options['parameter6Name'], 'Parameter6.Value' => $options['parameter6Value'], 'Parameter7.Name' => $options['parameter7Name'], 'Parameter7.Value' => $options['parameter7Value'], 'Parameter8.Name' => $options['parameter8Name'], 'Parameter8.Value' => $options['parameter8Value'], 'Parameter9.Name' => $options['parameter9Name'], 'Parameter9.Value' => $options['parameter9Value'], 'Parameter10.Name' => $options['parameter10Name'], 'Parameter10.Value' => $options['parameter10Value'], 'Parameter11.Name' => $options['parameter11Name'], 'Parameter11.Value' => $options['parameter11Value'], 'Parameter12.Name' => $options['parameter12Name'], 'Parameter12.Value' => $options['parameter12Value'], 'Parameter13.Name' => $options['parameter13Name'], 'Parameter13.Value' => $options['parameter13Value'], 'Parameter14.Name' => $options['parameter14Name'], 'Parameter14.Value' => $options['parameter14Value'], 'Parameter15.Name' => $options['parameter15Name'], 'Parameter15.Value' => $options['parameter15Value'], 'Parameter16.Name' => $options['parameter16Name'], 'Parameter16.Value' => $options['parameter16Value'], 'Parameter17.Name' => $options['parameter17Name'], 'Parameter17.Value' => $options['parameter17Value'], 'Parameter18.Name' => $options['parameter18Name'], 'Parameter18.Value' => $options['parameter18Value'], 'Parameter19.Name' => $options['parameter19Name'], 'Parameter19.Value' => $options['parameter19Value'], 'Parameter20.Name' => $options['parameter20Name'], 'Parameter20.Value' => $options['parameter20Value'], 'Parameter21.Name' => $options['parameter21Name'], 'Parameter21.Value' => $options['parameter21Value'], 'Parameter22.Name' => $options['parameter22Name'], 'Parameter22.Value' => $options['parameter22Value'], 'Parameter23.Name' => $options['parameter23Name'], 'Parameter23.Value' => $options['parameter23Value'], 'Parameter24.Name' => $options['parameter24Name'], 'Parameter24.Value' => $options['parameter24Value'], 'Parameter25.Name' => $options['parameter25Name'], 'Parameter25.Value' => $options['parameter25Value'], 'Parameter26.Name' => $options['parameter26Name'], 'Parameter26.Value' => $options['parameter26Value'], 'Parameter27.Name' => $options['parameter27Name'], 'Parameter27.Value' => $options['parameter27Value'], 'Parameter28.Name' => $options['parameter28Name'], 'Parameter28.Value' => $options['parameter28Value'], 'Parameter29.Name' => $options['parameter29Name'], 'Parameter29.Value' => $options['parameter29Value'], 'Parameter30.Name' => $options['parameter30Name'], 'Parameter30.Value' => $options['parameter30Value'], 'Parameter31.Name' => $options['parameter31Name'], 'Parameter31.Value' => $options['parameter31Value'], 'Parameter32.Name' => $options['parameter32Name'], 'Parameter32.Value' => $options['parameter32Value'], 'Parameter33.Name' => $options['parameter33Name'], 'Parameter33.Value' => $options['parameter33Value'], 'Parameter34.Name' => $options['parameter34Name'], 'Parameter34.Value' => $options['parameter34Value'], 'Parameter35.Name' => $options['parameter35Name'], 'Parameter35.Value' => $options['parameter35Value'], 'Parameter36.Name' => $options['parameter36Name'], 'Parameter36.Value' => $options['parameter36Value'], 'Parameter37.Name' => $options['parameter37Name'], 'Parameter37.Value' => $options['parameter37Value'], 'Parameter38.Name' => $options['parameter38Name'], 'Parameter38.Value' => $options['parameter38Value'], 'Parameter39.Name' => $options['parameter39Name'], 'Parameter39.Value' => $options['parameter39Value'], 'Parameter40.Name' => $options['parameter40Name'], 'Parameter40.Value' => $options['parameter40Value'], 'Parameter41.Name' => $options['parameter41Name'], 'Parameter41.Value' => $options['parameter41Value'], 'Parameter42.Name' => $options['parameter42Name'], 'Parameter42.Value' => $options['parameter42Value'], 'Parameter43.Name' => $options['parameter43Name'], 'Parameter43.Value' => $options['parameter43Value'], 'Parameter44.Name' => $options['parameter44Name'], 'Parameter44.Value' => $options['parameter44Value'], 'Parameter45.Name' => $options['parameter45Name'], 'Parameter45.Value' => $options['parameter45Value'], 'Parameter46.Name' => $options['parameter46Name'], 'Parameter46.Value' => $options['parameter46Value'], 'Parameter47.Name' => $options['parameter47Name'], 'Parameter47.Value' => $options['parameter47Value'], 'Parameter48.Name' => $options['parameter48Name'], 'Parameter48.Value' => $options['parameter48Value'], 'Parameter49.Name' => $options['parameter49Name'], 'Parameter49.Value' => $options['parameter49Value'], 'Parameter50.Name' => $options['parameter50Name'], 'Parameter50.Value' => $options['parameter50Value'], 'Parameter51.Name' => $options['parameter51Name'], 'Parameter51.Value' => $options['parameter51Value'], 'Parameter52.Name' => $options['parameter52Name'], 'Parameter52.Value' => $options['parameter52Value'], 'Parameter53.Name' => $options['parameter53Name'], 'Parameter53.Value' => $options['parameter53Value'], 'Parameter54.Name' => $options['parameter54Name'], 'Parameter54.Value' => $options['parameter54Value'], 'Parameter55.Name' => $options['parameter55Name'], 'Parameter55.Value' => $options['parameter55Value'], 'Parameter56.Name' => $options['parameter56Name'], 'Parameter56.Value' => $options['parameter56Value'], 'Parameter57.Name' => $options['parameter57Name'], 'Parameter57.Value' => $options['parameter57Value'], 'Parameter58.Name' => $options['parameter58Name'], 'Parameter58.Value' => $options['parameter58Value'], 'Parameter59.Name' => $options['parameter59Name'], 'Parameter59.Value' => $options['parameter59Value'], 'Parameter60.Name' => $options['parameter60Name'], 'Parameter60.Value' => $options['parameter60Value'], 'Parameter61.Name' => $options['parameter61Name'], 'Parameter61.Value' => $options['parameter61Value'], 'Parameter62.Name' => $options['parameter62Name'], 'Parameter62.Value' => $options['parameter62Value'], 'Parameter63.Name' => $options['parameter63Name'], 'Parameter63.Value' => $options['parameter63Value'], 'Parameter64.Name' => $options['parameter64Name'], 'Parameter64.Value' => $options['parameter64Value'], 'Parameter65.Name' => $options['parameter65Name'], 'Parameter65.Value' => $options['parameter65Value'], 'Parameter66.Name' => $options['parameter66Name'], 'Parameter66.Value' => $options['parameter66Value'], 'Parameter67.Name' => $options['parameter67Name'], 'Parameter67.Value' => $options['parameter67Value'], 'Parameter68.Name' => $options['parameter68Name'], 'Parameter68.Value' => $options['parameter68Value'], 'Parameter69.Name' => $options['parameter69Name'], 'Parameter69.Value' => $options['parameter69Value'], 'Parameter70.Name' => $options['parameter70Name'], 'Parameter70.Value' => $options['parameter70Value'], 'Parameter71.Name' => $options['parameter71Name'], 'Parameter71.Value' => $options['parameter71Value'], 'Parameter72.Name' => $options['parameter72Name'], 'Parameter72.Value' => $options['parameter72Value'], 'Parameter73.Name' => $options['parameter73Name'], 'Parameter73.Value' => $options['parameter73Value'], 'Parameter74.Name' => $options['parameter74Name'], 'Parameter74.Value' => $options['parameter74Value'], 'Parameter75.Name' => $options['parameter75Name'], 'Parameter75.Value' => $options['parameter75Value'], 'Parameter76.Name' => $options['parameter76Name'], 'Parameter76.Value' => $options['parameter76Value'], 'Parameter77.Name' => $options['parameter77Name'], 'Parameter77.Value' => $options['parameter77Value'], 'Parameter78.Name' => $options['parameter78Name'], 'Parameter78.Value' => $options['parameter78Value'], 'Parameter79.Name' => $options['parameter79Name'], 'Parameter79.Value' => $options['parameter79Value'], 'Parameter80.Name' => $options['parameter80Name'], 'Parameter80.Value' => $options['parameter80Value'], 'Parameter81.Name' => $options['parameter81Name'], 'Parameter81.Value' => $options['parameter81Value'], 'Parameter82.Name' => $options['parameter82Name'], 'Parameter82.Value' => $options['parameter82Value'], 'Parameter83.Name' => $options['parameter83Name'], 'Parameter83.Value' => $options['parameter83Value'], 'Parameter84.Name' => $options['parameter84Name'], 'Parameter84.Value' => $options['parameter84Value'], 'Parameter85.Name' => $options['parameter85Name'], 'Parameter85.Value' => $options['parameter85Value'], 'Parameter86.Name' => $options['parameter86Name'], 'Parameter86.Value' => $options['parameter86Value'], 'Parameter87.Name' => $options['parameter87Name'], 'Parameter87.Value' => $options['parameter87Value'], 'Parameter88.Name' => $options['parameter88Name'], 'Parameter88.Value' => $options['parameter88Value'], 'Parameter89.Name' => $options['parameter89Name'], 'Parameter89.Value' => $options['parameter89Value'], 'Parameter90.Name' => $options['parameter90Name'], 'Parameter90.Value' => $options['parameter90Value'], 'Parameter91.Name' => $options['parameter91Name'], 'Parameter91.Value' => $options['parameter91Value'], 'Parameter92.Name' => $options['parameter92Name'], 'Parameter92.Value' => $options['parameter92Value'], 'Parameter93.Name' => $options['parameter93Name'], 'Parameter93.Value' => $options['parameter93Value'], 'Parameter94.Name' => $options['parameter94Name'], 'Parameter94.Value' => $options['parameter94Value'], 'Parameter95.Name' => $options['parameter95Name'], 'Parameter95.Value' => $options['parameter95Value'], 'Parameter96.Name' => $options['parameter96Name'], 'Parameter96.Value' => $options['parameter96Value'], 'Parameter97.Name' => $options['parameter97Name'], 'Parameter97.Value' => $options['parameter97Value'], 'Parameter98.Name' => $options['parameter98Name'], 'Parameter98.Value' => $options['parameter98Value'], 'Parameter99.Name' => $options['parameter99Name'], 'Parameter99.Value' => $options['parameter99Value'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new StreamInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Constructs a StreamContext * * @param string $sid The SID of the Stream resource, or the `name` */ public function getContext(string $sid): StreamContext { return new StreamContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.StreamList]'; } } V2010/Account/Call/FeedbackInstance.php 0000644 00000010307 15111164125 0013403 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string[] $issues * @property int $qualityScore * @property string $sid */ class FeedbackInstance extends InstanceResource { /** * Initialize the FeedbackInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The unique sid that identifies this account * @param string $callSid The unique string that identifies this resource */ public function __construct(Version $version, array $payload, string $accountSid, string $callSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'issues' => Values::array_get($payload, 'issues'), 'qualityScore' => Values::array_get($payload, 'quality_score'), 'sid' => Values::array_get($payload, 'sid'), ]; $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FeedbackContext Context for this FeedbackInstance */ protected function proxy(): FeedbackContext { if (!$this->context) { $this->context = new FeedbackContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'] ); } return $this->context; } /** * Fetch the FeedbackInstance * * @return FeedbackInstance Fetched FeedbackInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FeedbackInstance { return $this->proxy()->fetch(); } /** * Create the FeedbackInstance * * @param int $qualityScore The call quality expressed as an integer from 1 to 5 * @param array|Options $options Optional Arguments * @return FeedbackInstance Created FeedbackInstance * @throws TwilioException When an HTTP error occurs. */ public function create(int $qualityScore, array $options = []): FeedbackInstance { return $this->proxy()->create($qualityScore, $options); } /** * Update the FeedbackInstance * * @param array|Options $options Optional Arguments * @return FeedbackInstance Updated FeedbackInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FeedbackInstance { 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.Api.V2010.FeedbackInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Call/PaymentContext.php 0000644 00000005757 15111164125 0013231 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Values; use Twilio\Version; /** * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. */ class PaymentContext extends InstanceContext { /** * Initialize the PaymentContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that will update the * resource * @param string $callSid The SID of the call that will create the resource. * @param string $sid The SID of Payments session */ public function __construct(Version $version, $accountSid, $callSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Payments/' . \rawurlencode($sid) . '.json'; } /** * Update the PaymentInstance * * @param string $idempotencyKey A unique token that will be used to ensure * that multiple API calls with the same * information do not result in multiple * transactions. * @param string $statusCallback Provide an absolute or relative URL to receive * status updates regarding your Pay session. * @param array|Options $options Optional Arguments * @return PaymentInstance Updated PaymentInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $idempotencyKey, string $statusCallback, array $options = []): PaymentInstance { $options = new Values($options); $data = Values::of([ 'IdempotencyKey' => $idempotencyKey, 'StatusCallback' => $statusCallback, 'Capture' => $options['capture'], 'Status' => $options['status'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new PaymentInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } /** * 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.Api.V2010.PaymentContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Call/EventInstance.php 0000644 00000003655 15111164125 0013010 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property array $request * @property array $response */ class EventInstance extends InstanceResource { /** * Initialize the EventInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created this resource * @param string $callSid The unique string that identifies this resource */ public function __construct(Version $version, array $payload, string $accountSid, string $callSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'request' => Values::array_get($payload, 'request'), 'response' => Values::array_get($payload, 'response'), ]; $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; } /** * 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.Api.V2010.EventInstance]'; } } V2010/Account/Call/FeedbackList.php 0000644 00000002353 15111164126 0012555 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\ListResource; use Twilio\Version; class FeedbackList extends ListResource { /** * Construct the FeedbackList * * @param Version $version Version that contains the resource * @param string $accountSid The unique sid that identifies this account * @param string $callSid The unique string that identifies this resource */ public function __construct(Version $version, string $accountSid, string $callSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; } /** * Constructs a FeedbackContext */ public function getContext(): FeedbackContext { return new FeedbackContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.FeedbackList]'; } } V2010/Account/Call/PaymentOptions.php 0000644 00000043060 15111164126 0013226 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Options; use Twilio\Values; /** * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. */ abstract class PaymentOptions { /** * @param string $bankAccountType Type of bank account if payment source is ACH. * @param string $chargeAmount A positive decimal value less than 1,000,000 to * charge against the credit card or bank account. * @param string $currency The currency of the `charge_amount`. * @param string $description The description can be used to provide more * details regarding the transaction. * @param string $input A list of inputs that should be accepted. Currently * only `dtmf` is supported. * @param int $minPostalCodeLength A positive integer that is used to validate * the length of the `PostalCode` inputted by * the user. * @param array $parameter A single-level JSON object used to pass custom * parameters to payment processors. (Required for ACH * payments) * @param string $paymentConnector This is the unique name corresponding to the * Pay Connector installed in the Twilio * Add-ons. * @param string $paymentMethod Type of payment being captured. * @param bool $postalCode Indicates whether the credit card PostalCode (zip * code) is a required piece of payment information * that must be provided by the caller. * @param bool $securityCode Indicates whether the credit card security code is * a required piece of payment information that must * be provided by the caller. * @param int $timeout The number of seconds that <Pay> should wait for the * caller to press a digit between each subsequent digit, * after the first one, before moving on to validate the * digits captured. * @param string $tokenType Indicates whether the payment method should be * tokenized as a `one-time` or `reusable` token. * @param string $validCardTypes Credit card types separated by space that Pay * should accept. * @return CreatePaymentOptions Options builder */ public static function create(string $bankAccountType = Values::NONE, string $chargeAmount = Values::NONE, string $currency = Values::NONE, string $description = Values::NONE, string $input = Values::NONE, int $minPostalCodeLength = Values::NONE, array $parameter = Values::ARRAY_NONE, string $paymentConnector = Values::NONE, string $paymentMethod = Values::NONE, bool $postalCode = Values::NONE, bool $securityCode = Values::NONE, int $timeout = Values::NONE, string $tokenType = Values::NONE, string $validCardTypes = Values::NONE): CreatePaymentOptions { return new CreatePaymentOptions($bankAccountType, $chargeAmount, $currency, $description, $input, $minPostalCodeLength, $parameter, $paymentConnector, $paymentMethod, $postalCode, $securityCode, $timeout, $tokenType, $validCardTypes); } /** * @param string $capture The piece of payment information that you wish the * caller to enter. * @param string $status Indicates whether the current payment session should * be cancelled or completed. * @return UpdatePaymentOptions Options builder */ public static function update(string $capture = Values::NONE, string $status = Values::NONE): UpdatePaymentOptions { return new UpdatePaymentOptions($capture, $status); } } class CreatePaymentOptions extends Options { /** * @param string $bankAccountType Type of bank account if payment source is ACH. * @param string $chargeAmount A positive decimal value less than 1,000,000 to * charge against the credit card or bank account. * @param string $currency The currency of the `charge_amount`. * @param string $description The description can be used to provide more * details regarding the transaction. * @param string $input A list of inputs that should be accepted. Currently * only `dtmf` is supported. * @param int $minPostalCodeLength A positive integer that is used to validate * the length of the `PostalCode` inputted by * the user. * @param array $parameter A single-level JSON object used to pass custom * parameters to payment processors. (Required for ACH * payments) * @param string $paymentConnector This is the unique name corresponding to the * Pay Connector installed in the Twilio * Add-ons. * @param string $paymentMethod Type of payment being captured. * @param bool $postalCode Indicates whether the credit card PostalCode (zip * code) is a required piece of payment information * that must be provided by the caller. * @param bool $securityCode Indicates whether the credit card security code is * a required piece of payment information that must * be provided by the caller. * @param int $timeout The number of seconds that <Pay> should wait for the * caller to press a digit between each subsequent digit, * after the first one, before moving on to validate the * digits captured. * @param string $tokenType Indicates whether the payment method should be * tokenized as a `one-time` or `reusable` token. * @param string $validCardTypes Credit card types separated by space that Pay * should accept. */ public function __construct(string $bankAccountType = Values::NONE, string $chargeAmount = Values::NONE, string $currency = Values::NONE, string $description = Values::NONE, string $input = Values::NONE, int $minPostalCodeLength = Values::NONE, array $parameter = Values::ARRAY_NONE, string $paymentConnector = Values::NONE, string $paymentMethod = Values::NONE, bool $postalCode = Values::NONE, bool $securityCode = Values::NONE, int $timeout = Values::NONE, string $tokenType = Values::NONE, string $validCardTypes = Values::NONE) { $this->options['bankAccountType'] = $bankAccountType; $this->options['chargeAmount'] = $chargeAmount; $this->options['currency'] = $currency; $this->options['description'] = $description; $this->options['input'] = $input; $this->options['minPostalCodeLength'] = $minPostalCodeLength; $this->options['parameter'] = $parameter; $this->options['paymentConnector'] = $paymentConnector; $this->options['paymentMethod'] = $paymentMethod; $this->options['postalCode'] = $postalCode; $this->options['securityCode'] = $securityCode; $this->options['timeout'] = $timeout; $this->options['tokenType'] = $tokenType; $this->options['validCardTypes'] = $validCardTypes; } /** * Type of bank account if payment source is ACH. One of `consumer-checking`, `consumer-savings`, or `commercial-checking`. The default value is `consumer-checking`. * * @param string $bankAccountType Type of bank account if payment source is ACH. * @return $this Fluent Builder */ public function setBankAccountType(string $bankAccountType): self { $this->options['bankAccountType'] = $bankAccountType; return $this; } /** * A positive decimal value less than 1,000,000 to charge against the credit card or bank account. Default currency can be overwritten with `currency` field. Leave blank or set to 0 to tokenize. * * @param string $chargeAmount A positive decimal value less than 1,000,000 to * charge against the credit card or bank account. * @return $this Fluent Builder */ public function setChargeAmount(string $chargeAmount): self { $this->options['chargeAmount'] = $chargeAmount; return $this; } /** * The currency of the `charge_amount`, formatted as [ISO 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) format. The default value is `USD` and all values allowed from the Pay Connector are accepted. * * @param string $currency The currency of the `charge_amount`. * @return $this Fluent Builder */ public function setCurrency(string $currency): self { $this->options['currency'] = $currency; return $this; } /** * The description can be used to provide more details regarding the transaction. This information is submitted along with the payment details to the Payment Connector which are then posted on the transactions. * * @param string $description The description can be used to provide more * details regarding the transaction. * @return $this Fluent Builder */ public function setDescription(string $description): self { $this->options['description'] = $description; return $this; } /** * A list of inputs that should be accepted. Currently only `dtmf` is supported. All digits captured during a pay session are redacted from the logs. * * @param string $input A list of inputs that should be accepted. Currently * only `dtmf` is supported. * @return $this Fluent Builder */ public function setInput(string $input): self { $this->options['input'] = $input; return $this; } /** * A positive integer that is used to validate the length of the `PostalCode` inputted by the user. User must enter this many digits. * * @param int $minPostalCodeLength A positive integer that is used to validate * the length of the `PostalCode` inputted by * the user. * @return $this Fluent Builder */ public function setMinPostalCodeLength(int $minPostalCodeLength): self { $this->options['minPostalCodeLength'] = $minPostalCodeLength; return $this; } /** * A single-level JSON object used to pass custom parameters to payment processors. (Required for ACH payments). The information that has to be included here depends on the <Pay> Connector. [Read more](https://www.twilio.com/console/voice/pay-connectors). * * @param array $parameter A single-level JSON object used to pass custom * parameters to payment processors. (Required for ACH * payments) * @return $this Fluent Builder */ public function setParameter(array $parameter): self { $this->options['parameter'] = $parameter; return $this; } /** * This is the unique name corresponding to the Pay Connector installed in the Twilio Add-ons. Learn more about [<Pay> Connectors](https://www.twilio.com/console/voice/pay-connectors). The default value is `Default`. * * @param string $paymentConnector This is the unique name corresponding to the * Pay Connector installed in the Twilio * Add-ons. * @return $this Fluent Builder */ public function setPaymentConnector(string $paymentConnector): self { $this->options['paymentConnector'] = $paymentConnector; return $this; } /** * Type of payment being captured. One of `credit-card` or `ach-debit`. The default value is `credit-card`. * * @param string $paymentMethod Type of payment being captured. * @return $this Fluent Builder */ public function setPaymentMethod(string $paymentMethod): self { $this->options['paymentMethod'] = $paymentMethod; return $this; } /** * Indicates whether the credit card postal code (zip code) is a required piece of payment information that must be provided by the caller. The default is `true`. * * @param bool $postalCode Indicates whether the credit card PostalCode (zip * code) is a required piece of payment information * that must be provided by the caller. * @return $this Fluent Builder */ public function setPostalCode(bool $postalCode): self { $this->options['postalCode'] = $postalCode; return $this; } /** * Indicates whether the credit card security code is a required piece of payment information that must be provided by the caller. The default is `true`. * * @param bool $securityCode Indicates whether the credit card security code is * a required piece of payment information that must * be provided by the caller. * @return $this Fluent Builder */ public function setSecurityCode(bool $securityCode): self { $this->options['securityCode'] = $securityCode; return $this; } /** * The number of seconds that <Pay> should wait for the caller to press a digit between each subsequent digit, after the first one, before moving on to validate the digits captured. The default is `5`, maximum is `600`. * * @param int $timeout The number of seconds that <Pay> should wait for the * caller to press a digit between each subsequent digit, * after the first one, before moving on to validate the * digits captured. * @return $this Fluent Builder */ public function setTimeout(int $timeout): self { $this->options['timeout'] = $timeout; return $this; } /** * Indicates whether the payment method should be tokenized as a `one-time` or `reusable` token. The default value is `reusable`. Do not enter a charge amount when tokenizing. If a charge amount is entered, the payment method will be charged and not tokenized. * * @param string $tokenType Indicates whether the payment method should be * tokenized as a `one-time` or `reusable` token. * @return $this Fluent Builder */ public function setTokenType(string $tokenType): self { $this->options['tokenType'] = $tokenType; return $this; } /** * Credit card types separated by space that Pay should accept. The default value is `visa mastercard amex` * * @param string $validCardTypes Credit card types separated by space that Pay * should accept. * @return $this Fluent Builder */ public function setValidCardTypes(string $validCardTypes): self { $this->options['validCardTypes'] = $validCardTypes; 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.Api.V2010.CreatePaymentOptions ' . $options . ']'; } } class UpdatePaymentOptions extends Options { /** * @param string $capture The piece of payment information that you wish the * caller to enter. * @param string $status Indicates whether the current payment session should * be cancelled or completed. */ public function __construct(string $capture = Values::NONE, string $status = Values::NONE) { $this->options['capture'] = $capture; $this->options['status'] = $status; } /** * The piece of payment information that you wish the caller to enter. Must be one of `payment-card-number`, `expiration-date`, `security-code`, `postal-code`, `bank-routing-number`, or `bank-account-number`. * * @param string $capture The piece of payment information that you wish the * caller to enter. * @return $this Fluent Builder */ public function setCapture(string $capture): self { $this->options['capture'] = $capture; return $this; } /** * Indicates whether the current payment session should be cancelled or completed. When `cancel` the payment session is cancelled. When `complete`, Twilio sends the payment information to the selected Pay Connector for processing. * * @param string $status Indicates whether the current payment session should * be cancelled or completed. * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; 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.Api.V2010.UpdatePaymentOptions ' . $options . ']'; } } V2010/Account/Call/UserDefinedMessageSubscriptionContext.php 0000644 00000003327 15111164127 0017714 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Version; class UserDefinedMessageSubscriptionContext extends InstanceContext { /** * Initialize the UserDefinedMessageSubscriptionContext * * @param Version $version Version that contains the resource * @param string $accountSid Account SID. * @param string $callSid Call SID. * @param string $sid User Defined Message Subscription SID. */ public function __construct(Version $version, $accountSid, $callSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/UserDefinedMessageSubscriptions/' . \rawurlencode($sid) . '.json'; } /** * Delete the UserDefinedMessageSubscriptionInstance * * @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.Api.V2010.UserDefinedMessageSubscriptionContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Call/UserDefinedMessageInstance.php 0000644 00000004202 15111164130 0015412 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $callSid * @property string $sid * @property \DateTime $dateCreated */ class UserDefinedMessageInstance extends InstanceResource { /** * Initialize the UserDefinedMessageInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid Account SID. * @param string $callSid Call SID. */ public function __construct(Version $version, array $payload, string $accountSid, string $callSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'sid' => Values::array_get($payload, 'sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), ]; $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; } /** * 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.Api.V2010.UserDefinedMessageInstance]'; } } V2010/Account/Call/FeedbackSummaryContext.php 0000644 00000004174 15111164130 0014642 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; class FeedbackSummaryContext extends InstanceContext { /** * Initialize the FeedbackSummaryContext * * @param Version $version Version that contains the resource * @param string $accountSid The unique sid that identifies this account * @param string $sid A string that uniquely identifies this feedback summary * resource */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/FeedbackSummary/' . \rawurlencode($sid) . '.json'; } /** * Fetch the FeedbackSummaryInstance * * @return FeedbackSummaryInstance Fetched FeedbackSummaryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FeedbackSummaryInstance { $payload = $this->version->fetch('GET', $this->uri); return new FeedbackSummaryInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the FeedbackSummaryInstance * * @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.Api.V2010.FeedbackSummaryContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Call/StreamOptions.php 0000644 00000343014 15111164130 0013041 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Options; use Twilio\Values; abstract class StreamOptions { /** * @param string $name The name of this resource * @param string $track One of `inbound_track`, `outbound_track`, `both_tracks`. * @param string $statusCallback Absolute URL of the status callback. * @param string $statusCallbackMethod The http method for the status_callback. * @param string $parameter1Name Parameter name * @param string $parameter1Value Parameter value * @param string $parameter2Name Parameter name * @param string $parameter2Value Parameter value * @param string $parameter3Name Parameter name * @param string $parameter3Value Parameter value * @param string $parameter4Name Parameter name * @param string $parameter4Value Parameter value * @param string $parameter5Name Parameter name * @param string $parameter5Value Parameter value * @param string $parameter6Name Parameter name * @param string $parameter6Value Parameter value * @param string $parameter7Name Parameter name * @param string $parameter7Value Parameter value * @param string $parameter8Name Parameter name * @param string $parameter8Value Parameter value * @param string $parameter9Name Parameter name * @param string $parameter9Value Parameter value * @param string $parameter10Name Parameter name * @param string $parameter10Value Parameter value * @param string $parameter11Name Parameter name * @param string $parameter11Value Parameter value * @param string $parameter12Name Parameter name * @param string $parameter12Value Parameter value * @param string $parameter13Name Parameter name * @param string $parameter13Value Parameter value * @param string $parameter14Name Parameter name * @param string $parameter14Value Parameter value * @param string $parameter15Name Parameter name * @param string $parameter15Value Parameter value * @param string $parameter16Name Parameter name * @param string $parameter16Value Parameter value * @param string $parameter17Name Parameter name * @param string $parameter17Value Parameter value * @param string $parameter18Name Parameter name * @param string $parameter18Value Parameter value * @param string $parameter19Name Parameter name * @param string $parameter19Value Parameter value * @param string $parameter20Name Parameter name * @param string $parameter20Value Parameter value * @param string $parameter21Name Parameter name * @param string $parameter21Value Parameter value * @param string $parameter22Name Parameter name * @param string $parameter22Value Parameter value * @param string $parameter23Name Parameter name * @param string $parameter23Value Parameter value * @param string $parameter24Name Parameter name * @param string $parameter24Value Parameter value * @param string $parameter25Name Parameter name * @param string $parameter25Value Parameter value * @param string $parameter26Name Parameter name * @param string $parameter26Value Parameter value * @param string $parameter27Name Parameter name * @param string $parameter27Value Parameter value * @param string $parameter28Name Parameter name * @param string $parameter28Value Parameter value * @param string $parameter29Name Parameter name * @param string $parameter29Value Parameter value * @param string $parameter30Name Parameter name * @param string $parameter30Value Parameter value * @param string $parameter31Name Parameter name * @param string $parameter31Value Parameter value * @param string $parameter32Name Parameter name * @param string $parameter32Value Parameter value * @param string $parameter33Name Parameter name * @param string $parameter33Value Parameter value * @param string $parameter34Name Parameter name * @param string $parameter34Value Parameter value * @param string $parameter35Name Parameter name * @param string $parameter35Value Parameter value * @param string $parameter36Name Parameter name * @param string $parameter36Value Parameter value * @param string $parameter37Name Parameter name * @param string $parameter37Value Parameter value * @param string $parameter38Name Parameter name * @param string $parameter38Value Parameter value * @param string $parameter39Name Parameter name * @param string $parameter39Value Parameter value * @param string $parameter40Name Parameter name * @param string $parameter40Value Parameter value * @param string $parameter41Name Parameter name * @param string $parameter41Value Parameter value * @param string $parameter42Name Parameter name * @param string $parameter42Value Parameter value * @param string $parameter43Name Parameter name * @param string $parameter43Value Parameter value * @param string $parameter44Name Parameter name * @param string $parameter44Value Parameter value * @param string $parameter45Name Parameter name * @param string $parameter45Value Parameter value * @param string $parameter46Name Parameter name * @param string $parameter46Value Parameter value * @param string $parameter47Name Parameter name * @param string $parameter47Value Parameter value * @param string $parameter48Name Parameter name * @param string $parameter48Value Parameter value * @param string $parameter49Name Parameter name * @param string $parameter49Value Parameter value * @param string $parameter50Name Parameter name * @param string $parameter50Value Parameter value * @param string $parameter51Name Parameter name * @param string $parameter51Value Parameter value * @param string $parameter52Name Parameter name * @param string $parameter52Value Parameter value * @param string $parameter53Name Parameter name * @param string $parameter53Value Parameter value * @param string $parameter54Name Parameter name * @param string $parameter54Value Parameter value * @param string $parameter55Name Parameter name * @param string $parameter55Value Parameter value * @param string $parameter56Name Parameter name * @param string $parameter56Value Parameter value * @param string $parameter57Name Parameter name * @param string $parameter57Value Parameter value * @param string $parameter58Name Parameter name * @param string $parameter58Value Parameter value * @param string $parameter59Name Parameter name * @param string $parameter59Value Parameter value * @param string $parameter60Name Parameter name * @param string $parameter60Value Parameter value * @param string $parameter61Name Parameter name * @param string $parameter61Value Parameter value * @param string $parameter62Name Parameter name * @param string $parameter62Value Parameter value * @param string $parameter63Name Parameter name * @param string $parameter63Value Parameter value * @param string $parameter64Name Parameter name * @param string $parameter64Value Parameter value * @param string $parameter65Name Parameter name * @param string $parameter65Value Parameter value * @param string $parameter66Name Parameter name * @param string $parameter66Value Parameter value * @param string $parameter67Name Parameter name * @param string $parameter67Value Parameter value * @param string $parameter68Name Parameter name * @param string $parameter68Value Parameter value * @param string $parameter69Name Parameter name * @param string $parameter69Value Parameter value * @param string $parameter70Name Parameter name * @param string $parameter70Value Parameter value * @param string $parameter71Name Parameter name * @param string $parameter71Value Parameter value * @param string $parameter72Name Parameter name * @param string $parameter72Value Parameter value * @param string $parameter73Name Parameter name * @param string $parameter73Value Parameter value * @param string $parameter74Name Parameter name * @param string $parameter74Value Parameter value * @param string $parameter75Name Parameter name * @param string $parameter75Value Parameter value * @param string $parameter76Name Parameter name * @param string $parameter76Value Parameter value * @param string $parameter77Name Parameter name * @param string $parameter77Value Parameter value * @param string $parameter78Name Parameter name * @param string $parameter78Value Parameter value * @param string $parameter79Name Parameter name * @param string $parameter79Value Parameter value * @param string $parameter80Name Parameter name * @param string $parameter80Value Parameter value * @param string $parameter81Name Parameter name * @param string $parameter81Value Parameter value * @param string $parameter82Name Parameter name * @param string $parameter82Value Parameter value * @param string $parameter83Name Parameter name * @param string $parameter83Value Parameter value * @param string $parameter84Name Parameter name * @param string $parameter84Value Parameter value * @param string $parameter85Name Parameter name * @param string $parameter85Value Parameter value * @param string $parameter86Name Parameter name * @param string $parameter86Value Parameter value * @param string $parameter87Name Parameter name * @param string $parameter87Value Parameter value * @param string $parameter88Name Parameter name * @param string $parameter88Value Parameter value * @param string $parameter89Name Parameter name * @param string $parameter89Value Parameter value * @param string $parameter90Name Parameter name * @param string $parameter90Value Parameter value * @param string $parameter91Name Parameter name * @param string $parameter91Value Parameter value * @param string $parameter92Name Parameter name * @param string $parameter92Value Parameter value * @param string $parameter93Name Parameter name * @param string $parameter93Value Parameter value * @param string $parameter94Name Parameter name * @param string $parameter94Value Parameter value * @param string $parameter95Name Parameter name * @param string $parameter95Value Parameter value * @param string $parameter96Name Parameter name * @param string $parameter96Value Parameter value * @param string $parameter97Name Parameter name * @param string $parameter97Value Parameter value * @param string $parameter98Name Parameter name * @param string $parameter98Value Parameter value * @param string $parameter99Name Parameter name * @param string $parameter99Value Parameter value * @return CreateStreamOptions Options builder */ public static function create(string $name = Values::NONE, string $track = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $parameter1Name = Values::NONE, string $parameter1Value = Values::NONE, string $parameter2Name = Values::NONE, string $parameter2Value = Values::NONE, string $parameter3Name = Values::NONE, string $parameter3Value = Values::NONE, string $parameter4Name = Values::NONE, string $parameter4Value = Values::NONE, string $parameter5Name = Values::NONE, string $parameter5Value = Values::NONE, string $parameter6Name = Values::NONE, string $parameter6Value = Values::NONE, string $parameter7Name = Values::NONE, string $parameter7Value = Values::NONE, string $parameter8Name = Values::NONE, string $parameter8Value = Values::NONE, string $parameter9Name = Values::NONE, string $parameter9Value = Values::NONE, string $parameter10Name = Values::NONE, string $parameter10Value = Values::NONE, string $parameter11Name = Values::NONE, string $parameter11Value = Values::NONE, string $parameter12Name = Values::NONE, string $parameter12Value = Values::NONE, string $parameter13Name = Values::NONE, string $parameter13Value = Values::NONE, string $parameter14Name = Values::NONE, string $parameter14Value = Values::NONE, string $parameter15Name = Values::NONE, string $parameter15Value = Values::NONE, string $parameter16Name = Values::NONE, string $parameter16Value = Values::NONE, string $parameter17Name = Values::NONE, string $parameter17Value = Values::NONE, string $parameter18Name = Values::NONE, string $parameter18Value = Values::NONE, string $parameter19Name = Values::NONE, string $parameter19Value = Values::NONE, string $parameter20Name = Values::NONE, string $parameter20Value = Values::NONE, string $parameter21Name = Values::NONE, string $parameter21Value = Values::NONE, string $parameter22Name = Values::NONE, string $parameter22Value = Values::NONE, string $parameter23Name = Values::NONE, string $parameter23Value = Values::NONE, string $parameter24Name = Values::NONE, string $parameter24Value = Values::NONE, string $parameter25Name = Values::NONE, string $parameter25Value = Values::NONE, string $parameter26Name = Values::NONE, string $parameter26Value = Values::NONE, string $parameter27Name = Values::NONE, string $parameter27Value = Values::NONE, string $parameter28Name = Values::NONE, string $parameter28Value = Values::NONE, string $parameter29Name = Values::NONE, string $parameter29Value = Values::NONE, string $parameter30Name = Values::NONE, string $parameter30Value = Values::NONE, string $parameter31Name = Values::NONE, string $parameter31Value = Values::NONE, string $parameter32Name = Values::NONE, string $parameter32Value = Values::NONE, string $parameter33Name = Values::NONE, string $parameter33Value = Values::NONE, string $parameter34Name = Values::NONE, string $parameter34Value = Values::NONE, string $parameter35Name = Values::NONE, string $parameter35Value = Values::NONE, string $parameter36Name = Values::NONE, string $parameter36Value = Values::NONE, string $parameter37Name = Values::NONE, string $parameter37Value = Values::NONE, string $parameter38Name = Values::NONE, string $parameter38Value = Values::NONE, string $parameter39Name = Values::NONE, string $parameter39Value = Values::NONE, string $parameter40Name = Values::NONE, string $parameter40Value = Values::NONE, string $parameter41Name = Values::NONE, string $parameter41Value = Values::NONE, string $parameter42Name = Values::NONE, string $parameter42Value = Values::NONE, string $parameter43Name = Values::NONE, string $parameter43Value = Values::NONE, string $parameter44Name = Values::NONE, string $parameter44Value = Values::NONE, string $parameter45Name = Values::NONE, string $parameter45Value = Values::NONE, string $parameter46Name = Values::NONE, string $parameter46Value = Values::NONE, string $parameter47Name = Values::NONE, string $parameter47Value = Values::NONE, string $parameter48Name = Values::NONE, string $parameter48Value = Values::NONE, string $parameter49Name = Values::NONE, string $parameter49Value = Values::NONE, string $parameter50Name = Values::NONE, string $parameter50Value = Values::NONE, string $parameter51Name = Values::NONE, string $parameter51Value = Values::NONE, string $parameter52Name = Values::NONE, string $parameter52Value = Values::NONE, string $parameter53Name = Values::NONE, string $parameter53Value = Values::NONE, string $parameter54Name = Values::NONE, string $parameter54Value = Values::NONE, string $parameter55Name = Values::NONE, string $parameter55Value = Values::NONE, string $parameter56Name = Values::NONE, string $parameter56Value = Values::NONE, string $parameter57Name = Values::NONE, string $parameter57Value = Values::NONE, string $parameter58Name = Values::NONE, string $parameter58Value = Values::NONE, string $parameter59Name = Values::NONE, string $parameter59Value = Values::NONE, string $parameter60Name = Values::NONE, string $parameter60Value = Values::NONE, string $parameter61Name = Values::NONE, string $parameter61Value = Values::NONE, string $parameter62Name = Values::NONE, string $parameter62Value = Values::NONE, string $parameter63Name = Values::NONE, string $parameter63Value = Values::NONE, string $parameter64Name = Values::NONE, string $parameter64Value = Values::NONE, string $parameter65Name = Values::NONE, string $parameter65Value = Values::NONE, string $parameter66Name = Values::NONE, string $parameter66Value = Values::NONE, string $parameter67Name = Values::NONE, string $parameter67Value = Values::NONE, string $parameter68Name = Values::NONE, string $parameter68Value = Values::NONE, string $parameter69Name = Values::NONE, string $parameter69Value = Values::NONE, string $parameter70Name = Values::NONE, string $parameter70Value = Values::NONE, string $parameter71Name = Values::NONE, string $parameter71Value = Values::NONE, string $parameter72Name = Values::NONE, string $parameter72Value = Values::NONE, string $parameter73Name = Values::NONE, string $parameter73Value = Values::NONE, string $parameter74Name = Values::NONE, string $parameter74Value = Values::NONE, string $parameter75Name = Values::NONE, string $parameter75Value = Values::NONE, string $parameter76Name = Values::NONE, string $parameter76Value = Values::NONE, string $parameter77Name = Values::NONE, string $parameter77Value = Values::NONE, string $parameter78Name = Values::NONE, string $parameter78Value = Values::NONE, string $parameter79Name = Values::NONE, string $parameter79Value = Values::NONE, string $parameter80Name = Values::NONE, string $parameter80Value = Values::NONE, string $parameter81Name = Values::NONE, string $parameter81Value = Values::NONE, string $parameter82Name = Values::NONE, string $parameter82Value = Values::NONE, string $parameter83Name = Values::NONE, string $parameter83Value = Values::NONE, string $parameter84Name = Values::NONE, string $parameter84Value = Values::NONE, string $parameter85Name = Values::NONE, string $parameter85Value = Values::NONE, string $parameter86Name = Values::NONE, string $parameter86Value = Values::NONE, string $parameter87Name = Values::NONE, string $parameter87Value = Values::NONE, string $parameter88Name = Values::NONE, string $parameter88Value = Values::NONE, string $parameter89Name = Values::NONE, string $parameter89Value = Values::NONE, string $parameter90Name = Values::NONE, string $parameter90Value = Values::NONE, string $parameter91Name = Values::NONE, string $parameter91Value = Values::NONE, string $parameter92Name = Values::NONE, string $parameter92Value = Values::NONE, string $parameter93Name = Values::NONE, string $parameter93Value = Values::NONE, string $parameter94Name = Values::NONE, string $parameter94Value = Values::NONE, string $parameter95Name = Values::NONE, string $parameter95Value = Values::NONE, string $parameter96Name = Values::NONE, string $parameter96Value = Values::NONE, string $parameter97Name = Values::NONE, string $parameter97Value = Values::NONE, string $parameter98Name = Values::NONE, string $parameter98Value = Values::NONE, string $parameter99Name = Values::NONE, string $parameter99Value = Values::NONE): CreateStreamOptions { return new CreateStreamOptions($name, $track, $statusCallback, $statusCallbackMethod, $parameter1Name, $parameter1Value, $parameter2Name, $parameter2Value, $parameter3Name, $parameter3Value, $parameter4Name, $parameter4Value, $parameter5Name, $parameter5Value, $parameter6Name, $parameter6Value, $parameter7Name, $parameter7Value, $parameter8Name, $parameter8Value, $parameter9Name, $parameter9Value, $parameter10Name, $parameter10Value, $parameter11Name, $parameter11Value, $parameter12Name, $parameter12Value, $parameter13Name, $parameter13Value, $parameter14Name, $parameter14Value, $parameter15Name, $parameter15Value, $parameter16Name, $parameter16Value, $parameter17Name, $parameter17Value, $parameter18Name, $parameter18Value, $parameter19Name, $parameter19Value, $parameter20Name, $parameter20Value, $parameter21Name, $parameter21Value, $parameter22Name, $parameter22Value, $parameter23Name, $parameter23Value, $parameter24Name, $parameter24Value, $parameter25Name, $parameter25Value, $parameter26Name, $parameter26Value, $parameter27Name, $parameter27Value, $parameter28Name, $parameter28Value, $parameter29Name, $parameter29Value, $parameter30Name, $parameter30Value, $parameter31Name, $parameter31Value, $parameter32Name, $parameter32Value, $parameter33Name, $parameter33Value, $parameter34Name, $parameter34Value, $parameter35Name, $parameter35Value, $parameter36Name, $parameter36Value, $parameter37Name, $parameter37Value, $parameter38Name, $parameter38Value, $parameter39Name, $parameter39Value, $parameter40Name, $parameter40Value, $parameter41Name, $parameter41Value, $parameter42Name, $parameter42Value, $parameter43Name, $parameter43Value, $parameter44Name, $parameter44Value, $parameter45Name, $parameter45Value, $parameter46Name, $parameter46Value, $parameter47Name, $parameter47Value, $parameter48Name, $parameter48Value, $parameter49Name, $parameter49Value, $parameter50Name, $parameter50Value, $parameter51Name, $parameter51Value, $parameter52Name, $parameter52Value, $parameter53Name, $parameter53Value, $parameter54Name, $parameter54Value, $parameter55Name, $parameter55Value, $parameter56Name, $parameter56Value, $parameter57Name, $parameter57Value, $parameter58Name, $parameter58Value, $parameter59Name, $parameter59Value, $parameter60Name, $parameter60Value, $parameter61Name, $parameter61Value, $parameter62Name, $parameter62Value, $parameter63Name, $parameter63Value, $parameter64Name, $parameter64Value, $parameter65Name, $parameter65Value, $parameter66Name, $parameter66Value, $parameter67Name, $parameter67Value, $parameter68Name, $parameter68Value, $parameter69Name, $parameter69Value, $parameter70Name, $parameter70Value, $parameter71Name, $parameter71Value, $parameter72Name, $parameter72Value, $parameter73Name, $parameter73Value, $parameter74Name, $parameter74Value, $parameter75Name, $parameter75Value, $parameter76Name, $parameter76Value, $parameter77Name, $parameter77Value, $parameter78Name, $parameter78Value, $parameter79Name, $parameter79Value, $parameter80Name, $parameter80Value, $parameter81Name, $parameter81Value, $parameter82Name, $parameter82Value, $parameter83Name, $parameter83Value, $parameter84Name, $parameter84Value, $parameter85Name, $parameter85Value, $parameter86Name, $parameter86Value, $parameter87Name, $parameter87Value, $parameter88Name, $parameter88Value, $parameter89Name, $parameter89Value, $parameter90Name, $parameter90Value, $parameter91Name, $parameter91Value, $parameter92Name, $parameter92Value, $parameter93Name, $parameter93Value, $parameter94Name, $parameter94Value, $parameter95Name, $parameter95Value, $parameter96Name, $parameter96Value, $parameter97Name, $parameter97Value, $parameter98Name, $parameter98Value, $parameter99Name, $parameter99Value); } } class CreateStreamOptions extends Options { /** * @param string $name The name of this resource * @param string $track One of `inbound_track`, `outbound_track`, `both_tracks`. * @param string $statusCallback Absolute URL of the status callback. * @param string $statusCallbackMethod The http method for the status_callback. * @param string $parameter1Name Parameter name * @param string $parameter1Value Parameter value * @param string $parameter2Name Parameter name * @param string $parameter2Value Parameter value * @param string $parameter3Name Parameter name * @param string $parameter3Value Parameter value * @param string $parameter4Name Parameter name * @param string $parameter4Value Parameter value * @param string $parameter5Name Parameter name * @param string $parameter5Value Parameter value * @param string $parameter6Name Parameter name * @param string $parameter6Value Parameter value * @param string $parameter7Name Parameter name * @param string $parameter7Value Parameter value * @param string $parameter8Name Parameter name * @param string $parameter8Value Parameter value * @param string $parameter9Name Parameter name * @param string $parameter9Value Parameter value * @param string $parameter10Name Parameter name * @param string $parameter10Value Parameter value * @param string $parameter11Name Parameter name * @param string $parameter11Value Parameter value * @param string $parameter12Name Parameter name * @param string $parameter12Value Parameter value * @param string $parameter13Name Parameter name * @param string $parameter13Value Parameter value * @param string $parameter14Name Parameter name * @param string $parameter14Value Parameter value * @param string $parameter15Name Parameter name * @param string $parameter15Value Parameter value * @param string $parameter16Name Parameter name * @param string $parameter16Value Parameter value * @param string $parameter17Name Parameter name * @param string $parameter17Value Parameter value * @param string $parameter18Name Parameter name * @param string $parameter18Value Parameter value * @param string $parameter19Name Parameter name * @param string $parameter19Value Parameter value * @param string $parameter20Name Parameter name * @param string $parameter20Value Parameter value * @param string $parameter21Name Parameter name * @param string $parameter21Value Parameter value * @param string $parameter22Name Parameter name * @param string $parameter22Value Parameter value * @param string $parameter23Name Parameter name * @param string $parameter23Value Parameter value * @param string $parameter24Name Parameter name * @param string $parameter24Value Parameter value * @param string $parameter25Name Parameter name * @param string $parameter25Value Parameter value * @param string $parameter26Name Parameter name * @param string $parameter26Value Parameter value * @param string $parameter27Name Parameter name * @param string $parameter27Value Parameter value * @param string $parameter28Name Parameter name * @param string $parameter28Value Parameter value * @param string $parameter29Name Parameter name * @param string $parameter29Value Parameter value * @param string $parameter30Name Parameter name * @param string $parameter30Value Parameter value * @param string $parameter31Name Parameter name * @param string $parameter31Value Parameter value * @param string $parameter32Name Parameter name * @param string $parameter32Value Parameter value * @param string $parameter33Name Parameter name * @param string $parameter33Value Parameter value * @param string $parameter34Name Parameter name * @param string $parameter34Value Parameter value * @param string $parameter35Name Parameter name * @param string $parameter35Value Parameter value * @param string $parameter36Name Parameter name * @param string $parameter36Value Parameter value * @param string $parameter37Name Parameter name * @param string $parameter37Value Parameter value * @param string $parameter38Name Parameter name * @param string $parameter38Value Parameter value * @param string $parameter39Name Parameter name * @param string $parameter39Value Parameter value * @param string $parameter40Name Parameter name * @param string $parameter40Value Parameter value * @param string $parameter41Name Parameter name * @param string $parameter41Value Parameter value * @param string $parameter42Name Parameter name * @param string $parameter42Value Parameter value * @param string $parameter43Name Parameter name * @param string $parameter43Value Parameter value * @param string $parameter44Name Parameter name * @param string $parameter44Value Parameter value * @param string $parameter45Name Parameter name * @param string $parameter45Value Parameter value * @param string $parameter46Name Parameter name * @param string $parameter46Value Parameter value * @param string $parameter47Name Parameter name * @param string $parameter47Value Parameter value * @param string $parameter48Name Parameter name * @param string $parameter48Value Parameter value * @param string $parameter49Name Parameter name * @param string $parameter49Value Parameter value * @param string $parameter50Name Parameter name * @param string $parameter50Value Parameter value * @param string $parameter51Name Parameter name * @param string $parameter51Value Parameter value * @param string $parameter52Name Parameter name * @param string $parameter52Value Parameter value * @param string $parameter53Name Parameter name * @param string $parameter53Value Parameter value * @param string $parameter54Name Parameter name * @param string $parameter54Value Parameter value * @param string $parameter55Name Parameter name * @param string $parameter55Value Parameter value * @param string $parameter56Name Parameter name * @param string $parameter56Value Parameter value * @param string $parameter57Name Parameter name * @param string $parameter57Value Parameter value * @param string $parameter58Name Parameter name * @param string $parameter58Value Parameter value * @param string $parameter59Name Parameter name * @param string $parameter59Value Parameter value * @param string $parameter60Name Parameter name * @param string $parameter60Value Parameter value * @param string $parameter61Name Parameter name * @param string $parameter61Value Parameter value * @param string $parameter62Name Parameter name * @param string $parameter62Value Parameter value * @param string $parameter63Name Parameter name * @param string $parameter63Value Parameter value * @param string $parameter64Name Parameter name * @param string $parameter64Value Parameter value * @param string $parameter65Name Parameter name * @param string $parameter65Value Parameter value * @param string $parameter66Name Parameter name * @param string $parameter66Value Parameter value * @param string $parameter67Name Parameter name * @param string $parameter67Value Parameter value * @param string $parameter68Name Parameter name * @param string $parameter68Value Parameter value * @param string $parameter69Name Parameter name * @param string $parameter69Value Parameter value * @param string $parameter70Name Parameter name * @param string $parameter70Value Parameter value * @param string $parameter71Name Parameter name * @param string $parameter71Value Parameter value * @param string $parameter72Name Parameter name * @param string $parameter72Value Parameter value * @param string $parameter73Name Parameter name * @param string $parameter73Value Parameter value * @param string $parameter74Name Parameter name * @param string $parameter74Value Parameter value * @param string $parameter75Name Parameter name * @param string $parameter75Value Parameter value * @param string $parameter76Name Parameter name * @param string $parameter76Value Parameter value * @param string $parameter77Name Parameter name * @param string $parameter77Value Parameter value * @param string $parameter78Name Parameter name * @param string $parameter78Value Parameter value * @param string $parameter79Name Parameter name * @param string $parameter79Value Parameter value * @param string $parameter80Name Parameter name * @param string $parameter80Value Parameter value * @param string $parameter81Name Parameter name * @param string $parameter81Value Parameter value * @param string $parameter82Name Parameter name * @param string $parameter82Value Parameter value * @param string $parameter83Name Parameter name * @param string $parameter83Value Parameter value * @param string $parameter84Name Parameter name * @param string $parameter84Value Parameter value * @param string $parameter85Name Parameter name * @param string $parameter85Value Parameter value * @param string $parameter86Name Parameter name * @param string $parameter86Value Parameter value * @param string $parameter87Name Parameter name * @param string $parameter87Value Parameter value * @param string $parameter88Name Parameter name * @param string $parameter88Value Parameter value * @param string $parameter89Name Parameter name * @param string $parameter89Value Parameter value * @param string $parameter90Name Parameter name * @param string $parameter90Value Parameter value * @param string $parameter91Name Parameter name * @param string $parameter91Value Parameter value * @param string $parameter92Name Parameter name * @param string $parameter92Value Parameter value * @param string $parameter93Name Parameter name * @param string $parameter93Value Parameter value * @param string $parameter94Name Parameter name * @param string $parameter94Value Parameter value * @param string $parameter95Name Parameter name * @param string $parameter95Value Parameter value * @param string $parameter96Name Parameter name * @param string $parameter96Value Parameter value * @param string $parameter97Name Parameter name * @param string $parameter97Value Parameter value * @param string $parameter98Name Parameter name * @param string $parameter98Value Parameter value * @param string $parameter99Name Parameter name * @param string $parameter99Value Parameter value */ public function __construct(string $name = Values::NONE, string $track = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $parameter1Name = Values::NONE, string $parameter1Value = Values::NONE, string $parameter2Name = Values::NONE, string $parameter2Value = Values::NONE, string $parameter3Name = Values::NONE, string $parameter3Value = Values::NONE, string $parameter4Name = Values::NONE, string $parameter4Value = Values::NONE, string $parameter5Name = Values::NONE, string $parameter5Value = Values::NONE, string $parameter6Name = Values::NONE, string $parameter6Value = Values::NONE, string $parameter7Name = Values::NONE, string $parameter7Value = Values::NONE, string $parameter8Name = Values::NONE, string $parameter8Value = Values::NONE, string $parameter9Name = Values::NONE, string $parameter9Value = Values::NONE, string $parameter10Name = Values::NONE, string $parameter10Value = Values::NONE, string $parameter11Name = Values::NONE, string $parameter11Value = Values::NONE, string $parameter12Name = Values::NONE, string $parameter12Value = Values::NONE, string $parameter13Name = Values::NONE, string $parameter13Value = Values::NONE, string $parameter14Name = Values::NONE, string $parameter14Value = Values::NONE, string $parameter15Name = Values::NONE, string $parameter15Value = Values::NONE, string $parameter16Name = Values::NONE, string $parameter16Value = Values::NONE, string $parameter17Name = Values::NONE, string $parameter17Value = Values::NONE, string $parameter18Name = Values::NONE, string $parameter18Value = Values::NONE, string $parameter19Name = Values::NONE, string $parameter19Value = Values::NONE, string $parameter20Name = Values::NONE, string $parameter20Value = Values::NONE, string $parameter21Name = Values::NONE, string $parameter21Value = Values::NONE, string $parameter22Name = Values::NONE, string $parameter22Value = Values::NONE, string $parameter23Name = Values::NONE, string $parameter23Value = Values::NONE, string $parameter24Name = Values::NONE, string $parameter24Value = Values::NONE, string $parameter25Name = Values::NONE, string $parameter25Value = Values::NONE, string $parameter26Name = Values::NONE, string $parameter26Value = Values::NONE, string $parameter27Name = Values::NONE, string $parameter27Value = Values::NONE, string $parameter28Name = Values::NONE, string $parameter28Value = Values::NONE, string $parameter29Name = Values::NONE, string $parameter29Value = Values::NONE, string $parameter30Name = Values::NONE, string $parameter30Value = Values::NONE, string $parameter31Name = Values::NONE, string $parameter31Value = Values::NONE, string $parameter32Name = Values::NONE, string $parameter32Value = Values::NONE, string $parameter33Name = Values::NONE, string $parameter33Value = Values::NONE, string $parameter34Name = Values::NONE, string $parameter34Value = Values::NONE, string $parameter35Name = Values::NONE, string $parameter35Value = Values::NONE, string $parameter36Name = Values::NONE, string $parameter36Value = Values::NONE, string $parameter37Name = Values::NONE, string $parameter37Value = Values::NONE, string $parameter38Name = Values::NONE, string $parameter38Value = Values::NONE, string $parameter39Name = Values::NONE, string $parameter39Value = Values::NONE, string $parameter40Name = Values::NONE, string $parameter40Value = Values::NONE, string $parameter41Name = Values::NONE, string $parameter41Value = Values::NONE, string $parameter42Name = Values::NONE, string $parameter42Value = Values::NONE, string $parameter43Name = Values::NONE, string $parameter43Value = Values::NONE, string $parameter44Name = Values::NONE, string $parameter44Value = Values::NONE, string $parameter45Name = Values::NONE, string $parameter45Value = Values::NONE, string $parameter46Name = Values::NONE, string $parameter46Value = Values::NONE, string $parameter47Name = Values::NONE, string $parameter47Value = Values::NONE, string $parameter48Name = Values::NONE, string $parameter48Value = Values::NONE, string $parameter49Name = Values::NONE, string $parameter49Value = Values::NONE, string $parameter50Name = Values::NONE, string $parameter50Value = Values::NONE, string $parameter51Name = Values::NONE, string $parameter51Value = Values::NONE, string $parameter52Name = Values::NONE, string $parameter52Value = Values::NONE, string $parameter53Name = Values::NONE, string $parameter53Value = Values::NONE, string $parameter54Name = Values::NONE, string $parameter54Value = Values::NONE, string $parameter55Name = Values::NONE, string $parameter55Value = Values::NONE, string $parameter56Name = Values::NONE, string $parameter56Value = Values::NONE, string $parameter57Name = Values::NONE, string $parameter57Value = Values::NONE, string $parameter58Name = Values::NONE, string $parameter58Value = Values::NONE, string $parameter59Name = Values::NONE, string $parameter59Value = Values::NONE, string $parameter60Name = Values::NONE, string $parameter60Value = Values::NONE, string $parameter61Name = Values::NONE, string $parameter61Value = Values::NONE, string $parameter62Name = Values::NONE, string $parameter62Value = Values::NONE, string $parameter63Name = Values::NONE, string $parameter63Value = Values::NONE, string $parameter64Name = Values::NONE, string $parameter64Value = Values::NONE, string $parameter65Name = Values::NONE, string $parameter65Value = Values::NONE, string $parameter66Name = Values::NONE, string $parameter66Value = Values::NONE, string $parameter67Name = Values::NONE, string $parameter67Value = Values::NONE, string $parameter68Name = Values::NONE, string $parameter68Value = Values::NONE, string $parameter69Name = Values::NONE, string $parameter69Value = Values::NONE, string $parameter70Name = Values::NONE, string $parameter70Value = Values::NONE, string $parameter71Name = Values::NONE, string $parameter71Value = Values::NONE, string $parameter72Name = Values::NONE, string $parameter72Value = Values::NONE, string $parameter73Name = Values::NONE, string $parameter73Value = Values::NONE, string $parameter74Name = Values::NONE, string $parameter74Value = Values::NONE, string $parameter75Name = Values::NONE, string $parameter75Value = Values::NONE, string $parameter76Name = Values::NONE, string $parameter76Value = Values::NONE, string $parameter77Name = Values::NONE, string $parameter77Value = Values::NONE, string $parameter78Name = Values::NONE, string $parameter78Value = Values::NONE, string $parameter79Name = Values::NONE, string $parameter79Value = Values::NONE, string $parameter80Name = Values::NONE, string $parameter80Value = Values::NONE, string $parameter81Name = Values::NONE, string $parameter81Value = Values::NONE, string $parameter82Name = Values::NONE, string $parameter82Value = Values::NONE, string $parameter83Name = Values::NONE, string $parameter83Value = Values::NONE, string $parameter84Name = Values::NONE, string $parameter84Value = Values::NONE, string $parameter85Name = Values::NONE, string $parameter85Value = Values::NONE, string $parameter86Name = Values::NONE, string $parameter86Value = Values::NONE, string $parameter87Name = Values::NONE, string $parameter87Value = Values::NONE, string $parameter88Name = Values::NONE, string $parameter88Value = Values::NONE, string $parameter89Name = Values::NONE, string $parameter89Value = Values::NONE, string $parameter90Name = Values::NONE, string $parameter90Value = Values::NONE, string $parameter91Name = Values::NONE, string $parameter91Value = Values::NONE, string $parameter92Name = Values::NONE, string $parameter92Value = Values::NONE, string $parameter93Name = Values::NONE, string $parameter93Value = Values::NONE, string $parameter94Name = Values::NONE, string $parameter94Value = Values::NONE, string $parameter95Name = Values::NONE, string $parameter95Value = Values::NONE, string $parameter96Name = Values::NONE, string $parameter96Value = Values::NONE, string $parameter97Name = Values::NONE, string $parameter97Value = Values::NONE, string $parameter98Name = Values::NONE, string $parameter98Value = Values::NONE, string $parameter99Name = Values::NONE, string $parameter99Value = Values::NONE) { $this->options['name'] = $name; $this->options['track'] = $track; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['parameter1Name'] = $parameter1Name; $this->options['parameter1Value'] = $parameter1Value; $this->options['parameter2Name'] = $parameter2Name; $this->options['parameter2Value'] = $parameter2Value; $this->options['parameter3Name'] = $parameter3Name; $this->options['parameter3Value'] = $parameter3Value; $this->options['parameter4Name'] = $parameter4Name; $this->options['parameter4Value'] = $parameter4Value; $this->options['parameter5Name'] = $parameter5Name; $this->options['parameter5Value'] = $parameter5Value; $this->options['parameter6Name'] = $parameter6Name; $this->options['parameter6Value'] = $parameter6Value; $this->options['parameter7Name'] = $parameter7Name; $this->options['parameter7Value'] = $parameter7Value; $this->options['parameter8Name'] = $parameter8Name; $this->options['parameter8Value'] = $parameter8Value; $this->options['parameter9Name'] = $parameter9Name; $this->options['parameter9Value'] = $parameter9Value; $this->options['parameter10Name'] = $parameter10Name; $this->options['parameter10Value'] = $parameter10Value; $this->options['parameter11Name'] = $parameter11Name; $this->options['parameter11Value'] = $parameter11Value; $this->options['parameter12Name'] = $parameter12Name; $this->options['parameter12Value'] = $parameter12Value; $this->options['parameter13Name'] = $parameter13Name; $this->options['parameter13Value'] = $parameter13Value; $this->options['parameter14Name'] = $parameter14Name; $this->options['parameter14Value'] = $parameter14Value; $this->options['parameter15Name'] = $parameter15Name; $this->options['parameter15Value'] = $parameter15Value; $this->options['parameter16Name'] = $parameter16Name; $this->options['parameter16Value'] = $parameter16Value; $this->options['parameter17Name'] = $parameter17Name; $this->options['parameter17Value'] = $parameter17Value; $this->options['parameter18Name'] = $parameter18Name; $this->options['parameter18Value'] = $parameter18Value; $this->options['parameter19Name'] = $parameter19Name; $this->options['parameter19Value'] = $parameter19Value; $this->options['parameter20Name'] = $parameter20Name; $this->options['parameter20Value'] = $parameter20Value; $this->options['parameter21Name'] = $parameter21Name; $this->options['parameter21Value'] = $parameter21Value; $this->options['parameter22Name'] = $parameter22Name; $this->options['parameter22Value'] = $parameter22Value; $this->options['parameter23Name'] = $parameter23Name; $this->options['parameter23Value'] = $parameter23Value; $this->options['parameter24Name'] = $parameter24Name; $this->options['parameter24Value'] = $parameter24Value; $this->options['parameter25Name'] = $parameter25Name; $this->options['parameter25Value'] = $parameter25Value; $this->options['parameter26Name'] = $parameter26Name; $this->options['parameter26Value'] = $parameter26Value; $this->options['parameter27Name'] = $parameter27Name; $this->options['parameter27Value'] = $parameter27Value; $this->options['parameter28Name'] = $parameter28Name; $this->options['parameter28Value'] = $parameter28Value; $this->options['parameter29Name'] = $parameter29Name; $this->options['parameter29Value'] = $parameter29Value; $this->options['parameter30Name'] = $parameter30Name; $this->options['parameter30Value'] = $parameter30Value; $this->options['parameter31Name'] = $parameter31Name; $this->options['parameter31Value'] = $parameter31Value; $this->options['parameter32Name'] = $parameter32Name; $this->options['parameter32Value'] = $parameter32Value; $this->options['parameter33Name'] = $parameter33Name; $this->options['parameter33Value'] = $parameter33Value; $this->options['parameter34Name'] = $parameter34Name; $this->options['parameter34Value'] = $parameter34Value; $this->options['parameter35Name'] = $parameter35Name; $this->options['parameter35Value'] = $parameter35Value; $this->options['parameter36Name'] = $parameter36Name; $this->options['parameter36Value'] = $parameter36Value; $this->options['parameter37Name'] = $parameter37Name; $this->options['parameter37Value'] = $parameter37Value; $this->options['parameter38Name'] = $parameter38Name; $this->options['parameter38Value'] = $parameter38Value; $this->options['parameter39Name'] = $parameter39Name; $this->options['parameter39Value'] = $parameter39Value; $this->options['parameter40Name'] = $parameter40Name; $this->options['parameter40Value'] = $parameter40Value; $this->options['parameter41Name'] = $parameter41Name; $this->options['parameter41Value'] = $parameter41Value; $this->options['parameter42Name'] = $parameter42Name; $this->options['parameter42Value'] = $parameter42Value; $this->options['parameter43Name'] = $parameter43Name; $this->options['parameter43Value'] = $parameter43Value; $this->options['parameter44Name'] = $parameter44Name; $this->options['parameter44Value'] = $parameter44Value; $this->options['parameter45Name'] = $parameter45Name; $this->options['parameter45Value'] = $parameter45Value; $this->options['parameter46Name'] = $parameter46Name; $this->options['parameter46Value'] = $parameter46Value; $this->options['parameter47Name'] = $parameter47Name; $this->options['parameter47Value'] = $parameter47Value; $this->options['parameter48Name'] = $parameter48Name; $this->options['parameter48Value'] = $parameter48Value; $this->options['parameter49Name'] = $parameter49Name; $this->options['parameter49Value'] = $parameter49Value; $this->options['parameter50Name'] = $parameter50Name; $this->options['parameter50Value'] = $parameter50Value; $this->options['parameter51Name'] = $parameter51Name; $this->options['parameter51Value'] = $parameter51Value; $this->options['parameter52Name'] = $parameter52Name; $this->options['parameter52Value'] = $parameter52Value; $this->options['parameter53Name'] = $parameter53Name; $this->options['parameter53Value'] = $parameter53Value; $this->options['parameter54Name'] = $parameter54Name; $this->options['parameter54Value'] = $parameter54Value; $this->options['parameter55Name'] = $parameter55Name; $this->options['parameter55Value'] = $parameter55Value; $this->options['parameter56Name'] = $parameter56Name; $this->options['parameter56Value'] = $parameter56Value; $this->options['parameter57Name'] = $parameter57Name; $this->options['parameter57Value'] = $parameter57Value; $this->options['parameter58Name'] = $parameter58Name; $this->options['parameter58Value'] = $parameter58Value; $this->options['parameter59Name'] = $parameter59Name; $this->options['parameter59Value'] = $parameter59Value; $this->options['parameter60Name'] = $parameter60Name; $this->options['parameter60Value'] = $parameter60Value; $this->options['parameter61Name'] = $parameter61Name; $this->options['parameter61Value'] = $parameter61Value; $this->options['parameter62Name'] = $parameter62Name; $this->options['parameter62Value'] = $parameter62Value; $this->options['parameter63Name'] = $parameter63Name; $this->options['parameter63Value'] = $parameter63Value; $this->options['parameter64Name'] = $parameter64Name; $this->options['parameter64Value'] = $parameter64Value; $this->options['parameter65Name'] = $parameter65Name; $this->options['parameter65Value'] = $parameter65Value; $this->options['parameter66Name'] = $parameter66Name; $this->options['parameter66Value'] = $parameter66Value; $this->options['parameter67Name'] = $parameter67Name; $this->options['parameter67Value'] = $parameter67Value; $this->options['parameter68Name'] = $parameter68Name; $this->options['parameter68Value'] = $parameter68Value; $this->options['parameter69Name'] = $parameter69Name; $this->options['parameter69Value'] = $parameter69Value; $this->options['parameter70Name'] = $parameter70Name; $this->options['parameter70Value'] = $parameter70Value; $this->options['parameter71Name'] = $parameter71Name; $this->options['parameter71Value'] = $parameter71Value; $this->options['parameter72Name'] = $parameter72Name; $this->options['parameter72Value'] = $parameter72Value; $this->options['parameter73Name'] = $parameter73Name; $this->options['parameter73Value'] = $parameter73Value; $this->options['parameter74Name'] = $parameter74Name; $this->options['parameter74Value'] = $parameter74Value; $this->options['parameter75Name'] = $parameter75Name; $this->options['parameter75Value'] = $parameter75Value; $this->options['parameter76Name'] = $parameter76Name; $this->options['parameter76Value'] = $parameter76Value; $this->options['parameter77Name'] = $parameter77Name; $this->options['parameter77Value'] = $parameter77Value; $this->options['parameter78Name'] = $parameter78Name; $this->options['parameter78Value'] = $parameter78Value; $this->options['parameter79Name'] = $parameter79Name; $this->options['parameter79Value'] = $parameter79Value; $this->options['parameter80Name'] = $parameter80Name; $this->options['parameter80Value'] = $parameter80Value; $this->options['parameter81Name'] = $parameter81Name; $this->options['parameter81Value'] = $parameter81Value; $this->options['parameter82Name'] = $parameter82Name; $this->options['parameter82Value'] = $parameter82Value; $this->options['parameter83Name'] = $parameter83Name; $this->options['parameter83Value'] = $parameter83Value; $this->options['parameter84Name'] = $parameter84Name; $this->options['parameter84Value'] = $parameter84Value; $this->options['parameter85Name'] = $parameter85Name; $this->options['parameter85Value'] = $parameter85Value; $this->options['parameter86Name'] = $parameter86Name; $this->options['parameter86Value'] = $parameter86Value; $this->options['parameter87Name'] = $parameter87Name; $this->options['parameter87Value'] = $parameter87Value; $this->options['parameter88Name'] = $parameter88Name; $this->options['parameter88Value'] = $parameter88Value; $this->options['parameter89Name'] = $parameter89Name; $this->options['parameter89Value'] = $parameter89Value; $this->options['parameter90Name'] = $parameter90Name; $this->options['parameter90Value'] = $parameter90Value; $this->options['parameter91Name'] = $parameter91Name; $this->options['parameter91Value'] = $parameter91Value; $this->options['parameter92Name'] = $parameter92Name; $this->options['parameter92Value'] = $parameter92Value; $this->options['parameter93Name'] = $parameter93Name; $this->options['parameter93Value'] = $parameter93Value; $this->options['parameter94Name'] = $parameter94Name; $this->options['parameter94Value'] = $parameter94Value; $this->options['parameter95Name'] = $parameter95Name; $this->options['parameter95Value'] = $parameter95Value; $this->options['parameter96Name'] = $parameter96Name; $this->options['parameter96Value'] = $parameter96Value; $this->options['parameter97Name'] = $parameter97Name; $this->options['parameter97Value'] = $parameter97Value; $this->options['parameter98Name'] = $parameter98Name; $this->options['parameter98Value'] = $parameter98Value; $this->options['parameter99Name'] = $parameter99Name; $this->options['parameter99Value'] = $parameter99Value; } /** * The user-specified name of this Stream, if one was given when the Stream was created. This may be used to stop the Stream. * * @param string $name The name of this resource * @return $this Fluent Builder */ public function setName(string $name): self { $this->options['name'] = $name; return $this; } /** * One of `inbound_track`, `outbound_track`, `both_tracks`. * * @param string $track One of `inbound_track`, `outbound_track`, `both_tracks`. * @return $this Fluent Builder */ public function setTrack(string $track): self { $this->options['track'] = $track; return $this; } /** * Absolute URL of the status callback. * * @param string $statusCallback Absolute URL of the status callback. * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The http method for the status_callback (one of GET, POST). * * @param string $statusCallbackMethod The http method for the status_callback. * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * Parameter name * * @param string $parameter1Name Parameter name * @return $this Fluent Builder */ public function setParameter1Name(string $parameter1Name): self { $this->options['parameter1Name'] = $parameter1Name; return $this; } /** * Parameter value * * @param string $parameter1Value Parameter value * @return $this Fluent Builder */ public function setParameter1Value(string $parameter1Value): self { $this->options['parameter1Value'] = $parameter1Value; return $this; } /** * Parameter name * * @param string $parameter2Name Parameter name * @return $this Fluent Builder */ public function setParameter2Name(string $parameter2Name): self { $this->options['parameter2Name'] = $parameter2Name; return $this; } /** * Parameter value * * @param string $parameter2Value Parameter value * @return $this Fluent Builder */ public function setParameter2Value(string $parameter2Value): self { $this->options['parameter2Value'] = $parameter2Value; return $this; } /** * Parameter name * * @param string $parameter3Name Parameter name * @return $this Fluent Builder */ public function setParameter3Name(string $parameter3Name): self { $this->options['parameter3Name'] = $parameter3Name; return $this; } /** * Parameter value * * @param string $parameter3Value Parameter value * @return $this Fluent Builder */ public function setParameter3Value(string $parameter3Value): self { $this->options['parameter3Value'] = $parameter3Value; return $this; } /** * Parameter name * * @param string $parameter4Name Parameter name * @return $this Fluent Builder */ public function setParameter4Name(string $parameter4Name): self { $this->options['parameter4Name'] = $parameter4Name; return $this; } /** * Parameter value * * @param string $parameter4Value Parameter value * @return $this Fluent Builder */ public function setParameter4Value(string $parameter4Value): self { $this->options['parameter4Value'] = $parameter4Value; return $this; } /** * Parameter name * * @param string $parameter5Name Parameter name * @return $this Fluent Builder */ public function setParameter5Name(string $parameter5Name): self { $this->options['parameter5Name'] = $parameter5Name; return $this; } /** * Parameter value * * @param string $parameter5Value Parameter value * @return $this Fluent Builder */ public function setParameter5Value(string $parameter5Value): self { $this->options['parameter5Value'] = $parameter5Value; return $this; } /** * Parameter name * * @param string $parameter6Name Parameter name * @return $this Fluent Builder */ public function setParameter6Name(string $parameter6Name): self { $this->options['parameter6Name'] = $parameter6Name; return $this; } /** * Parameter value * * @param string $parameter6Value Parameter value * @return $this Fluent Builder */ public function setParameter6Value(string $parameter6Value): self { $this->options['parameter6Value'] = $parameter6Value; return $this; } /** * Parameter name * * @param string $parameter7Name Parameter name * @return $this Fluent Builder */ public function setParameter7Name(string $parameter7Name): self { $this->options['parameter7Name'] = $parameter7Name; return $this; } /** * Parameter value * * @param string $parameter7Value Parameter value * @return $this Fluent Builder */ public function setParameter7Value(string $parameter7Value): self { $this->options['parameter7Value'] = $parameter7Value; return $this; } /** * Parameter name * * @param string $parameter8Name Parameter name * @return $this Fluent Builder */ public function setParameter8Name(string $parameter8Name): self { $this->options['parameter8Name'] = $parameter8Name; return $this; } /** * Parameter value * * @param string $parameter8Value Parameter value * @return $this Fluent Builder */ public function setParameter8Value(string $parameter8Value): self { $this->options['parameter8Value'] = $parameter8Value; return $this; } /** * Parameter name * * @param string $parameter9Name Parameter name * @return $this Fluent Builder */ public function setParameter9Name(string $parameter9Name): self { $this->options['parameter9Name'] = $parameter9Name; return $this; } /** * Parameter value * * @param string $parameter9Value Parameter value * @return $this Fluent Builder */ public function setParameter9Value(string $parameter9Value): self { $this->options['parameter9Value'] = $parameter9Value; return $this; } /** * Parameter name * * @param string $parameter10Name Parameter name * @return $this Fluent Builder */ public function setParameter10Name(string $parameter10Name): self { $this->options['parameter10Name'] = $parameter10Name; return $this; } /** * Parameter value * * @param string $parameter10Value Parameter value * @return $this Fluent Builder */ public function setParameter10Value(string $parameter10Value): self { $this->options['parameter10Value'] = $parameter10Value; return $this; } /** * Parameter name * * @param string $parameter11Name Parameter name * @return $this Fluent Builder */ public function setParameter11Name(string $parameter11Name): self { $this->options['parameter11Name'] = $parameter11Name; return $this; } /** * Parameter value * * @param string $parameter11Value Parameter value * @return $this Fluent Builder */ public function setParameter11Value(string $parameter11Value): self { $this->options['parameter11Value'] = $parameter11Value; return $this; } /** * Parameter name * * @param string $parameter12Name Parameter name * @return $this Fluent Builder */ public function setParameter12Name(string $parameter12Name): self { $this->options['parameter12Name'] = $parameter12Name; return $this; } /** * Parameter value * * @param string $parameter12Value Parameter value * @return $this Fluent Builder */ public function setParameter12Value(string $parameter12Value): self { $this->options['parameter12Value'] = $parameter12Value; return $this; } /** * Parameter name * * @param string $parameter13Name Parameter name * @return $this Fluent Builder */ public function setParameter13Name(string $parameter13Name): self { $this->options['parameter13Name'] = $parameter13Name; return $this; } /** * Parameter value * * @param string $parameter13Value Parameter value * @return $this Fluent Builder */ public function setParameter13Value(string $parameter13Value): self { $this->options['parameter13Value'] = $parameter13Value; return $this; } /** * Parameter name * * @param string $parameter14Name Parameter name * @return $this Fluent Builder */ public function setParameter14Name(string $parameter14Name): self { $this->options['parameter14Name'] = $parameter14Name; return $this; } /** * Parameter value * * @param string $parameter14Value Parameter value * @return $this Fluent Builder */ public function setParameter14Value(string $parameter14Value): self { $this->options['parameter14Value'] = $parameter14Value; return $this; } /** * Parameter name * * @param string $parameter15Name Parameter name * @return $this Fluent Builder */ public function setParameter15Name(string $parameter15Name): self { $this->options['parameter15Name'] = $parameter15Name; return $this; } /** * Parameter value * * @param string $parameter15Value Parameter value * @return $this Fluent Builder */ public function setParameter15Value(string $parameter15Value): self { $this->options['parameter15Value'] = $parameter15Value; return $this; } /** * Parameter name * * @param string $parameter16Name Parameter name * @return $this Fluent Builder */ public function setParameter16Name(string $parameter16Name): self { $this->options['parameter16Name'] = $parameter16Name; return $this; } /** * Parameter value * * @param string $parameter16Value Parameter value * @return $this Fluent Builder */ public function setParameter16Value(string $parameter16Value): self { $this->options['parameter16Value'] = $parameter16Value; return $this; } /** * Parameter name * * @param string $parameter17Name Parameter name * @return $this Fluent Builder */ public function setParameter17Name(string $parameter17Name): self { $this->options['parameter17Name'] = $parameter17Name; return $this; } /** * Parameter value * * @param string $parameter17Value Parameter value * @return $this Fluent Builder */ public function setParameter17Value(string $parameter17Value): self { $this->options['parameter17Value'] = $parameter17Value; return $this; } /** * Parameter name * * @param string $parameter18Name Parameter name * @return $this Fluent Builder */ public function setParameter18Name(string $parameter18Name): self { $this->options['parameter18Name'] = $parameter18Name; return $this; } /** * Parameter value * * @param string $parameter18Value Parameter value * @return $this Fluent Builder */ public function setParameter18Value(string $parameter18Value): self { $this->options['parameter18Value'] = $parameter18Value; return $this; } /** * Parameter name * * @param string $parameter19Name Parameter name * @return $this Fluent Builder */ public function setParameter19Name(string $parameter19Name): self { $this->options['parameter19Name'] = $parameter19Name; return $this; } /** * Parameter value * * @param string $parameter19Value Parameter value * @return $this Fluent Builder */ public function setParameter19Value(string $parameter19Value): self { $this->options['parameter19Value'] = $parameter19Value; return $this; } /** * Parameter name * * @param string $parameter20Name Parameter name * @return $this Fluent Builder */ public function setParameter20Name(string $parameter20Name): self { $this->options['parameter20Name'] = $parameter20Name; return $this; } /** * Parameter value * * @param string $parameter20Value Parameter value * @return $this Fluent Builder */ public function setParameter20Value(string $parameter20Value): self { $this->options['parameter20Value'] = $parameter20Value; return $this; } /** * Parameter name * * @param string $parameter21Name Parameter name * @return $this Fluent Builder */ public function setParameter21Name(string $parameter21Name): self { $this->options['parameter21Name'] = $parameter21Name; return $this; } /** * Parameter value * * @param string $parameter21Value Parameter value * @return $this Fluent Builder */ public function setParameter21Value(string $parameter21Value): self { $this->options['parameter21Value'] = $parameter21Value; return $this; } /** * Parameter name * * @param string $parameter22Name Parameter name * @return $this Fluent Builder */ public function setParameter22Name(string $parameter22Name): self { $this->options['parameter22Name'] = $parameter22Name; return $this; } /** * Parameter value * * @param string $parameter22Value Parameter value * @return $this Fluent Builder */ public function setParameter22Value(string $parameter22Value): self { $this->options['parameter22Value'] = $parameter22Value; return $this; } /** * Parameter name * * @param string $parameter23Name Parameter name * @return $this Fluent Builder */ public function setParameter23Name(string $parameter23Name): self { $this->options['parameter23Name'] = $parameter23Name; return $this; } /** * Parameter value * * @param string $parameter23Value Parameter value * @return $this Fluent Builder */ public function setParameter23Value(string $parameter23Value): self { $this->options['parameter23Value'] = $parameter23Value; return $this; } /** * Parameter name * * @param string $parameter24Name Parameter name * @return $this Fluent Builder */ public function setParameter24Name(string $parameter24Name): self { $this->options['parameter24Name'] = $parameter24Name; return $this; } /** * Parameter value * * @param string $parameter24Value Parameter value * @return $this Fluent Builder */ public function setParameter24Value(string $parameter24Value): self { $this->options['parameter24Value'] = $parameter24Value; return $this; } /** * Parameter name * * @param string $parameter25Name Parameter name * @return $this Fluent Builder */ public function setParameter25Name(string $parameter25Name): self { $this->options['parameter25Name'] = $parameter25Name; return $this; } /** * Parameter value * * @param string $parameter25Value Parameter value * @return $this Fluent Builder */ public function setParameter25Value(string $parameter25Value): self { $this->options['parameter25Value'] = $parameter25Value; return $this; } /** * Parameter name * * @param string $parameter26Name Parameter name * @return $this Fluent Builder */ public function setParameter26Name(string $parameter26Name): self { $this->options['parameter26Name'] = $parameter26Name; return $this; } /** * Parameter value * * @param string $parameter26Value Parameter value * @return $this Fluent Builder */ public function setParameter26Value(string $parameter26Value): self { $this->options['parameter26Value'] = $parameter26Value; return $this; } /** * Parameter name * * @param string $parameter27Name Parameter name * @return $this Fluent Builder */ public function setParameter27Name(string $parameter27Name): self { $this->options['parameter27Name'] = $parameter27Name; return $this; } /** * Parameter value * * @param string $parameter27Value Parameter value * @return $this Fluent Builder */ public function setParameter27Value(string $parameter27Value): self { $this->options['parameter27Value'] = $parameter27Value; return $this; } /** * Parameter name * * @param string $parameter28Name Parameter name * @return $this Fluent Builder */ public function setParameter28Name(string $parameter28Name): self { $this->options['parameter28Name'] = $parameter28Name; return $this; } /** * Parameter value * * @param string $parameter28Value Parameter value * @return $this Fluent Builder */ public function setParameter28Value(string $parameter28Value): self { $this->options['parameter28Value'] = $parameter28Value; return $this; } /** * Parameter name * * @param string $parameter29Name Parameter name * @return $this Fluent Builder */ public function setParameter29Name(string $parameter29Name): self { $this->options['parameter29Name'] = $parameter29Name; return $this; } /** * Parameter value * * @param string $parameter29Value Parameter value * @return $this Fluent Builder */ public function setParameter29Value(string $parameter29Value): self { $this->options['parameter29Value'] = $parameter29Value; return $this; } /** * Parameter name * * @param string $parameter30Name Parameter name * @return $this Fluent Builder */ public function setParameter30Name(string $parameter30Name): self { $this->options['parameter30Name'] = $parameter30Name; return $this; } /** * Parameter value * * @param string $parameter30Value Parameter value * @return $this Fluent Builder */ public function setParameter30Value(string $parameter30Value): self { $this->options['parameter30Value'] = $parameter30Value; return $this; } /** * Parameter name * * @param string $parameter31Name Parameter name * @return $this Fluent Builder */ public function setParameter31Name(string $parameter31Name): self { $this->options['parameter31Name'] = $parameter31Name; return $this; } /** * Parameter value * * @param string $parameter31Value Parameter value * @return $this Fluent Builder */ public function setParameter31Value(string $parameter31Value): self { $this->options['parameter31Value'] = $parameter31Value; return $this; } /** * Parameter name * * @param string $parameter32Name Parameter name * @return $this Fluent Builder */ public function setParameter32Name(string $parameter32Name): self { $this->options['parameter32Name'] = $parameter32Name; return $this; } /** * Parameter value * * @param string $parameter32Value Parameter value * @return $this Fluent Builder */ public function setParameter32Value(string $parameter32Value): self { $this->options['parameter32Value'] = $parameter32Value; return $this; } /** * Parameter name * * @param string $parameter33Name Parameter name * @return $this Fluent Builder */ public function setParameter33Name(string $parameter33Name): self { $this->options['parameter33Name'] = $parameter33Name; return $this; } /** * Parameter value * * @param string $parameter33Value Parameter value * @return $this Fluent Builder */ public function setParameter33Value(string $parameter33Value): self { $this->options['parameter33Value'] = $parameter33Value; return $this; } /** * Parameter name * * @param string $parameter34Name Parameter name * @return $this Fluent Builder */ public function setParameter34Name(string $parameter34Name): self { $this->options['parameter34Name'] = $parameter34Name; return $this; } /** * Parameter value * * @param string $parameter34Value Parameter value * @return $this Fluent Builder */ public function setParameter34Value(string $parameter34Value): self { $this->options['parameter34Value'] = $parameter34Value; return $this; } /** * Parameter name * * @param string $parameter35Name Parameter name * @return $this Fluent Builder */ public function setParameter35Name(string $parameter35Name): self { $this->options['parameter35Name'] = $parameter35Name; return $this; } /** * Parameter value * * @param string $parameter35Value Parameter value * @return $this Fluent Builder */ public function setParameter35Value(string $parameter35Value): self { $this->options['parameter35Value'] = $parameter35Value; return $this; } /** * Parameter name * * @param string $parameter36Name Parameter name * @return $this Fluent Builder */ public function setParameter36Name(string $parameter36Name): self { $this->options['parameter36Name'] = $parameter36Name; return $this; } /** * Parameter value * * @param string $parameter36Value Parameter value * @return $this Fluent Builder */ public function setParameter36Value(string $parameter36Value): self { $this->options['parameter36Value'] = $parameter36Value; return $this; } /** * Parameter name * * @param string $parameter37Name Parameter name * @return $this Fluent Builder */ public function setParameter37Name(string $parameter37Name): self { $this->options['parameter37Name'] = $parameter37Name; return $this; } /** * Parameter value * * @param string $parameter37Value Parameter value * @return $this Fluent Builder */ public function setParameter37Value(string $parameter37Value): self { $this->options['parameter37Value'] = $parameter37Value; return $this; } /** * Parameter name * * @param string $parameter38Name Parameter name * @return $this Fluent Builder */ public function setParameter38Name(string $parameter38Name): self { $this->options['parameter38Name'] = $parameter38Name; return $this; } /** * Parameter value * * @param string $parameter38Value Parameter value * @return $this Fluent Builder */ public function setParameter38Value(string $parameter38Value): self { $this->options['parameter38Value'] = $parameter38Value; return $this; } /** * Parameter name * * @param string $parameter39Name Parameter name * @return $this Fluent Builder */ public function setParameter39Name(string $parameter39Name): self { $this->options['parameter39Name'] = $parameter39Name; return $this; } /** * Parameter value * * @param string $parameter39Value Parameter value * @return $this Fluent Builder */ public function setParameter39Value(string $parameter39Value): self { $this->options['parameter39Value'] = $parameter39Value; return $this; } /** * Parameter name * * @param string $parameter40Name Parameter name * @return $this Fluent Builder */ public function setParameter40Name(string $parameter40Name): self { $this->options['parameter40Name'] = $parameter40Name; return $this; } /** * Parameter value * * @param string $parameter40Value Parameter value * @return $this Fluent Builder */ public function setParameter40Value(string $parameter40Value): self { $this->options['parameter40Value'] = $parameter40Value; return $this; } /** * Parameter name * * @param string $parameter41Name Parameter name * @return $this Fluent Builder */ public function setParameter41Name(string $parameter41Name): self { $this->options['parameter41Name'] = $parameter41Name; return $this; } /** * Parameter value * * @param string $parameter41Value Parameter value * @return $this Fluent Builder */ public function setParameter41Value(string $parameter41Value): self { $this->options['parameter41Value'] = $parameter41Value; return $this; } /** * Parameter name * * @param string $parameter42Name Parameter name * @return $this Fluent Builder */ public function setParameter42Name(string $parameter42Name): self { $this->options['parameter42Name'] = $parameter42Name; return $this; } /** * Parameter value * * @param string $parameter42Value Parameter value * @return $this Fluent Builder */ public function setParameter42Value(string $parameter42Value): self { $this->options['parameter42Value'] = $parameter42Value; return $this; } /** * Parameter name * * @param string $parameter43Name Parameter name * @return $this Fluent Builder */ public function setParameter43Name(string $parameter43Name): self { $this->options['parameter43Name'] = $parameter43Name; return $this; } /** * Parameter value * * @param string $parameter43Value Parameter value * @return $this Fluent Builder */ public function setParameter43Value(string $parameter43Value): self { $this->options['parameter43Value'] = $parameter43Value; return $this; } /** * Parameter name * * @param string $parameter44Name Parameter name * @return $this Fluent Builder */ public function setParameter44Name(string $parameter44Name): self { $this->options['parameter44Name'] = $parameter44Name; return $this; } /** * Parameter value * * @param string $parameter44Value Parameter value * @return $this Fluent Builder */ public function setParameter44Value(string $parameter44Value): self { $this->options['parameter44Value'] = $parameter44Value; return $this; } /** * Parameter name * * @param string $parameter45Name Parameter name * @return $this Fluent Builder */ public function setParameter45Name(string $parameter45Name): self { $this->options['parameter45Name'] = $parameter45Name; return $this; } /** * Parameter value * * @param string $parameter45Value Parameter value * @return $this Fluent Builder */ public function setParameter45Value(string $parameter45Value): self { $this->options['parameter45Value'] = $parameter45Value; return $this; } /** * Parameter name * * @param string $parameter46Name Parameter name * @return $this Fluent Builder */ public function setParameter46Name(string $parameter46Name): self { $this->options['parameter46Name'] = $parameter46Name; return $this; } /** * Parameter value * * @param string $parameter46Value Parameter value * @return $this Fluent Builder */ public function setParameter46Value(string $parameter46Value): self { $this->options['parameter46Value'] = $parameter46Value; return $this; } /** * Parameter name * * @param string $parameter47Name Parameter name * @return $this Fluent Builder */ public function setParameter47Name(string $parameter47Name): self { $this->options['parameter47Name'] = $parameter47Name; return $this; } /** * Parameter value * * @param string $parameter47Value Parameter value * @return $this Fluent Builder */ public function setParameter47Value(string $parameter47Value): self { $this->options['parameter47Value'] = $parameter47Value; return $this; } /** * Parameter name * * @param string $parameter48Name Parameter name * @return $this Fluent Builder */ public function setParameter48Name(string $parameter48Name): self { $this->options['parameter48Name'] = $parameter48Name; return $this; } /** * Parameter value * * @param string $parameter48Value Parameter value * @return $this Fluent Builder */ public function setParameter48Value(string $parameter48Value): self { $this->options['parameter48Value'] = $parameter48Value; return $this; } /** * Parameter name * * @param string $parameter49Name Parameter name * @return $this Fluent Builder */ public function setParameter49Name(string $parameter49Name): self { $this->options['parameter49Name'] = $parameter49Name; return $this; } /** * Parameter value * * @param string $parameter49Value Parameter value * @return $this Fluent Builder */ public function setParameter49Value(string $parameter49Value): self { $this->options['parameter49Value'] = $parameter49Value; return $this; } /** * Parameter name * * @param string $parameter50Name Parameter name * @return $this Fluent Builder */ public function setParameter50Name(string $parameter50Name): self { $this->options['parameter50Name'] = $parameter50Name; return $this; } /** * Parameter value * * @param string $parameter50Value Parameter value * @return $this Fluent Builder */ public function setParameter50Value(string $parameter50Value): self { $this->options['parameter50Value'] = $parameter50Value; return $this; } /** * Parameter name * * @param string $parameter51Name Parameter name * @return $this Fluent Builder */ public function setParameter51Name(string $parameter51Name): self { $this->options['parameter51Name'] = $parameter51Name; return $this; } /** * Parameter value * * @param string $parameter51Value Parameter value * @return $this Fluent Builder */ public function setParameter51Value(string $parameter51Value): self { $this->options['parameter51Value'] = $parameter51Value; return $this; } /** * Parameter name * * @param string $parameter52Name Parameter name * @return $this Fluent Builder */ public function setParameter52Name(string $parameter52Name): self { $this->options['parameter52Name'] = $parameter52Name; return $this; } /** * Parameter value * * @param string $parameter52Value Parameter value * @return $this Fluent Builder */ public function setParameter52Value(string $parameter52Value): self { $this->options['parameter52Value'] = $parameter52Value; return $this; } /** * Parameter name * * @param string $parameter53Name Parameter name * @return $this Fluent Builder */ public function setParameter53Name(string $parameter53Name): self { $this->options['parameter53Name'] = $parameter53Name; return $this; } /** * Parameter value * * @param string $parameter53Value Parameter value * @return $this Fluent Builder */ public function setParameter53Value(string $parameter53Value): self { $this->options['parameter53Value'] = $parameter53Value; return $this; } /** * Parameter name * * @param string $parameter54Name Parameter name * @return $this Fluent Builder */ public function setParameter54Name(string $parameter54Name): self { $this->options['parameter54Name'] = $parameter54Name; return $this; } /** * Parameter value * * @param string $parameter54Value Parameter value * @return $this Fluent Builder */ public function setParameter54Value(string $parameter54Value): self { $this->options['parameter54Value'] = $parameter54Value; return $this; } /** * Parameter name * * @param string $parameter55Name Parameter name * @return $this Fluent Builder */ public function setParameter55Name(string $parameter55Name): self { $this->options['parameter55Name'] = $parameter55Name; return $this; } /** * Parameter value * * @param string $parameter55Value Parameter value * @return $this Fluent Builder */ public function setParameter55Value(string $parameter55Value): self { $this->options['parameter55Value'] = $parameter55Value; return $this; } /** * Parameter name * * @param string $parameter56Name Parameter name * @return $this Fluent Builder */ public function setParameter56Name(string $parameter56Name): self { $this->options['parameter56Name'] = $parameter56Name; return $this; } /** * Parameter value * * @param string $parameter56Value Parameter value * @return $this Fluent Builder */ public function setParameter56Value(string $parameter56Value): self { $this->options['parameter56Value'] = $parameter56Value; return $this; } /** * Parameter name * * @param string $parameter57Name Parameter name * @return $this Fluent Builder */ public function setParameter57Name(string $parameter57Name): self { $this->options['parameter57Name'] = $parameter57Name; return $this; } /** * Parameter value * * @param string $parameter57Value Parameter value * @return $this Fluent Builder */ public function setParameter57Value(string $parameter57Value): self { $this->options['parameter57Value'] = $parameter57Value; return $this; } /** * Parameter name * * @param string $parameter58Name Parameter name * @return $this Fluent Builder */ public function setParameter58Name(string $parameter58Name): self { $this->options['parameter58Name'] = $parameter58Name; return $this; } /** * Parameter value * * @param string $parameter58Value Parameter value * @return $this Fluent Builder */ public function setParameter58Value(string $parameter58Value): self { $this->options['parameter58Value'] = $parameter58Value; return $this; } /** * Parameter name * * @param string $parameter59Name Parameter name * @return $this Fluent Builder */ public function setParameter59Name(string $parameter59Name): self { $this->options['parameter59Name'] = $parameter59Name; return $this; } /** * Parameter value * * @param string $parameter59Value Parameter value * @return $this Fluent Builder */ public function setParameter59Value(string $parameter59Value): self { $this->options['parameter59Value'] = $parameter59Value; return $this; } /** * Parameter name * * @param string $parameter60Name Parameter name * @return $this Fluent Builder */ public function setParameter60Name(string $parameter60Name): self { $this->options['parameter60Name'] = $parameter60Name; return $this; } /** * Parameter value * * @param string $parameter60Value Parameter value * @return $this Fluent Builder */ public function setParameter60Value(string $parameter60Value): self { $this->options['parameter60Value'] = $parameter60Value; return $this; } /** * Parameter name * * @param string $parameter61Name Parameter name * @return $this Fluent Builder */ public function setParameter61Name(string $parameter61Name): self { $this->options['parameter61Name'] = $parameter61Name; return $this; } /** * Parameter value * * @param string $parameter61Value Parameter value * @return $this Fluent Builder */ public function setParameter61Value(string $parameter61Value): self { $this->options['parameter61Value'] = $parameter61Value; return $this; } /** * Parameter name * * @param string $parameter62Name Parameter name * @return $this Fluent Builder */ public function setParameter62Name(string $parameter62Name): self { $this->options['parameter62Name'] = $parameter62Name; return $this; } /** * Parameter value * * @param string $parameter62Value Parameter value * @return $this Fluent Builder */ public function setParameter62Value(string $parameter62Value): self { $this->options['parameter62Value'] = $parameter62Value; return $this; } /** * Parameter name * * @param string $parameter63Name Parameter name * @return $this Fluent Builder */ public function setParameter63Name(string $parameter63Name): self { $this->options['parameter63Name'] = $parameter63Name; return $this; } /** * Parameter value * * @param string $parameter63Value Parameter value * @return $this Fluent Builder */ public function setParameter63Value(string $parameter63Value): self { $this->options['parameter63Value'] = $parameter63Value; return $this; } /** * Parameter name * * @param string $parameter64Name Parameter name * @return $this Fluent Builder */ public function setParameter64Name(string $parameter64Name): self { $this->options['parameter64Name'] = $parameter64Name; return $this; } /** * Parameter value * * @param string $parameter64Value Parameter value * @return $this Fluent Builder */ public function setParameter64Value(string $parameter64Value): self { $this->options['parameter64Value'] = $parameter64Value; return $this; } /** * Parameter name * * @param string $parameter65Name Parameter name * @return $this Fluent Builder */ public function setParameter65Name(string $parameter65Name): self { $this->options['parameter65Name'] = $parameter65Name; return $this; } /** * Parameter value * * @param string $parameter65Value Parameter value * @return $this Fluent Builder */ public function setParameter65Value(string $parameter65Value): self { $this->options['parameter65Value'] = $parameter65Value; return $this; } /** * Parameter name * * @param string $parameter66Name Parameter name * @return $this Fluent Builder */ public function setParameter66Name(string $parameter66Name): self { $this->options['parameter66Name'] = $parameter66Name; return $this; } /** * Parameter value * * @param string $parameter66Value Parameter value * @return $this Fluent Builder */ public function setParameter66Value(string $parameter66Value): self { $this->options['parameter66Value'] = $parameter66Value; return $this; } /** * Parameter name * * @param string $parameter67Name Parameter name * @return $this Fluent Builder */ public function setParameter67Name(string $parameter67Name): self { $this->options['parameter67Name'] = $parameter67Name; return $this; } /** * Parameter value * * @param string $parameter67Value Parameter value * @return $this Fluent Builder */ public function setParameter67Value(string $parameter67Value): self { $this->options['parameter67Value'] = $parameter67Value; return $this; } /** * Parameter name * * @param string $parameter68Name Parameter name * @return $this Fluent Builder */ public function setParameter68Name(string $parameter68Name): self { $this->options['parameter68Name'] = $parameter68Name; return $this; } /** * Parameter value * * @param string $parameter68Value Parameter value * @return $this Fluent Builder */ public function setParameter68Value(string $parameter68Value): self { $this->options['parameter68Value'] = $parameter68Value; return $this; } /** * Parameter name * * @param string $parameter69Name Parameter name * @return $this Fluent Builder */ public function setParameter69Name(string $parameter69Name): self { $this->options['parameter69Name'] = $parameter69Name; return $this; } /** * Parameter value * * @param string $parameter69Value Parameter value * @return $this Fluent Builder */ public function setParameter69Value(string $parameter69Value): self { $this->options['parameter69Value'] = $parameter69Value; return $this; } /** * Parameter name * * @param string $parameter70Name Parameter name * @return $this Fluent Builder */ public function setParameter70Name(string $parameter70Name): self { $this->options['parameter70Name'] = $parameter70Name; return $this; } /** * Parameter value * * @param string $parameter70Value Parameter value * @return $this Fluent Builder */ public function setParameter70Value(string $parameter70Value): self { $this->options['parameter70Value'] = $parameter70Value; return $this; } /** * Parameter name * * @param string $parameter71Name Parameter name * @return $this Fluent Builder */ public function setParameter71Name(string $parameter71Name): self { $this->options['parameter71Name'] = $parameter71Name; return $this; } /** * Parameter value * * @param string $parameter71Value Parameter value * @return $this Fluent Builder */ public function setParameter71Value(string $parameter71Value): self { $this->options['parameter71Value'] = $parameter71Value; return $this; } /** * Parameter name * * @param string $parameter72Name Parameter name * @return $this Fluent Builder */ public function setParameter72Name(string $parameter72Name): self { $this->options['parameter72Name'] = $parameter72Name; return $this; } /** * Parameter value * * @param string $parameter72Value Parameter value * @return $this Fluent Builder */ public function setParameter72Value(string $parameter72Value): self { $this->options['parameter72Value'] = $parameter72Value; return $this; } /** * Parameter name * * @param string $parameter73Name Parameter name * @return $this Fluent Builder */ public function setParameter73Name(string $parameter73Name): self { $this->options['parameter73Name'] = $parameter73Name; return $this; } /** * Parameter value * * @param string $parameter73Value Parameter value * @return $this Fluent Builder */ public function setParameter73Value(string $parameter73Value): self { $this->options['parameter73Value'] = $parameter73Value; return $this; } /** * Parameter name * * @param string $parameter74Name Parameter name * @return $this Fluent Builder */ public function setParameter74Name(string $parameter74Name): self { $this->options['parameter74Name'] = $parameter74Name; return $this; } /** * Parameter value * * @param string $parameter74Value Parameter value * @return $this Fluent Builder */ public function setParameter74Value(string $parameter74Value): self { $this->options['parameter74Value'] = $parameter74Value; return $this; } /** * Parameter name * * @param string $parameter75Name Parameter name * @return $this Fluent Builder */ public function setParameter75Name(string $parameter75Name): self { $this->options['parameter75Name'] = $parameter75Name; return $this; } /** * Parameter value * * @param string $parameter75Value Parameter value * @return $this Fluent Builder */ public function setParameter75Value(string $parameter75Value): self { $this->options['parameter75Value'] = $parameter75Value; return $this; } /** * Parameter name * * @param string $parameter76Name Parameter name * @return $this Fluent Builder */ public function setParameter76Name(string $parameter76Name): self { $this->options['parameter76Name'] = $parameter76Name; return $this; } /** * Parameter value * * @param string $parameter76Value Parameter value * @return $this Fluent Builder */ public function setParameter76Value(string $parameter76Value): self { $this->options['parameter76Value'] = $parameter76Value; return $this; } /** * Parameter name * * @param string $parameter77Name Parameter name * @return $this Fluent Builder */ public function setParameter77Name(string $parameter77Name): self { $this->options['parameter77Name'] = $parameter77Name; return $this; } /** * Parameter value * * @param string $parameter77Value Parameter value * @return $this Fluent Builder */ public function setParameter77Value(string $parameter77Value): self { $this->options['parameter77Value'] = $parameter77Value; return $this; } /** * Parameter name * * @param string $parameter78Name Parameter name * @return $this Fluent Builder */ public function setParameter78Name(string $parameter78Name): self { $this->options['parameter78Name'] = $parameter78Name; return $this; } /** * Parameter value * * @param string $parameter78Value Parameter value * @return $this Fluent Builder */ public function setParameter78Value(string $parameter78Value): self { $this->options['parameter78Value'] = $parameter78Value; return $this; } /** * Parameter name * * @param string $parameter79Name Parameter name * @return $this Fluent Builder */ public function setParameter79Name(string $parameter79Name): self { $this->options['parameter79Name'] = $parameter79Name; return $this; } /** * Parameter value * * @param string $parameter79Value Parameter value * @return $this Fluent Builder */ public function setParameter79Value(string $parameter79Value): self { $this->options['parameter79Value'] = $parameter79Value; return $this; } /** * Parameter name * * @param string $parameter80Name Parameter name * @return $this Fluent Builder */ public function setParameter80Name(string $parameter80Name): self { $this->options['parameter80Name'] = $parameter80Name; return $this; } /** * Parameter value * * @param string $parameter80Value Parameter value * @return $this Fluent Builder */ public function setParameter80Value(string $parameter80Value): self { $this->options['parameter80Value'] = $parameter80Value; return $this; } /** * Parameter name * * @param string $parameter81Name Parameter name * @return $this Fluent Builder */ public function setParameter81Name(string $parameter81Name): self { $this->options['parameter81Name'] = $parameter81Name; return $this; } /** * Parameter value * * @param string $parameter81Value Parameter value * @return $this Fluent Builder */ public function setParameter81Value(string $parameter81Value): self { $this->options['parameter81Value'] = $parameter81Value; return $this; } /** * Parameter name * * @param string $parameter82Name Parameter name * @return $this Fluent Builder */ public function setParameter82Name(string $parameter82Name): self { $this->options['parameter82Name'] = $parameter82Name; return $this; } /** * Parameter value * * @param string $parameter82Value Parameter value * @return $this Fluent Builder */ public function setParameter82Value(string $parameter82Value): self { $this->options['parameter82Value'] = $parameter82Value; return $this; } /** * Parameter name * * @param string $parameter83Name Parameter name * @return $this Fluent Builder */ public function setParameter83Name(string $parameter83Name): self { $this->options['parameter83Name'] = $parameter83Name; return $this; } /** * Parameter value * * @param string $parameter83Value Parameter value * @return $this Fluent Builder */ public function setParameter83Value(string $parameter83Value): self { $this->options['parameter83Value'] = $parameter83Value; return $this; } /** * Parameter name * * @param string $parameter84Name Parameter name * @return $this Fluent Builder */ public function setParameter84Name(string $parameter84Name): self { $this->options['parameter84Name'] = $parameter84Name; return $this; } /** * Parameter value * * @param string $parameter84Value Parameter value * @return $this Fluent Builder */ public function setParameter84Value(string $parameter84Value): self { $this->options['parameter84Value'] = $parameter84Value; return $this; } /** * Parameter name * * @param string $parameter85Name Parameter name * @return $this Fluent Builder */ public function setParameter85Name(string $parameter85Name): self { $this->options['parameter85Name'] = $parameter85Name; return $this; } /** * Parameter value * * @param string $parameter85Value Parameter value * @return $this Fluent Builder */ public function setParameter85Value(string $parameter85Value): self { $this->options['parameter85Value'] = $parameter85Value; return $this; } /** * Parameter name * * @param string $parameter86Name Parameter name * @return $this Fluent Builder */ public function setParameter86Name(string $parameter86Name): self { $this->options['parameter86Name'] = $parameter86Name; return $this; } /** * Parameter value * * @param string $parameter86Value Parameter value * @return $this Fluent Builder */ public function setParameter86Value(string $parameter86Value): self { $this->options['parameter86Value'] = $parameter86Value; return $this; } /** * Parameter name * * @param string $parameter87Name Parameter name * @return $this Fluent Builder */ public function setParameter87Name(string $parameter87Name): self { $this->options['parameter87Name'] = $parameter87Name; return $this; } /** * Parameter value * * @param string $parameter87Value Parameter value * @return $this Fluent Builder */ public function setParameter87Value(string $parameter87Value): self { $this->options['parameter87Value'] = $parameter87Value; return $this; } /** * Parameter name * * @param string $parameter88Name Parameter name * @return $this Fluent Builder */ public function setParameter88Name(string $parameter88Name): self { $this->options['parameter88Name'] = $parameter88Name; return $this; } /** * Parameter value * * @param string $parameter88Value Parameter value * @return $this Fluent Builder */ public function setParameter88Value(string $parameter88Value): self { $this->options['parameter88Value'] = $parameter88Value; return $this; } /** * Parameter name * * @param string $parameter89Name Parameter name * @return $this Fluent Builder */ public function setParameter89Name(string $parameter89Name): self { $this->options['parameter89Name'] = $parameter89Name; return $this; } /** * Parameter value * * @param string $parameter89Value Parameter value * @return $this Fluent Builder */ public function setParameter89Value(string $parameter89Value): self { $this->options['parameter89Value'] = $parameter89Value; return $this; } /** * Parameter name * * @param string $parameter90Name Parameter name * @return $this Fluent Builder */ public function setParameter90Name(string $parameter90Name): self { $this->options['parameter90Name'] = $parameter90Name; return $this; } /** * Parameter value * * @param string $parameter90Value Parameter value * @return $this Fluent Builder */ public function setParameter90Value(string $parameter90Value): self { $this->options['parameter90Value'] = $parameter90Value; return $this; } /** * Parameter name * * @param string $parameter91Name Parameter name * @return $this Fluent Builder */ public function setParameter91Name(string $parameter91Name): self { $this->options['parameter91Name'] = $parameter91Name; return $this; } /** * Parameter value * * @param string $parameter91Value Parameter value * @return $this Fluent Builder */ public function setParameter91Value(string $parameter91Value): self { $this->options['parameter91Value'] = $parameter91Value; return $this; } /** * Parameter name * * @param string $parameter92Name Parameter name * @return $this Fluent Builder */ public function setParameter92Name(string $parameter92Name): self { $this->options['parameter92Name'] = $parameter92Name; return $this; } /** * Parameter value * * @param string $parameter92Value Parameter value * @return $this Fluent Builder */ public function setParameter92Value(string $parameter92Value): self { $this->options['parameter92Value'] = $parameter92Value; return $this; } /** * Parameter name * * @param string $parameter93Name Parameter name * @return $this Fluent Builder */ public function setParameter93Name(string $parameter93Name): self { $this->options['parameter93Name'] = $parameter93Name; return $this; } /** * Parameter value * * @param string $parameter93Value Parameter value * @return $this Fluent Builder */ public function setParameter93Value(string $parameter93Value): self { $this->options['parameter93Value'] = $parameter93Value; return $this; } /** * Parameter name * * @param string $parameter94Name Parameter name * @return $this Fluent Builder */ public function setParameter94Name(string $parameter94Name): self { $this->options['parameter94Name'] = $parameter94Name; return $this; } /** * Parameter value * * @param string $parameter94Value Parameter value * @return $this Fluent Builder */ public function setParameter94Value(string $parameter94Value): self { $this->options['parameter94Value'] = $parameter94Value; return $this; } /** * Parameter name * * @param string $parameter95Name Parameter name * @return $this Fluent Builder */ public function setParameter95Name(string $parameter95Name): self { $this->options['parameter95Name'] = $parameter95Name; return $this; } /** * Parameter value * * @param string $parameter95Value Parameter value * @return $this Fluent Builder */ public function setParameter95Value(string $parameter95Value): self { $this->options['parameter95Value'] = $parameter95Value; return $this; } /** * Parameter name * * @param string $parameter96Name Parameter name * @return $this Fluent Builder */ public function setParameter96Name(string $parameter96Name): self { $this->options['parameter96Name'] = $parameter96Name; return $this; } /** * Parameter value * * @param string $parameter96Value Parameter value * @return $this Fluent Builder */ public function setParameter96Value(string $parameter96Value): self { $this->options['parameter96Value'] = $parameter96Value; return $this; } /** * Parameter name * * @param string $parameter97Name Parameter name * @return $this Fluent Builder */ public function setParameter97Name(string $parameter97Name): self { $this->options['parameter97Name'] = $parameter97Name; return $this; } /** * Parameter value * * @param string $parameter97Value Parameter value * @return $this Fluent Builder */ public function setParameter97Value(string $parameter97Value): self { $this->options['parameter97Value'] = $parameter97Value; return $this; } /** * Parameter name * * @param string $parameter98Name Parameter name * @return $this Fluent Builder */ public function setParameter98Name(string $parameter98Name): self { $this->options['parameter98Name'] = $parameter98Name; return $this; } /** * Parameter value * * @param string $parameter98Value Parameter value * @return $this Fluent Builder */ public function setParameter98Value(string $parameter98Value): self { $this->options['parameter98Value'] = $parameter98Value; return $this; } /** * Parameter name * * @param string $parameter99Name Parameter name * @return $this Fluent Builder */ public function setParameter99Name(string $parameter99Name): self { $this->options['parameter99Name'] = $parameter99Name; return $this; } /** * Parameter value * * @param string $parameter99Value Parameter value * @return $this Fluent Builder */ public function setParameter99Value(string $parameter99Value): self { $this->options['parameter99Value'] = $parameter99Value; 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.Api.V2010.CreateStreamOptions ' . $options . ']'; } } V2010/Account/Call/NotificationContext.php 0000644 00000003761 15111164136 0014235 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; class NotificationContext extends InstanceContext { /** * Initialize the NotificationContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $callSid The Call SID of the resource to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $callSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Notifications/' . \rawurlencode($sid) . '.json'; } /** * Fetch the NotificationInstance * * @return NotificationInstance Fetched NotificationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NotificationInstance { $payload = $this->version->fetch('GET', $this->uri); return new NotificationInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } /** * 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.Api.V2010.NotificationContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Call/SiprecContext.php 0000644 00000004070 15111164137 0013027 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; class SiprecContext extends InstanceContext { /** * Initialize the SiprecContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created this resource * @param string $callSid The SID of the Call the resource is associated with * @param string $sid The SID of the Siprec resource, or the `name` */ public function __construct(Version $version, $accountSid, $callSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Siprec/' . \rawurlencode($sid) . '.json'; } /** * Update the SiprecInstance * * @param string $status The status. Must have the value `stopped` * @return SiprecInstance Updated SiprecInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): SiprecInstance { $data = Values::of(['Status' => $status, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SiprecInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } /** * 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.Api.V2010.SiprecContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Call/FeedbackOptions.php 0000644 00000007073 15111164137 0013303 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Options; use Twilio\Values; abstract class FeedbackOptions { /** * @param string[] $issue Issues experienced during the call * @return CreateFeedbackOptions Options builder */ public static function create(array $issue = Values::ARRAY_NONE): CreateFeedbackOptions { return new CreateFeedbackOptions($issue); } /** * @param int $qualityScore The call quality expressed as an integer from 1 to 5 * @param string[] $issue Issues experienced during the call * @return UpdateFeedbackOptions Options builder */ public static function update(int $qualityScore = Values::NONE, array $issue = Values::ARRAY_NONE): UpdateFeedbackOptions { return new UpdateFeedbackOptions($qualityScore, $issue); } } class CreateFeedbackOptions extends Options { /** * @param string[] $issue Issues experienced during the call */ public function __construct(array $issue = Values::ARRAY_NONE) { $this->options['issue'] = $issue; } /** * A list of one or more issues experienced during the call. Issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`. * * @param string[] $issue Issues experienced during the call * @return $this Fluent Builder */ public function setIssue(array $issue): self { $this->options['issue'] = $issue; 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.Api.V2010.CreateFeedbackOptions ' . $options . ']'; } } class UpdateFeedbackOptions extends Options { /** * @param int $qualityScore The call quality expressed as an integer from 1 to 5 * @param string[] $issue Issues experienced during the call */ public function __construct(int $qualityScore = Values::NONE, array $issue = Values::ARRAY_NONE) { $this->options['qualityScore'] = $qualityScore; $this->options['issue'] = $issue; } /** * The call quality expressed as an integer from `1` to `5` where `1` represents very poor call quality and `5` represents a perfect call. * * @param int $qualityScore The call quality expressed as an integer from 1 to 5 * @return $this Fluent Builder */ public function setQualityScore(int $qualityScore): self { $this->options['qualityScore'] = $qualityScore; return $this; } /** * One or more issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`. * * @param string[] $issue Issues experienced during the call * @return $this Fluent Builder */ public function setIssue(array $issue): self { $this->options['issue'] = $issue; 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.Api.V2010.UpdateFeedbackOptions ' . $options . ']'; } } V2010/Account/Call/SiprecOptions.php 0000644 00000344567 15111164137 0013060 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Options; use Twilio\Values; abstract class SiprecOptions { /** * @param string $name The name of this resource * @param string $connectorName Unique name used when configuring the connector * via Marketplace Add-on. * @param string $track One of `inbound_track`, `outbound_track`, `both_tracks`. * @param string $statusCallback Absolute URL of the status callback. * @param string $statusCallbackMethod The http method for the status_callback. * @param string $parameter1Name Parameter name * @param string $parameter1Value Parameter value * @param string $parameter2Name Parameter name * @param string $parameter2Value Parameter value * @param string $parameter3Name Parameter name * @param string $parameter3Value Parameter value * @param string $parameter4Name Parameter name * @param string $parameter4Value Parameter value * @param string $parameter5Name Parameter name * @param string $parameter5Value Parameter value * @param string $parameter6Name Parameter name * @param string $parameter6Value Parameter value * @param string $parameter7Name Parameter name * @param string $parameter7Value Parameter value * @param string $parameter8Name Parameter name * @param string $parameter8Value Parameter value * @param string $parameter9Name Parameter name * @param string $parameter9Value Parameter value * @param string $parameter10Name Parameter name * @param string $parameter10Value Parameter value * @param string $parameter11Name Parameter name * @param string $parameter11Value Parameter value * @param string $parameter12Name Parameter name * @param string $parameter12Value Parameter value * @param string $parameter13Name Parameter name * @param string $parameter13Value Parameter value * @param string $parameter14Name Parameter name * @param string $parameter14Value Parameter value * @param string $parameter15Name Parameter name * @param string $parameter15Value Parameter value * @param string $parameter16Name Parameter name * @param string $parameter16Value Parameter value * @param string $parameter17Name Parameter name * @param string $parameter17Value Parameter value * @param string $parameter18Name Parameter name * @param string $parameter18Value Parameter value * @param string $parameter19Name Parameter name * @param string $parameter19Value Parameter value * @param string $parameter20Name Parameter name * @param string $parameter20Value Parameter value * @param string $parameter21Name Parameter name * @param string $parameter21Value Parameter value * @param string $parameter22Name Parameter name * @param string $parameter22Value Parameter value * @param string $parameter23Name Parameter name * @param string $parameter23Value Parameter value * @param string $parameter24Name Parameter name * @param string $parameter24Value Parameter value * @param string $parameter25Name Parameter name * @param string $parameter25Value Parameter value * @param string $parameter26Name Parameter name * @param string $parameter26Value Parameter value * @param string $parameter27Name Parameter name * @param string $parameter27Value Parameter value * @param string $parameter28Name Parameter name * @param string $parameter28Value Parameter value * @param string $parameter29Name Parameter name * @param string $parameter29Value Parameter value * @param string $parameter30Name Parameter name * @param string $parameter30Value Parameter value * @param string $parameter31Name Parameter name * @param string $parameter31Value Parameter value * @param string $parameter32Name Parameter name * @param string $parameter32Value Parameter value * @param string $parameter33Name Parameter name * @param string $parameter33Value Parameter value * @param string $parameter34Name Parameter name * @param string $parameter34Value Parameter value * @param string $parameter35Name Parameter name * @param string $parameter35Value Parameter value * @param string $parameter36Name Parameter name * @param string $parameter36Value Parameter value * @param string $parameter37Name Parameter name * @param string $parameter37Value Parameter value * @param string $parameter38Name Parameter name * @param string $parameter38Value Parameter value * @param string $parameter39Name Parameter name * @param string $parameter39Value Parameter value * @param string $parameter40Name Parameter name * @param string $parameter40Value Parameter value * @param string $parameter41Name Parameter name * @param string $parameter41Value Parameter value * @param string $parameter42Name Parameter name * @param string $parameter42Value Parameter value * @param string $parameter43Name Parameter name * @param string $parameter43Value Parameter value * @param string $parameter44Name Parameter name * @param string $parameter44Value Parameter value * @param string $parameter45Name Parameter name * @param string $parameter45Value Parameter value * @param string $parameter46Name Parameter name * @param string $parameter46Value Parameter value * @param string $parameter47Name Parameter name * @param string $parameter47Value Parameter value * @param string $parameter48Name Parameter name * @param string $parameter48Value Parameter value * @param string $parameter49Name Parameter name * @param string $parameter49Value Parameter value * @param string $parameter50Name Parameter name * @param string $parameter50Value Parameter value * @param string $parameter51Name Parameter name * @param string $parameter51Value Parameter value * @param string $parameter52Name Parameter name * @param string $parameter52Value Parameter value * @param string $parameter53Name Parameter name * @param string $parameter53Value Parameter value * @param string $parameter54Name Parameter name * @param string $parameter54Value Parameter value * @param string $parameter55Name Parameter name * @param string $parameter55Value Parameter value * @param string $parameter56Name Parameter name * @param string $parameter56Value Parameter value * @param string $parameter57Name Parameter name * @param string $parameter57Value Parameter value * @param string $parameter58Name Parameter name * @param string $parameter58Value Parameter value * @param string $parameter59Name Parameter name * @param string $parameter59Value Parameter value * @param string $parameter60Name Parameter name * @param string $parameter60Value Parameter value * @param string $parameter61Name Parameter name * @param string $parameter61Value Parameter value * @param string $parameter62Name Parameter name * @param string $parameter62Value Parameter value * @param string $parameter63Name Parameter name * @param string $parameter63Value Parameter value * @param string $parameter64Name Parameter name * @param string $parameter64Value Parameter value * @param string $parameter65Name Parameter name * @param string $parameter65Value Parameter value * @param string $parameter66Name Parameter name * @param string $parameter66Value Parameter value * @param string $parameter67Name Parameter name * @param string $parameter67Value Parameter value * @param string $parameter68Name Parameter name * @param string $parameter68Value Parameter value * @param string $parameter69Name Parameter name * @param string $parameter69Value Parameter value * @param string $parameter70Name Parameter name * @param string $parameter70Value Parameter value * @param string $parameter71Name Parameter name * @param string $parameter71Value Parameter value * @param string $parameter72Name Parameter name * @param string $parameter72Value Parameter value * @param string $parameter73Name Parameter name * @param string $parameter73Value Parameter value * @param string $parameter74Name Parameter name * @param string $parameter74Value Parameter value * @param string $parameter75Name Parameter name * @param string $parameter75Value Parameter value * @param string $parameter76Name Parameter name * @param string $parameter76Value Parameter value * @param string $parameter77Name Parameter name * @param string $parameter77Value Parameter value * @param string $parameter78Name Parameter name * @param string $parameter78Value Parameter value * @param string $parameter79Name Parameter name * @param string $parameter79Value Parameter value * @param string $parameter80Name Parameter name * @param string $parameter80Value Parameter value * @param string $parameter81Name Parameter name * @param string $parameter81Value Parameter value * @param string $parameter82Name Parameter name * @param string $parameter82Value Parameter value * @param string $parameter83Name Parameter name * @param string $parameter83Value Parameter value * @param string $parameter84Name Parameter name * @param string $parameter84Value Parameter value * @param string $parameter85Name Parameter name * @param string $parameter85Value Parameter value * @param string $parameter86Name Parameter name * @param string $parameter86Value Parameter value * @param string $parameter87Name Parameter name * @param string $parameter87Value Parameter value * @param string $parameter88Name Parameter name * @param string $parameter88Value Parameter value * @param string $parameter89Name Parameter name * @param string $parameter89Value Parameter value * @param string $parameter90Name Parameter name * @param string $parameter90Value Parameter value * @param string $parameter91Name Parameter name * @param string $parameter91Value Parameter value * @param string $parameter92Name Parameter name * @param string $parameter92Value Parameter value * @param string $parameter93Name Parameter name * @param string $parameter93Value Parameter value * @param string $parameter94Name Parameter name * @param string $parameter94Value Parameter value * @param string $parameter95Name Parameter name * @param string $parameter95Value Parameter value * @param string $parameter96Name Parameter name * @param string $parameter96Value Parameter value * @param string $parameter97Name Parameter name * @param string $parameter97Value Parameter value * @param string $parameter98Name Parameter name * @param string $parameter98Value Parameter value * @param string $parameter99Name Parameter name * @param string $parameter99Value Parameter value * @return CreateSiprecOptions Options builder */ public static function create(string $name = Values::NONE, string $connectorName = Values::NONE, string $track = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $parameter1Name = Values::NONE, string $parameter1Value = Values::NONE, string $parameter2Name = Values::NONE, string $parameter2Value = Values::NONE, string $parameter3Name = Values::NONE, string $parameter3Value = Values::NONE, string $parameter4Name = Values::NONE, string $parameter4Value = Values::NONE, string $parameter5Name = Values::NONE, string $parameter5Value = Values::NONE, string $parameter6Name = Values::NONE, string $parameter6Value = Values::NONE, string $parameter7Name = Values::NONE, string $parameter7Value = Values::NONE, string $parameter8Name = Values::NONE, string $parameter8Value = Values::NONE, string $parameter9Name = Values::NONE, string $parameter9Value = Values::NONE, string $parameter10Name = Values::NONE, string $parameter10Value = Values::NONE, string $parameter11Name = Values::NONE, string $parameter11Value = Values::NONE, string $parameter12Name = Values::NONE, string $parameter12Value = Values::NONE, string $parameter13Name = Values::NONE, string $parameter13Value = Values::NONE, string $parameter14Name = Values::NONE, string $parameter14Value = Values::NONE, string $parameter15Name = Values::NONE, string $parameter15Value = Values::NONE, string $parameter16Name = Values::NONE, string $parameter16Value = Values::NONE, string $parameter17Name = Values::NONE, string $parameter17Value = Values::NONE, string $parameter18Name = Values::NONE, string $parameter18Value = Values::NONE, string $parameter19Name = Values::NONE, string $parameter19Value = Values::NONE, string $parameter20Name = Values::NONE, string $parameter20Value = Values::NONE, string $parameter21Name = Values::NONE, string $parameter21Value = Values::NONE, string $parameter22Name = Values::NONE, string $parameter22Value = Values::NONE, string $parameter23Name = Values::NONE, string $parameter23Value = Values::NONE, string $parameter24Name = Values::NONE, string $parameter24Value = Values::NONE, string $parameter25Name = Values::NONE, string $parameter25Value = Values::NONE, string $parameter26Name = Values::NONE, string $parameter26Value = Values::NONE, string $parameter27Name = Values::NONE, string $parameter27Value = Values::NONE, string $parameter28Name = Values::NONE, string $parameter28Value = Values::NONE, string $parameter29Name = Values::NONE, string $parameter29Value = Values::NONE, string $parameter30Name = Values::NONE, string $parameter30Value = Values::NONE, string $parameter31Name = Values::NONE, string $parameter31Value = Values::NONE, string $parameter32Name = Values::NONE, string $parameter32Value = Values::NONE, string $parameter33Name = Values::NONE, string $parameter33Value = Values::NONE, string $parameter34Name = Values::NONE, string $parameter34Value = Values::NONE, string $parameter35Name = Values::NONE, string $parameter35Value = Values::NONE, string $parameter36Name = Values::NONE, string $parameter36Value = Values::NONE, string $parameter37Name = Values::NONE, string $parameter37Value = Values::NONE, string $parameter38Name = Values::NONE, string $parameter38Value = Values::NONE, string $parameter39Name = Values::NONE, string $parameter39Value = Values::NONE, string $parameter40Name = Values::NONE, string $parameter40Value = Values::NONE, string $parameter41Name = Values::NONE, string $parameter41Value = Values::NONE, string $parameter42Name = Values::NONE, string $parameter42Value = Values::NONE, string $parameter43Name = Values::NONE, string $parameter43Value = Values::NONE, string $parameter44Name = Values::NONE, string $parameter44Value = Values::NONE, string $parameter45Name = Values::NONE, string $parameter45Value = Values::NONE, string $parameter46Name = Values::NONE, string $parameter46Value = Values::NONE, string $parameter47Name = Values::NONE, string $parameter47Value = Values::NONE, string $parameter48Name = Values::NONE, string $parameter48Value = Values::NONE, string $parameter49Name = Values::NONE, string $parameter49Value = Values::NONE, string $parameter50Name = Values::NONE, string $parameter50Value = Values::NONE, string $parameter51Name = Values::NONE, string $parameter51Value = Values::NONE, string $parameter52Name = Values::NONE, string $parameter52Value = Values::NONE, string $parameter53Name = Values::NONE, string $parameter53Value = Values::NONE, string $parameter54Name = Values::NONE, string $parameter54Value = Values::NONE, string $parameter55Name = Values::NONE, string $parameter55Value = Values::NONE, string $parameter56Name = Values::NONE, string $parameter56Value = Values::NONE, string $parameter57Name = Values::NONE, string $parameter57Value = Values::NONE, string $parameter58Name = Values::NONE, string $parameter58Value = Values::NONE, string $parameter59Name = Values::NONE, string $parameter59Value = Values::NONE, string $parameter60Name = Values::NONE, string $parameter60Value = Values::NONE, string $parameter61Name = Values::NONE, string $parameter61Value = Values::NONE, string $parameter62Name = Values::NONE, string $parameter62Value = Values::NONE, string $parameter63Name = Values::NONE, string $parameter63Value = Values::NONE, string $parameter64Name = Values::NONE, string $parameter64Value = Values::NONE, string $parameter65Name = Values::NONE, string $parameter65Value = Values::NONE, string $parameter66Name = Values::NONE, string $parameter66Value = Values::NONE, string $parameter67Name = Values::NONE, string $parameter67Value = Values::NONE, string $parameter68Name = Values::NONE, string $parameter68Value = Values::NONE, string $parameter69Name = Values::NONE, string $parameter69Value = Values::NONE, string $parameter70Name = Values::NONE, string $parameter70Value = Values::NONE, string $parameter71Name = Values::NONE, string $parameter71Value = Values::NONE, string $parameter72Name = Values::NONE, string $parameter72Value = Values::NONE, string $parameter73Name = Values::NONE, string $parameter73Value = Values::NONE, string $parameter74Name = Values::NONE, string $parameter74Value = Values::NONE, string $parameter75Name = Values::NONE, string $parameter75Value = Values::NONE, string $parameter76Name = Values::NONE, string $parameter76Value = Values::NONE, string $parameter77Name = Values::NONE, string $parameter77Value = Values::NONE, string $parameter78Name = Values::NONE, string $parameter78Value = Values::NONE, string $parameter79Name = Values::NONE, string $parameter79Value = Values::NONE, string $parameter80Name = Values::NONE, string $parameter80Value = Values::NONE, string $parameter81Name = Values::NONE, string $parameter81Value = Values::NONE, string $parameter82Name = Values::NONE, string $parameter82Value = Values::NONE, string $parameter83Name = Values::NONE, string $parameter83Value = Values::NONE, string $parameter84Name = Values::NONE, string $parameter84Value = Values::NONE, string $parameter85Name = Values::NONE, string $parameter85Value = Values::NONE, string $parameter86Name = Values::NONE, string $parameter86Value = Values::NONE, string $parameter87Name = Values::NONE, string $parameter87Value = Values::NONE, string $parameter88Name = Values::NONE, string $parameter88Value = Values::NONE, string $parameter89Name = Values::NONE, string $parameter89Value = Values::NONE, string $parameter90Name = Values::NONE, string $parameter90Value = Values::NONE, string $parameter91Name = Values::NONE, string $parameter91Value = Values::NONE, string $parameter92Name = Values::NONE, string $parameter92Value = Values::NONE, string $parameter93Name = Values::NONE, string $parameter93Value = Values::NONE, string $parameter94Name = Values::NONE, string $parameter94Value = Values::NONE, string $parameter95Name = Values::NONE, string $parameter95Value = Values::NONE, string $parameter96Name = Values::NONE, string $parameter96Value = Values::NONE, string $parameter97Name = Values::NONE, string $parameter97Value = Values::NONE, string $parameter98Name = Values::NONE, string $parameter98Value = Values::NONE, string $parameter99Name = Values::NONE, string $parameter99Value = Values::NONE): CreateSiprecOptions { return new CreateSiprecOptions($name, $connectorName, $track, $statusCallback, $statusCallbackMethod, $parameter1Name, $parameter1Value, $parameter2Name, $parameter2Value, $parameter3Name, $parameter3Value, $parameter4Name, $parameter4Value, $parameter5Name, $parameter5Value, $parameter6Name, $parameter6Value, $parameter7Name, $parameter7Value, $parameter8Name, $parameter8Value, $parameter9Name, $parameter9Value, $parameter10Name, $parameter10Value, $parameter11Name, $parameter11Value, $parameter12Name, $parameter12Value, $parameter13Name, $parameter13Value, $parameter14Name, $parameter14Value, $parameter15Name, $parameter15Value, $parameter16Name, $parameter16Value, $parameter17Name, $parameter17Value, $parameter18Name, $parameter18Value, $parameter19Name, $parameter19Value, $parameter20Name, $parameter20Value, $parameter21Name, $parameter21Value, $parameter22Name, $parameter22Value, $parameter23Name, $parameter23Value, $parameter24Name, $parameter24Value, $parameter25Name, $parameter25Value, $parameter26Name, $parameter26Value, $parameter27Name, $parameter27Value, $parameter28Name, $parameter28Value, $parameter29Name, $parameter29Value, $parameter30Name, $parameter30Value, $parameter31Name, $parameter31Value, $parameter32Name, $parameter32Value, $parameter33Name, $parameter33Value, $parameter34Name, $parameter34Value, $parameter35Name, $parameter35Value, $parameter36Name, $parameter36Value, $parameter37Name, $parameter37Value, $parameter38Name, $parameter38Value, $parameter39Name, $parameter39Value, $parameter40Name, $parameter40Value, $parameter41Name, $parameter41Value, $parameter42Name, $parameter42Value, $parameter43Name, $parameter43Value, $parameter44Name, $parameter44Value, $parameter45Name, $parameter45Value, $parameter46Name, $parameter46Value, $parameter47Name, $parameter47Value, $parameter48Name, $parameter48Value, $parameter49Name, $parameter49Value, $parameter50Name, $parameter50Value, $parameter51Name, $parameter51Value, $parameter52Name, $parameter52Value, $parameter53Name, $parameter53Value, $parameter54Name, $parameter54Value, $parameter55Name, $parameter55Value, $parameter56Name, $parameter56Value, $parameter57Name, $parameter57Value, $parameter58Name, $parameter58Value, $parameter59Name, $parameter59Value, $parameter60Name, $parameter60Value, $parameter61Name, $parameter61Value, $parameter62Name, $parameter62Value, $parameter63Name, $parameter63Value, $parameter64Name, $parameter64Value, $parameter65Name, $parameter65Value, $parameter66Name, $parameter66Value, $parameter67Name, $parameter67Value, $parameter68Name, $parameter68Value, $parameter69Name, $parameter69Value, $parameter70Name, $parameter70Value, $parameter71Name, $parameter71Value, $parameter72Name, $parameter72Value, $parameter73Name, $parameter73Value, $parameter74Name, $parameter74Value, $parameter75Name, $parameter75Value, $parameter76Name, $parameter76Value, $parameter77Name, $parameter77Value, $parameter78Name, $parameter78Value, $parameter79Name, $parameter79Value, $parameter80Name, $parameter80Value, $parameter81Name, $parameter81Value, $parameter82Name, $parameter82Value, $parameter83Name, $parameter83Value, $parameter84Name, $parameter84Value, $parameter85Name, $parameter85Value, $parameter86Name, $parameter86Value, $parameter87Name, $parameter87Value, $parameter88Name, $parameter88Value, $parameter89Name, $parameter89Value, $parameter90Name, $parameter90Value, $parameter91Name, $parameter91Value, $parameter92Name, $parameter92Value, $parameter93Name, $parameter93Value, $parameter94Name, $parameter94Value, $parameter95Name, $parameter95Value, $parameter96Name, $parameter96Value, $parameter97Name, $parameter97Value, $parameter98Name, $parameter98Value, $parameter99Name, $parameter99Value); } } class CreateSiprecOptions extends Options { /** * @param string $name The name of this resource * @param string $connectorName Unique name used when configuring the connector * via Marketplace Add-on. * @param string $track One of `inbound_track`, `outbound_track`, `both_tracks`. * @param string $statusCallback Absolute URL of the status callback. * @param string $statusCallbackMethod The http method for the status_callback. * @param string $parameter1Name Parameter name * @param string $parameter1Value Parameter value * @param string $parameter2Name Parameter name * @param string $parameter2Value Parameter value * @param string $parameter3Name Parameter name * @param string $parameter3Value Parameter value * @param string $parameter4Name Parameter name * @param string $parameter4Value Parameter value * @param string $parameter5Name Parameter name * @param string $parameter5Value Parameter value * @param string $parameter6Name Parameter name * @param string $parameter6Value Parameter value * @param string $parameter7Name Parameter name * @param string $parameter7Value Parameter value * @param string $parameter8Name Parameter name * @param string $parameter8Value Parameter value * @param string $parameter9Name Parameter name * @param string $parameter9Value Parameter value * @param string $parameter10Name Parameter name * @param string $parameter10Value Parameter value * @param string $parameter11Name Parameter name * @param string $parameter11Value Parameter value * @param string $parameter12Name Parameter name * @param string $parameter12Value Parameter value * @param string $parameter13Name Parameter name * @param string $parameter13Value Parameter value * @param string $parameter14Name Parameter name * @param string $parameter14Value Parameter value * @param string $parameter15Name Parameter name * @param string $parameter15Value Parameter value * @param string $parameter16Name Parameter name * @param string $parameter16Value Parameter value * @param string $parameter17Name Parameter name * @param string $parameter17Value Parameter value * @param string $parameter18Name Parameter name * @param string $parameter18Value Parameter value * @param string $parameter19Name Parameter name * @param string $parameter19Value Parameter value * @param string $parameter20Name Parameter name * @param string $parameter20Value Parameter value * @param string $parameter21Name Parameter name * @param string $parameter21Value Parameter value * @param string $parameter22Name Parameter name * @param string $parameter22Value Parameter value * @param string $parameter23Name Parameter name * @param string $parameter23Value Parameter value * @param string $parameter24Name Parameter name * @param string $parameter24Value Parameter value * @param string $parameter25Name Parameter name * @param string $parameter25Value Parameter value * @param string $parameter26Name Parameter name * @param string $parameter26Value Parameter value * @param string $parameter27Name Parameter name * @param string $parameter27Value Parameter value * @param string $parameter28Name Parameter name * @param string $parameter28Value Parameter value * @param string $parameter29Name Parameter name * @param string $parameter29Value Parameter value * @param string $parameter30Name Parameter name * @param string $parameter30Value Parameter value * @param string $parameter31Name Parameter name * @param string $parameter31Value Parameter value * @param string $parameter32Name Parameter name * @param string $parameter32Value Parameter value * @param string $parameter33Name Parameter name * @param string $parameter33Value Parameter value * @param string $parameter34Name Parameter name * @param string $parameter34Value Parameter value * @param string $parameter35Name Parameter name * @param string $parameter35Value Parameter value * @param string $parameter36Name Parameter name * @param string $parameter36Value Parameter value * @param string $parameter37Name Parameter name * @param string $parameter37Value Parameter value * @param string $parameter38Name Parameter name * @param string $parameter38Value Parameter value * @param string $parameter39Name Parameter name * @param string $parameter39Value Parameter value * @param string $parameter40Name Parameter name * @param string $parameter40Value Parameter value * @param string $parameter41Name Parameter name * @param string $parameter41Value Parameter value * @param string $parameter42Name Parameter name * @param string $parameter42Value Parameter value * @param string $parameter43Name Parameter name * @param string $parameter43Value Parameter value * @param string $parameter44Name Parameter name * @param string $parameter44Value Parameter value * @param string $parameter45Name Parameter name * @param string $parameter45Value Parameter value * @param string $parameter46Name Parameter name * @param string $parameter46Value Parameter value * @param string $parameter47Name Parameter name * @param string $parameter47Value Parameter value * @param string $parameter48Name Parameter name * @param string $parameter48Value Parameter value * @param string $parameter49Name Parameter name * @param string $parameter49Value Parameter value * @param string $parameter50Name Parameter name * @param string $parameter50Value Parameter value * @param string $parameter51Name Parameter name * @param string $parameter51Value Parameter value * @param string $parameter52Name Parameter name * @param string $parameter52Value Parameter value * @param string $parameter53Name Parameter name * @param string $parameter53Value Parameter value * @param string $parameter54Name Parameter name * @param string $parameter54Value Parameter value * @param string $parameter55Name Parameter name * @param string $parameter55Value Parameter value * @param string $parameter56Name Parameter name * @param string $parameter56Value Parameter value * @param string $parameter57Name Parameter name * @param string $parameter57Value Parameter value * @param string $parameter58Name Parameter name * @param string $parameter58Value Parameter value * @param string $parameter59Name Parameter name * @param string $parameter59Value Parameter value * @param string $parameter60Name Parameter name * @param string $parameter60Value Parameter value * @param string $parameter61Name Parameter name * @param string $parameter61Value Parameter value * @param string $parameter62Name Parameter name * @param string $parameter62Value Parameter value * @param string $parameter63Name Parameter name * @param string $parameter63Value Parameter value * @param string $parameter64Name Parameter name * @param string $parameter64Value Parameter value * @param string $parameter65Name Parameter name * @param string $parameter65Value Parameter value * @param string $parameter66Name Parameter name * @param string $parameter66Value Parameter value * @param string $parameter67Name Parameter name * @param string $parameter67Value Parameter value * @param string $parameter68Name Parameter name * @param string $parameter68Value Parameter value * @param string $parameter69Name Parameter name * @param string $parameter69Value Parameter value * @param string $parameter70Name Parameter name * @param string $parameter70Value Parameter value * @param string $parameter71Name Parameter name * @param string $parameter71Value Parameter value * @param string $parameter72Name Parameter name * @param string $parameter72Value Parameter value * @param string $parameter73Name Parameter name * @param string $parameter73Value Parameter value * @param string $parameter74Name Parameter name * @param string $parameter74Value Parameter value * @param string $parameter75Name Parameter name * @param string $parameter75Value Parameter value * @param string $parameter76Name Parameter name * @param string $parameter76Value Parameter value * @param string $parameter77Name Parameter name * @param string $parameter77Value Parameter value * @param string $parameter78Name Parameter name * @param string $parameter78Value Parameter value * @param string $parameter79Name Parameter name * @param string $parameter79Value Parameter value * @param string $parameter80Name Parameter name * @param string $parameter80Value Parameter value * @param string $parameter81Name Parameter name * @param string $parameter81Value Parameter value * @param string $parameter82Name Parameter name * @param string $parameter82Value Parameter value * @param string $parameter83Name Parameter name * @param string $parameter83Value Parameter value * @param string $parameter84Name Parameter name * @param string $parameter84Value Parameter value * @param string $parameter85Name Parameter name * @param string $parameter85Value Parameter value * @param string $parameter86Name Parameter name * @param string $parameter86Value Parameter value * @param string $parameter87Name Parameter name * @param string $parameter87Value Parameter value * @param string $parameter88Name Parameter name * @param string $parameter88Value Parameter value * @param string $parameter89Name Parameter name * @param string $parameter89Value Parameter value * @param string $parameter90Name Parameter name * @param string $parameter90Value Parameter value * @param string $parameter91Name Parameter name * @param string $parameter91Value Parameter value * @param string $parameter92Name Parameter name * @param string $parameter92Value Parameter value * @param string $parameter93Name Parameter name * @param string $parameter93Value Parameter value * @param string $parameter94Name Parameter name * @param string $parameter94Value Parameter value * @param string $parameter95Name Parameter name * @param string $parameter95Value Parameter value * @param string $parameter96Name Parameter name * @param string $parameter96Value Parameter value * @param string $parameter97Name Parameter name * @param string $parameter97Value Parameter value * @param string $parameter98Name Parameter name * @param string $parameter98Value Parameter value * @param string $parameter99Name Parameter name * @param string $parameter99Value Parameter value */ public function __construct(string $name = Values::NONE, string $connectorName = Values::NONE, string $track = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $parameter1Name = Values::NONE, string $parameter1Value = Values::NONE, string $parameter2Name = Values::NONE, string $parameter2Value = Values::NONE, string $parameter3Name = Values::NONE, string $parameter3Value = Values::NONE, string $parameter4Name = Values::NONE, string $parameter4Value = Values::NONE, string $parameter5Name = Values::NONE, string $parameter5Value = Values::NONE, string $parameter6Name = Values::NONE, string $parameter6Value = Values::NONE, string $parameter7Name = Values::NONE, string $parameter7Value = Values::NONE, string $parameter8Name = Values::NONE, string $parameter8Value = Values::NONE, string $parameter9Name = Values::NONE, string $parameter9Value = Values::NONE, string $parameter10Name = Values::NONE, string $parameter10Value = Values::NONE, string $parameter11Name = Values::NONE, string $parameter11Value = Values::NONE, string $parameter12Name = Values::NONE, string $parameter12Value = Values::NONE, string $parameter13Name = Values::NONE, string $parameter13Value = Values::NONE, string $parameter14Name = Values::NONE, string $parameter14Value = Values::NONE, string $parameter15Name = Values::NONE, string $parameter15Value = Values::NONE, string $parameter16Name = Values::NONE, string $parameter16Value = Values::NONE, string $parameter17Name = Values::NONE, string $parameter17Value = Values::NONE, string $parameter18Name = Values::NONE, string $parameter18Value = Values::NONE, string $parameter19Name = Values::NONE, string $parameter19Value = Values::NONE, string $parameter20Name = Values::NONE, string $parameter20Value = Values::NONE, string $parameter21Name = Values::NONE, string $parameter21Value = Values::NONE, string $parameter22Name = Values::NONE, string $parameter22Value = Values::NONE, string $parameter23Name = Values::NONE, string $parameter23Value = Values::NONE, string $parameter24Name = Values::NONE, string $parameter24Value = Values::NONE, string $parameter25Name = Values::NONE, string $parameter25Value = Values::NONE, string $parameter26Name = Values::NONE, string $parameter26Value = Values::NONE, string $parameter27Name = Values::NONE, string $parameter27Value = Values::NONE, string $parameter28Name = Values::NONE, string $parameter28Value = Values::NONE, string $parameter29Name = Values::NONE, string $parameter29Value = Values::NONE, string $parameter30Name = Values::NONE, string $parameter30Value = Values::NONE, string $parameter31Name = Values::NONE, string $parameter31Value = Values::NONE, string $parameter32Name = Values::NONE, string $parameter32Value = Values::NONE, string $parameter33Name = Values::NONE, string $parameter33Value = Values::NONE, string $parameter34Name = Values::NONE, string $parameter34Value = Values::NONE, string $parameter35Name = Values::NONE, string $parameter35Value = Values::NONE, string $parameter36Name = Values::NONE, string $parameter36Value = Values::NONE, string $parameter37Name = Values::NONE, string $parameter37Value = Values::NONE, string $parameter38Name = Values::NONE, string $parameter38Value = Values::NONE, string $parameter39Name = Values::NONE, string $parameter39Value = Values::NONE, string $parameter40Name = Values::NONE, string $parameter40Value = Values::NONE, string $parameter41Name = Values::NONE, string $parameter41Value = Values::NONE, string $parameter42Name = Values::NONE, string $parameter42Value = Values::NONE, string $parameter43Name = Values::NONE, string $parameter43Value = Values::NONE, string $parameter44Name = Values::NONE, string $parameter44Value = Values::NONE, string $parameter45Name = Values::NONE, string $parameter45Value = Values::NONE, string $parameter46Name = Values::NONE, string $parameter46Value = Values::NONE, string $parameter47Name = Values::NONE, string $parameter47Value = Values::NONE, string $parameter48Name = Values::NONE, string $parameter48Value = Values::NONE, string $parameter49Name = Values::NONE, string $parameter49Value = Values::NONE, string $parameter50Name = Values::NONE, string $parameter50Value = Values::NONE, string $parameter51Name = Values::NONE, string $parameter51Value = Values::NONE, string $parameter52Name = Values::NONE, string $parameter52Value = Values::NONE, string $parameter53Name = Values::NONE, string $parameter53Value = Values::NONE, string $parameter54Name = Values::NONE, string $parameter54Value = Values::NONE, string $parameter55Name = Values::NONE, string $parameter55Value = Values::NONE, string $parameter56Name = Values::NONE, string $parameter56Value = Values::NONE, string $parameter57Name = Values::NONE, string $parameter57Value = Values::NONE, string $parameter58Name = Values::NONE, string $parameter58Value = Values::NONE, string $parameter59Name = Values::NONE, string $parameter59Value = Values::NONE, string $parameter60Name = Values::NONE, string $parameter60Value = Values::NONE, string $parameter61Name = Values::NONE, string $parameter61Value = Values::NONE, string $parameter62Name = Values::NONE, string $parameter62Value = Values::NONE, string $parameter63Name = Values::NONE, string $parameter63Value = Values::NONE, string $parameter64Name = Values::NONE, string $parameter64Value = Values::NONE, string $parameter65Name = Values::NONE, string $parameter65Value = Values::NONE, string $parameter66Name = Values::NONE, string $parameter66Value = Values::NONE, string $parameter67Name = Values::NONE, string $parameter67Value = Values::NONE, string $parameter68Name = Values::NONE, string $parameter68Value = Values::NONE, string $parameter69Name = Values::NONE, string $parameter69Value = Values::NONE, string $parameter70Name = Values::NONE, string $parameter70Value = Values::NONE, string $parameter71Name = Values::NONE, string $parameter71Value = Values::NONE, string $parameter72Name = Values::NONE, string $parameter72Value = Values::NONE, string $parameter73Name = Values::NONE, string $parameter73Value = Values::NONE, string $parameter74Name = Values::NONE, string $parameter74Value = Values::NONE, string $parameter75Name = Values::NONE, string $parameter75Value = Values::NONE, string $parameter76Name = Values::NONE, string $parameter76Value = Values::NONE, string $parameter77Name = Values::NONE, string $parameter77Value = Values::NONE, string $parameter78Name = Values::NONE, string $parameter78Value = Values::NONE, string $parameter79Name = Values::NONE, string $parameter79Value = Values::NONE, string $parameter80Name = Values::NONE, string $parameter80Value = Values::NONE, string $parameter81Name = Values::NONE, string $parameter81Value = Values::NONE, string $parameter82Name = Values::NONE, string $parameter82Value = Values::NONE, string $parameter83Name = Values::NONE, string $parameter83Value = Values::NONE, string $parameter84Name = Values::NONE, string $parameter84Value = Values::NONE, string $parameter85Name = Values::NONE, string $parameter85Value = Values::NONE, string $parameter86Name = Values::NONE, string $parameter86Value = Values::NONE, string $parameter87Name = Values::NONE, string $parameter87Value = Values::NONE, string $parameter88Name = Values::NONE, string $parameter88Value = Values::NONE, string $parameter89Name = Values::NONE, string $parameter89Value = Values::NONE, string $parameter90Name = Values::NONE, string $parameter90Value = Values::NONE, string $parameter91Name = Values::NONE, string $parameter91Value = Values::NONE, string $parameter92Name = Values::NONE, string $parameter92Value = Values::NONE, string $parameter93Name = Values::NONE, string $parameter93Value = Values::NONE, string $parameter94Name = Values::NONE, string $parameter94Value = Values::NONE, string $parameter95Name = Values::NONE, string $parameter95Value = Values::NONE, string $parameter96Name = Values::NONE, string $parameter96Value = Values::NONE, string $parameter97Name = Values::NONE, string $parameter97Value = Values::NONE, string $parameter98Name = Values::NONE, string $parameter98Value = Values::NONE, string $parameter99Name = Values::NONE, string $parameter99Value = Values::NONE) { $this->options['name'] = $name; $this->options['connectorName'] = $connectorName; $this->options['track'] = $track; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['parameter1Name'] = $parameter1Name; $this->options['parameter1Value'] = $parameter1Value; $this->options['parameter2Name'] = $parameter2Name; $this->options['parameter2Value'] = $parameter2Value; $this->options['parameter3Name'] = $parameter3Name; $this->options['parameter3Value'] = $parameter3Value; $this->options['parameter4Name'] = $parameter4Name; $this->options['parameter4Value'] = $parameter4Value; $this->options['parameter5Name'] = $parameter5Name; $this->options['parameter5Value'] = $parameter5Value; $this->options['parameter6Name'] = $parameter6Name; $this->options['parameter6Value'] = $parameter6Value; $this->options['parameter7Name'] = $parameter7Name; $this->options['parameter7Value'] = $parameter7Value; $this->options['parameter8Name'] = $parameter8Name; $this->options['parameter8Value'] = $parameter8Value; $this->options['parameter9Name'] = $parameter9Name; $this->options['parameter9Value'] = $parameter9Value; $this->options['parameter10Name'] = $parameter10Name; $this->options['parameter10Value'] = $parameter10Value; $this->options['parameter11Name'] = $parameter11Name; $this->options['parameter11Value'] = $parameter11Value; $this->options['parameter12Name'] = $parameter12Name; $this->options['parameter12Value'] = $parameter12Value; $this->options['parameter13Name'] = $parameter13Name; $this->options['parameter13Value'] = $parameter13Value; $this->options['parameter14Name'] = $parameter14Name; $this->options['parameter14Value'] = $parameter14Value; $this->options['parameter15Name'] = $parameter15Name; $this->options['parameter15Value'] = $parameter15Value; $this->options['parameter16Name'] = $parameter16Name; $this->options['parameter16Value'] = $parameter16Value; $this->options['parameter17Name'] = $parameter17Name; $this->options['parameter17Value'] = $parameter17Value; $this->options['parameter18Name'] = $parameter18Name; $this->options['parameter18Value'] = $parameter18Value; $this->options['parameter19Name'] = $parameter19Name; $this->options['parameter19Value'] = $parameter19Value; $this->options['parameter20Name'] = $parameter20Name; $this->options['parameter20Value'] = $parameter20Value; $this->options['parameter21Name'] = $parameter21Name; $this->options['parameter21Value'] = $parameter21Value; $this->options['parameter22Name'] = $parameter22Name; $this->options['parameter22Value'] = $parameter22Value; $this->options['parameter23Name'] = $parameter23Name; $this->options['parameter23Value'] = $parameter23Value; $this->options['parameter24Name'] = $parameter24Name; $this->options['parameter24Value'] = $parameter24Value; $this->options['parameter25Name'] = $parameter25Name; $this->options['parameter25Value'] = $parameter25Value; $this->options['parameter26Name'] = $parameter26Name; $this->options['parameter26Value'] = $parameter26Value; $this->options['parameter27Name'] = $parameter27Name; $this->options['parameter27Value'] = $parameter27Value; $this->options['parameter28Name'] = $parameter28Name; $this->options['parameter28Value'] = $parameter28Value; $this->options['parameter29Name'] = $parameter29Name; $this->options['parameter29Value'] = $parameter29Value; $this->options['parameter30Name'] = $parameter30Name; $this->options['parameter30Value'] = $parameter30Value; $this->options['parameter31Name'] = $parameter31Name; $this->options['parameter31Value'] = $parameter31Value; $this->options['parameter32Name'] = $parameter32Name; $this->options['parameter32Value'] = $parameter32Value; $this->options['parameter33Name'] = $parameter33Name; $this->options['parameter33Value'] = $parameter33Value; $this->options['parameter34Name'] = $parameter34Name; $this->options['parameter34Value'] = $parameter34Value; $this->options['parameter35Name'] = $parameter35Name; $this->options['parameter35Value'] = $parameter35Value; $this->options['parameter36Name'] = $parameter36Name; $this->options['parameter36Value'] = $parameter36Value; $this->options['parameter37Name'] = $parameter37Name; $this->options['parameter37Value'] = $parameter37Value; $this->options['parameter38Name'] = $parameter38Name; $this->options['parameter38Value'] = $parameter38Value; $this->options['parameter39Name'] = $parameter39Name; $this->options['parameter39Value'] = $parameter39Value; $this->options['parameter40Name'] = $parameter40Name; $this->options['parameter40Value'] = $parameter40Value; $this->options['parameter41Name'] = $parameter41Name; $this->options['parameter41Value'] = $parameter41Value; $this->options['parameter42Name'] = $parameter42Name; $this->options['parameter42Value'] = $parameter42Value; $this->options['parameter43Name'] = $parameter43Name; $this->options['parameter43Value'] = $parameter43Value; $this->options['parameter44Name'] = $parameter44Name; $this->options['parameter44Value'] = $parameter44Value; $this->options['parameter45Name'] = $parameter45Name; $this->options['parameter45Value'] = $parameter45Value; $this->options['parameter46Name'] = $parameter46Name; $this->options['parameter46Value'] = $parameter46Value; $this->options['parameter47Name'] = $parameter47Name; $this->options['parameter47Value'] = $parameter47Value; $this->options['parameter48Name'] = $parameter48Name; $this->options['parameter48Value'] = $parameter48Value; $this->options['parameter49Name'] = $parameter49Name; $this->options['parameter49Value'] = $parameter49Value; $this->options['parameter50Name'] = $parameter50Name; $this->options['parameter50Value'] = $parameter50Value; $this->options['parameter51Name'] = $parameter51Name; $this->options['parameter51Value'] = $parameter51Value; $this->options['parameter52Name'] = $parameter52Name; $this->options['parameter52Value'] = $parameter52Value; $this->options['parameter53Name'] = $parameter53Name; $this->options['parameter53Value'] = $parameter53Value; $this->options['parameter54Name'] = $parameter54Name; $this->options['parameter54Value'] = $parameter54Value; $this->options['parameter55Name'] = $parameter55Name; $this->options['parameter55Value'] = $parameter55Value; $this->options['parameter56Name'] = $parameter56Name; $this->options['parameter56Value'] = $parameter56Value; $this->options['parameter57Name'] = $parameter57Name; $this->options['parameter57Value'] = $parameter57Value; $this->options['parameter58Name'] = $parameter58Name; $this->options['parameter58Value'] = $parameter58Value; $this->options['parameter59Name'] = $parameter59Name; $this->options['parameter59Value'] = $parameter59Value; $this->options['parameter60Name'] = $parameter60Name; $this->options['parameter60Value'] = $parameter60Value; $this->options['parameter61Name'] = $parameter61Name; $this->options['parameter61Value'] = $parameter61Value; $this->options['parameter62Name'] = $parameter62Name; $this->options['parameter62Value'] = $parameter62Value; $this->options['parameter63Name'] = $parameter63Name; $this->options['parameter63Value'] = $parameter63Value; $this->options['parameter64Name'] = $parameter64Name; $this->options['parameter64Value'] = $parameter64Value; $this->options['parameter65Name'] = $parameter65Name; $this->options['parameter65Value'] = $parameter65Value; $this->options['parameter66Name'] = $parameter66Name; $this->options['parameter66Value'] = $parameter66Value; $this->options['parameter67Name'] = $parameter67Name; $this->options['parameter67Value'] = $parameter67Value; $this->options['parameter68Name'] = $parameter68Name; $this->options['parameter68Value'] = $parameter68Value; $this->options['parameter69Name'] = $parameter69Name; $this->options['parameter69Value'] = $parameter69Value; $this->options['parameter70Name'] = $parameter70Name; $this->options['parameter70Value'] = $parameter70Value; $this->options['parameter71Name'] = $parameter71Name; $this->options['parameter71Value'] = $parameter71Value; $this->options['parameter72Name'] = $parameter72Name; $this->options['parameter72Value'] = $parameter72Value; $this->options['parameter73Name'] = $parameter73Name; $this->options['parameter73Value'] = $parameter73Value; $this->options['parameter74Name'] = $parameter74Name; $this->options['parameter74Value'] = $parameter74Value; $this->options['parameter75Name'] = $parameter75Name; $this->options['parameter75Value'] = $parameter75Value; $this->options['parameter76Name'] = $parameter76Name; $this->options['parameter76Value'] = $parameter76Value; $this->options['parameter77Name'] = $parameter77Name; $this->options['parameter77Value'] = $parameter77Value; $this->options['parameter78Name'] = $parameter78Name; $this->options['parameter78Value'] = $parameter78Value; $this->options['parameter79Name'] = $parameter79Name; $this->options['parameter79Value'] = $parameter79Value; $this->options['parameter80Name'] = $parameter80Name; $this->options['parameter80Value'] = $parameter80Value; $this->options['parameter81Name'] = $parameter81Name; $this->options['parameter81Value'] = $parameter81Value; $this->options['parameter82Name'] = $parameter82Name; $this->options['parameter82Value'] = $parameter82Value; $this->options['parameter83Name'] = $parameter83Name; $this->options['parameter83Value'] = $parameter83Value; $this->options['parameter84Name'] = $parameter84Name; $this->options['parameter84Value'] = $parameter84Value; $this->options['parameter85Name'] = $parameter85Name; $this->options['parameter85Value'] = $parameter85Value; $this->options['parameter86Name'] = $parameter86Name; $this->options['parameter86Value'] = $parameter86Value; $this->options['parameter87Name'] = $parameter87Name; $this->options['parameter87Value'] = $parameter87Value; $this->options['parameter88Name'] = $parameter88Name; $this->options['parameter88Value'] = $parameter88Value; $this->options['parameter89Name'] = $parameter89Name; $this->options['parameter89Value'] = $parameter89Value; $this->options['parameter90Name'] = $parameter90Name; $this->options['parameter90Value'] = $parameter90Value; $this->options['parameter91Name'] = $parameter91Name; $this->options['parameter91Value'] = $parameter91Value; $this->options['parameter92Name'] = $parameter92Name; $this->options['parameter92Value'] = $parameter92Value; $this->options['parameter93Name'] = $parameter93Name; $this->options['parameter93Value'] = $parameter93Value; $this->options['parameter94Name'] = $parameter94Name; $this->options['parameter94Value'] = $parameter94Value; $this->options['parameter95Name'] = $parameter95Name; $this->options['parameter95Value'] = $parameter95Value; $this->options['parameter96Name'] = $parameter96Name; $this->options['parameter96Value'] = $parameter96Value; $this->options['parameter97Name'] = $parameter97Name; $this->options['parameter97Value'] = $parameter97Value; $this->options['parameter98Name'] = $parameter98Name; $this->options['parameter98Value'] = $parameter98Value; $this->options['parameter99Name'] = $parameter99Name; $this->options['parameter99Value'] = $parameter99Value; } /** * The user-specified name of this Siprec, if one was given when the Siprec was created. This may be used to stop the Siprec. * * @param string $name The name of this resource * @return $this Fluent Builder */ public function setName(string $name): self { $this->options['name'] = $name; return $this; } /** * Unique name used when configuring the connector via Marketplace Add-on. * * @param string $connectorName Unique name used when configuring the connector * via Marketplace Add-on. * @return $this Fluent Builder */ public function setConnectorName(string $connectorName): self { $this->options['connectorName'] = $connectorName; return $this; } /** * One of `inbound_track`, `outbound_track`, `both_tracks`. * * @param string $track One of `inbound_track`, `outbound_track`, `both_tracks`. * @return $this Fluent Builder */ public function setTrack(string $track): self { $this->options['track'] = $track; return $this; } /** * Absolute URL of the status callback. * * @param string $statusCallback Absolute URL of the status callback. * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The http method for the status_callback (one of GET, POST). * * @param string $statusCallbackMethod The http method for the status_callback. * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * Parameter name * * @param string $parameter1Name Parameter name * @return $this Fluent Builder */ public function setParameter1Name(string $parameter1Name): self { $this->options['parameter1Name'] = $parameter1Name; return $this; } /** * Parameter value * * @param string $parameter1Value Parameter value * @return $this Fluent Builder */ public function setParameter1Value(string $parameter1Value): self { $this->options['parameter1Value'] = $parameter1Value; return $this; } /** * Parameter name * * @param string $parameter2Name Parameter name * @return $this Fluent Builder */ public function setParameter2Name(string $parameter2Name): self { $this->options['parameter2Name'] = $parameter2Name; return $this; } /** * Parameter value * * @param string $parameter2Value Parameter value * @return $this Fluent Builder */ public function setParameter2Value(string $parameter2Value): self { $this->options['parameter2Value'] = $parameter2Value; return $this; } /** * Parameter name * * @param string $parameter3Name Parameter name * @return $this Fluent Builder */ public function setParameter3Name(string $parameter3Name): self { $this->options['parameter3Name'] = $parameter3Name; return $this; } /** * Parameter value * * @param string $parameter3Value Parameter value * @return $this Fluent Builder */ public function setParameter3Value(string $parameter3Value): self { $this->options['parameter3Value'] = $parameter3Value; return $this; } /** * Parameter name * * @param string $parameter4Name Parameter name * @return $this Fluent Builder */ public function setParameter4Name(string $parameter4Name): self { $this->options['parameter4Name'] = $parameter4Name; return $this; } /** * Parameter value * * @param string $parameter4Value Parameter value * @return $this Fluent Builder */ public function setParameter4Value(string $parameter4Value): self { $this->options['parameter4Value'] = $parameter4Value; return $this; } /** * Parameter name * * @param string $parameter5Name Parameter name * @return $this Fluent Builder */ public function setParameter5Name(string $parameter5Name): self { $this->options['parameter5Name'] = $parameter5Name; return $this; } /** * Parameter value * * @param string $parameter5Value Parameter value * @return $this Fluent Builder */ public function setParameter5Value(string $parameter5Value): self { $this->options['parameter5Value'] = $parameter5Value; return $this; } /** * Parameter name * * @param string $parameter6Name Parameter name * @return $this Fluent Builder */ public function setParameter6Name(string $parameter6Name): self { $this->options['parameter6Name'] = $parameter6Name; return $this; } /** * Parameter value * * @param string $parameter6Value Parameter value * @return $this Fluent Builder */ public function setParameter6Value(string $parameter6Value): self { $this->options['parameter6Value'] = $parameter6Value; return $this; } /** * Parameter name * * @param string $parameter7Name Parameter name * @return $this Fluent Builder */ public function setParameter7Name(string $parameter7Name): self { $this->options['parameter7Name'] = $parameter7Name; return $this; } /** * Parameter value * * @param string $parameter7Value Parameter value * @return $this Fluent Builder */ public function setParameter7Value(string $parameter7Value): self { $this->options['parameter7Value'] = $parameter7Value; return $this; } /** * Parameter name * * @param string $parameter8Name Parameter name * @return $this Fluent Builder */ public function setParameter8Name(string $parameter8Name): self { $this->options['parameter8Name'] = $parameter8Name; return $this; } /** * Parameter value * * @param string $parameter8Value Parameter value * @return $this Fluent Builder */ public function setParameter8Value(string $parameter8Value): self { $this->options['parameter8Value'] = $parameter8Value; return $this; } /** * Parameter name * * @param string $parameter9Name Parameter name * @return $this Fluent Builder */ public function setParameter9Name(string $parameter9Name): self { $this->options['parameter9Name'] = $parameter9Name; return $this; } /** * Parameter value * * @param string $parameter9Value Parameter value * @return $this Fluent Builder */ public function setParameter9Value(string $parameter9Value): self { $this->options['parameter9Value'] = $parameter9Value; return $this; } /** * Parameter name * * @param string $parameter10Name Parameter name * @return $this Fluent Builder */ public function setParameter10Name(string $parameter10Name): self { $this->options['parameter10Name'] = $parameter10Name; return $this; } /** * Parameter value * * @param string $parameter10Value Parameter value * @return $this Fluent Builder */ public function setParameter10Value(string $parameter10Value): self { $this->options['parameter10Value'] = $parameter10Value; return $this; } /** * Parameter name * * @param string $parameter11Name Parameter name * @return $this Fluent Builder */ public function setParameter11Name(string $parameter11Name): self { $this->options['parameter11Name'] = $parameter11Name; return $this; } /** * Parameter value * * @param string $parameter11Value Parameter value * @return $this Fluent Builder */ public function setParameter11Value(string $parameter11Value): self { $this->options['parameter11Value'] = $parameter11Value; return $this; } /** * Parameter name * * @param string $parameter12Name Parameter name * @return $this Fluent Builder */ public function setParameter12Name(string $parameter12Name): self { $this->options['parameter12Name'] = $parameter12Name; return $this; } /** * Parameter value * * @param string $parameter12Value Parameter value * @return $this Fluent Builder */ public function setParameter12Value(string $parameter12Value): self { $this->options['parameter12Value'] = $parameter12Value; return $this; } /** * Parameter name * * @param string $parameter13Name Parameter name * @return $this Fluent Builder */ public function setParameter13Name(string $parameter13Name): self { $this->options['parameter13Name'] = $parameter13Name; return $this; } /** * Parameter value * * @param string $parameter13Value Parameter value * @return $this Fluent Builder */ public function setParameter13Value(string $parameter13Value): self { $this->options['parameter13Value'] = $parameter13Value; return $this; } /** * Parameter name * * @param string $parameter14Name Parameter name * @return $this Fluent Builder */ public function setParameter14Name(string $parameter14Name): self { $this->options['parameter14Name'] = $parameter14Name; return $this; } /** * Parameter value * * @param string $parameter14Value Parameter value * @return $this Fluent Builder */ public function setParameter14Value(string $parameter14Value): self { $this->options['parameter14Value'] = $parameter14Value; return $this; } /** * Parameter name * * @param string $parameter15Name Parameter name * @return $this Fluent Builder */ public function setParameter15Name(string $parameter15Name): self { $this->options['parameter15Name'] = $parameter15Name; return $this; } /** * Parameter value * * @param string $parameter15Value Parameter value * @return $this Fluent Builder */ public function setParameter15Value(string $parameter15Value): self { $this->options['parameter15Value'] = $parameter15Value; return $this; } /** * Parameter name * * @param string $parameter16Name Parameter name * @return $this Fluent Builder */ public function setParameter16Name(string $parameter16Name): self { $this->options['parameter16Name'] = $parameter16Name; return $this; } /** * Parameter value * * @param string $parameter16Value Parameter value * @return $this Fluent Builder */ public function setParameter16Value(string $parameter16Value): self { $this->options['parameter16Value'] = $parameter16Value; return $this; } /** * Parameter name * * @param string $parameter17Name Parameter name * @return $this Fluent Builder */ public function setParameter17Name(string $parameter17Name): self { $this->options['parameter17Name'] = $parameter17Name; return $this; } /** * Parameter value * * @param string $parameter17Value Parameter value * @return $this Fluent Builder */ public function setParameter17Value(string $parameter17Value): self { $this->options['parameter17Value'] = $parameter17Value; return $this; } /** * Parameter name * * @param string $parameter18Name Parameter name * @return $this Fluent Builder */ public function setParameter18Name(string $parameter18Name): self { $this->options['parameter18Name'] = $parameter18Name; return $this; } /** * Parameter value * * @param string $parameter18Value Parameter value * @return $this Fluent Builder */ public function setParameter18Value(string $parameter18Value): self { $this->options['parameter18Value'] = $parameter18Value; return $this; } /** * Parameter name * * @param string $parameter19Name Parameter name * @return $this Fluent Builder */ public function setParameter19Name(string $parameter19Name): self { $this->options['parameter19Name'] = $parameter19Name; return $this; } /** * Parameter value * * @param string $parameter19Value Parameter value * @return $this Fluent Builder */ public function setParameter19Value(string $parameter19Value): self { $this->options['parameter19Value'] = $parameter19Value; return $this; } /** * Parameter name * * @param string $parameter20Name Parameter name * @return $this Fluent Builder */ public function setParameter20Name(string $parameter20Name): self { $this->options['parameter20Name'] = $parameter20Name; return $this; } /** * Parameter value * * @param string $parameter20Value Parameter value * @return $this Fluent Builder */ public function setParameter20Value(string $parameter20Value): self { $this->options['parameter20Value'] = $parameter20Value; return $this; } /** * Parameter name * * @param string $parameter21Name Parameter name * @return $this Fluent Builder */ public function setParameter21Name(string $parameter21Name): self { $this->options['parameter21Name'] = $parameter21Name; return $this; } /** * Parameter value * * @param string $parameter21Value Parameter value * @return $this Fluent Builder */ public function setParameter21Value(string $parameter21Value): self { $this->options['parameter21Value'] = $parameter21Value; return $this; } /** * Parameter name * * @param string $parameter22Name Parameter name * @return $this Fluent Builder */ public function setParameter22Name(string $parameter22Name): self { $this->options['parameter22Name'] = $parameter22Name; return $this; } /** * Parameter value * * @param string $parameter22Value Parameter value * @return $this Fluent Builder */ public function setParameter22Value(string $parameter22Value): self { $this->options['parameter22Value'] = $parameter22Value; return $this; } /** * Parameter name * * @param string $parameter23Name Parameter name * @return $this Fluent Builder */ public function setParameter23Name(string $parameter23Name): self { $this->options['parameter23Name'] = $parameter23Name; return $this; } /** * Parameter value * * @param string $parameter23Value Parameter value * @return $this Fluent Builder */ public function setParameter23Value(string $parameter23Value): self { $this->options['parameter23Value'] = $parameter23Value; return $this; } /** * Parameter name * * @param string $parameter24Name Parameter name * @return $this Fluent Builder */ public function setParameter24Name(string $parameter24Name): self { $this->options['parameter24Name'] = $parameter24Name; return $this; } /** * Parameter value * * @param string $parameter24Value Parameter value * @return $this Fluent Builder */ public function setParameter24Value(string $parameter24Value): self { $this->options['parameter24Value'] = $parameter24Value; return $this; } /** * Parameter name * * @param string $parameter25Name Parameter name * @return $this Fluent Builder */ public function setParameter25Name(string $parameter25Name): self { $this->options['parameter25Name'] = $parameter25Name; return $this; } /** * Parameter value * * @param string $parameter25Value Parameter value * @return $this Fluent Builder */ public function setParameter25Value(string $parameter25Value): self { $this->options['parameter25Value'] = $parameter25Value; return $this; } /** * Parameter name * * @param string $parameter26Name Parameter name * @return $this Fluent Builder */ public function setParameter26Name(string $parameter26Name): self { $this->options['parameter26Name'] = $parameter26Name; return $this; } /** * Parameter value * * @param string $parameter26Value Parameter value * @return $this Fluent Builder */ public function setParameter26Value(string $parameter26Value): self { $this->options['parameter26Value'] = $parameter26Value; return $this; } /** * Parameter name * * @param string $parameter27Name Parameter name * @return $this Fluent Builder */ public function setParameter27Name(string $parameter27Name): self { $this->options['parameter27Name'] = $parameter27Name; return $this; } /** * Parameter value * * @param string $parameter27Value Parameter value * @return $this Fluent Builder */ public function setParameter27Value(string $parameter27Value): self { $this->options['parameter27Value'] = $parameter27Value; return $this; } /** * Parameter name * * @param string $parameter28Name Parameter name * @return $this Fluent Builder */ public function setParameter28Name(string $parameter28Name): self { $this->options['parameter28Name'] = $parameter28Name; return $this; } /** * Parameter value * * @param string $parameter28Value Parameter value * @return $this Fluent Builder */ public function setParameter28Value(string $parameter28Value): self { $this->options['parameter28Value'] = $parameter28Value; return $this; } /** * Parameter name * * @param string $parameter29Name Parameter name * @return $this Fluent Builder */ public function setParameter29Name(string $parameter29Name): self { $this->options['parameter29Name'] = $parameter29Name; return $this; } /** * Parameter value * * @param string $parameter29Value Parameter value * @return $this Fluent Builder */ public function setParameter29Value(string $parameter29Value): self { $this->options['parameter29Value'] = $parameter29Value; return $this; } /** * Parameter name * * @param string $parameter30Name Parameter name * @return $this Fluent Builder */ public function setParameter30Name(string $parameter30Name): self { $this->options['parameter30Name'] = $parameter30Name; return $this; } /** * Parameter value * * @param string $parameter30Value Parameter value * @return $this Fluent Builder */ public function setParameter30Value(string $parameter30Value): self { $this->options['parameter30Value'] = $parameter30Value; return $this; } /** * Parameter name * * @param string $parameter31Name Parameter name * @return $this Fluent Builder */ public function setParameter31Name(string $parameter31Name): self { $this->options['parameter31Name'] = $parameter31Name; return $this; } /** * Parameter value * * @param string $parameter31Value Parameter value * @return $this Fluent Builder */ public function setParameter31Value(string $parameter31Value): self { $this->options['parameter31Value'] = $parameter31Value; return $this; } /** * Parameter name * * @param string $parameter32Name Parameter name * @return $this Fluent Builder */ public function setParameter32Name(string $parameter32Name): self { $this->options['parameter32Name'] = $parameter32Name; return $this; } /** * Parameter value * * @param string $parameter32Value Parameter value * @return $this Fluent Builder */ public function setParameter32Value(string $parameter32Value): self { $this->options['parameter32Value'] = $parameter32Value; return $this; } /** * Parameter name * * @param string $parameter33Name Parameter name * @return $this Fluent Builder */ public function setParameter33Name(string $parameter33Name): self { $this->options['parameter33Name'] = $parameter33Name; return $this; } /** * Parameter value * * @param string $parameter33Value Parameter value * @return $this Fluent Builder */ public function setParameter33Value(string $parameter33Value): self { $this->options['parameter33Value'] = $parameter33Value; return $this; } /** * Parameter name * * @param string $parameter34Name Parameter name * @return $this Fluent Builder */ public function setParameter34Name(string $parameter34Name): self { $this->options['parameter34Name'] = $parameter34Name; return $this; } /** * Parameter value * * @param string $parameter34Value Parameter value * @return $this Fluent Builder */ public function setParameter34Value(string $parameter34Value): self { $this->options['parameter34Value'] = $parameter34Value; return $this; } /** * Parameter name * * @param string $parameter35Name Parameter name * @return $this Fluent Builder */ public function setParameter35Name(string $parameter35Name): self { $this->options['parameter35Name'] = $parameter35Name; return $this; } /** * Parameter value * * @param string $parameter35Value Parameter value * @return $this Fluent Builder */ public function setParameter35Value(string $parameter35Value): self { $this->options['parameter35Value'] = $parameter35Value; return $this; } /** * Parameter name * * @param string $parameter36Name Parameter name * @return $this Fluent Builder */ public function setParameter36Name(string $parameter36Name): self { $this->options['parameter36Name'] = $parameter36Name; return $this; } /** * Parameter value * * @param string $parameter36Value Parameter value * @return $this Fluent Builder */ public function setParameter36Value(string $parameter36Value): self { $this->options['parameter36Value'] = $parameter36Value; return $this; } /** * Parameter name * * @param string $parameter37Name Parameter name * @return $this Fluent Builder */ public function setParameter37Name(string $parameter37Name): self { $this->options['parameter37Name'] = $parameter37Name; return $this; } /** * Parameter value * * @param string $parameter37Value Parameter value * @return $this Fluent Builder */ public function setParameter37Value(string $parameter37Value): self { $this->options['parameter37Value'] = $parameter37Value; return $this; } /** * Parameter name * * @param string $parameter38Name Parameter name * @return $this Fluent Builder */ public function setParameter38Name(string $parameter38Name): self { $this->options['parameter38Name'] = $parameter38Name; return $this; } /** * Parameter value * * @param string $parameter38Value Parameter value * @return $this Fluent Builder */ public function setParameter38Value(string $parameter38Value): self { $this->options['parameter38Value'] = $parameter38Value; return $this; } /** * Parameter name * * @param string $parameter39Name Parameter name * @return $this Fluent Builder */ public function setParameter39Name(string $parameter39Name): self { $this->options['parameter39Name'] = $parameter39Name; return $this; } /** * Parameter value * * @param string $parameter39Value Parameter value * @return $this Fluent Builder */ public function setParameter39Value(string $parameter39Value): self { $this->options['parameter39Value'] = $parameter39Value; return $this; } /** * Parameter name * * @param string $parameter40Name Parameter name * @return $this Fluent Builder */ public function setParameter40Name(string $parameter40Name): self { $this->options['parameter40Name'] = $parameter40Name; return $this; } /** * Parameter value * * @param string $parameter40Value Parameter value * @return $this Fluent Builder */ public function setParameter40Value(string $parameter40Value): self { $this->options['parameter40Value'] = $parameter40Value; return $this; } /** * Parameter name * * @param string $parameter41Name Parameter name * @return $this Fluent Builder */ public function setParameter41Name(string $parameter41Name): self { $this->options['parameter41Name'] = $parameter41Name; return $this; } /** * Parameter value * * @param string $parameter41Value Parameter value * @return $this Fluent Builder */ public function setParameter41Value(string $parameter41Value): self { $this->options['parameter41Value'] = $parameter41Value; return $this; } /** * Parameter name * * @param string $parameter42Name Parameter name * @return $this Fluent Builder */ public function setParameter42Name(string $parameter42Name): self { $this->options['parameter42Name'] = $parameter42Name; return $this; } /** * Parameter value * * @param string $parameter42Value Parameter value * @return $this Fluent Builder */ public function setParameter42Value(string $parameter42Value): self { $this->options['parameter42Value'] = $parameter42Value; return $this; } /** * Parameter name * * @param string $parameter43Name Parameter name * @return $this Fluent Builder */ public function setParameter43Name(string $parameter43Name): self { $this->options['parameter43Name'] = $parameter43Name; return $this; } /** * Parameter value * * @param string $parameter43Value Parameter value * @return $this Fluent Builder */ public function setParameter43Value(string $parameter43Value): self { $this->options['parameter43Value'] = $parameter43Value; return $this; } /** * Parameter name * * @param string $parameter44Name Parameter name * @return $this Fluent Builder */ public function setParameter44Name(string $parameter44Name): self { $this->options['parameter44Name'] = $parameter44Name; return $this; } /** * Parameter value * * @param string $parameter44Value Parameter value * @return $this Fluent Builder */ public function setParameter44Value(string $parameter44Value): self { $this->options['parameter44Value'] = $parameter44Value; return $this; } /** * Parameter name * * @param string $parameter45Name Parameter name * @return $this Fluent Builder */ public function setParameter45Name(string $parameter45Name): self { $this->options['parameter45Name'] = $parameter45Name; return $this; } /** * Parameter value * * @param string $parameter45Value Parameter value * @return $this Fluent Builder */ public function setParameter45Value(string $parameter45Value): self { $this->options['parameter45Value'] = $parameter45Value; return $this; } /** * Parameter name * * @param string $parameter46Name Parameter name * @return $this Fluent Builder */ public function setParameter46Name(string $parameter46Name): self { $this->options['parameter46Name'] = $parameter46Name; return $this; } /** * Parameter value * * @param string $parameter46Value Parameter value * @return $this Fluent Builder */ public function setParameter46Value(string $parameter46Value): self { $this->options['parameter46Value'] = $parameter46Value; return $this; } /** * Parameter name * * @param string $parameter47Name Parameter name * @return $this Fluent Builder */ public function setParameter47Name(string $parameter47Name): self { $this->options['parameter47Name'] = $parameter47Name; return $this; } /** * Parameter value * * @param string $parameter47Value Parameter value * @return $this Fluent Builder */ public function setParameter47Value(string $parameter47Value): self { $this->options['parameter47Value'] = $parameter47Value; return $this; } /** * Parameter name * * @param string $parameter48Name Parameter name * @return $this Fluent Builder */ public function setParameter48Name(string $parameter48Name): self { $this->options['parameter48Name'] = $parameter48Name; return $this; } /** * Parameter value * * @param string $parameter48Value Parameter value * @return $this Fluent Builder */ public function setParameter48Value(string $parameter48Value): self { $this->options['parameter48Value'] = $parameter48Value; return $this; } /** * Parameter name * * @param string $parameter49Name Parameter name * @return $this Fluent Builder */ public function setParameter49Name(string $parameter49Name): self { $this->options['parameter49Name'] = $parameter49Name; return $this; } /** * Parameter value * * @param string $parameter49Value Parameter value * @return $this Fluent Builder */ public function setParameter49Value(string $parameter49Value): self { $this->options['parameter49Value'] = $parameter49Value; return $this; } /** * Parameter name * * @param string $parameter50Name Parameter name * @return $this Fluent Builder */ public function setParameter50Name(string $parameter50Name): self { $this->options['parameter50Name'] = $parameter50Name; return $this; } /** * Parameter value * * @param string $parameter50Value Parameter value * @return $this Fluent Builder */ public function setParameter50Value(string $parameter50Value): self { $this->options['parameter50Value'] = $parameter50Value; return $this; } /** * Parameter name * * @param string $parameter51Name Parameter name * @return $this Fluent Builder */ public function setParameter51Name(string $parameter51Name): self { $this->options['parameter51Name'] = $parameter51Name; return $this; } /** * Parameter value * * @param string $parameter51Value Parameter value * @return $this Fluent Builder */ public function setParameter51Value(string $parameter51Value): self { $this->options['parameter51Value'] = $parameter51Value; return $this; } /** * Parameter name * * @param string $parameter52Name Parameter name * @return $this Fluent Builder */ public function setParameter52Name(string $parameter52Name): self { $this->options['parameter52Name'] = $parameter52Name; return $this; } /** * Parameter value * * @param string $parameter52Value Parameter value * @return $this Fluent Builder */ public function setParameter52Value(string $parameter52Value): self { $this->options['parameter52Value'] = $parameter52Value; return $this; } /** * Parameter name * * @param string $parameter53Name Parameter name * @return $this Fluent Builder */ public function setParameter53Name(string $parameter53Name): self { $this->options['parameter53Name'] = $parameter53Name; return $this; } /** * Parameter value * * @param string $parameter53Value Parameter value * @return $this Fluent Builder */ public function setParameter53Value(string $parameter53Value): self { $this->options['parameter53Value'] = $parameter53Value; return $this; } /** * Parameter name * * @param string $parameter54Name Parameter name * @return $this Fluent Builder */ public function setParameter54Name(string $parameter54Name): self { $this->options['parameter54Name'] = $parameter54Name; return $this; } /** * Parameter value * * @param string $parameter54Value Parameter value * @return $this Fluent Builder */ public function setParameter54Value(string $parameter54Value): self { $this->options['parameter54Value'] = $parameter54Value; return $this; } /** * Parameter name * * @param string $parameter55Name Parameter name * @return $this Fluent Builder */ public function setParameter55Name(string $parameter55Name): self { $this->options['parameter55Name'] = $parameter55Name; return $this; } /** * Parameter value * * @param string $parameter55Value Parameter value * @return $this Fluent Builder */ public function setParameter55Value(string $parameter55Value): self { $this->options['parameter55Value'] = $parameter55Value; return $this; } /** * Parameter name * * @param string $parameter56Name Parameter name * @return $this Fluent Builder */ public function setParameter56Name(string $parameter56Name): self { $this->options['parameter56Name'] = $parameter56Name; return $this; } /** * Parameter value * * @param string $parameter56Value Parameter value * @return $this Fluent Builder */ public function setParameter56Value(string $parameter56Value): self { $this->options['parameter56Value'] = $parameter56Value; return $this; } /** * Parameter name * * @param string $parameter57Name Parameter name * @return $this Fluent Builder */ public function setParameter57Name(string $parameter57Name): self { $this->options['parameter57Name'] = $parameter57Name; return $this; } /** * Parameter value * * @param string $parameter57Value Parameter value * @return $this Fluent Builder */ public function setParameter57Value(string $parameter57Value): self { $this->options['parameter57Value'] = $parameter57Value; return $this; } /** * Parameter name * * @param string $parameter58Name Parameter name * @return $this Fluent Builder */ public function setParameter58Name(string $parameter58Name): self { $this->options['parameter58Name'] = $parameter58Name; return $this; } /** * Parameter value * * @param string $parameter58Value Parameter value * @return $this Fluent Builder */ public function setParameter58Value(string $parameter58Value): self { $this->options['parameter58Value'] = $parameter58Value; return $this; } /** * Parameter name * * @param string $parameter59Name Parameter name * @return $this Fluent Builder */ public function setParameter59Name(string $parameter59Name): self { $this->options['parameter59Name'] = $parameter59Name; return $this; } /** * Parameter value * * @param string $parameter59Value Parameter value * @return $this Fluent Builder */ public function setParameter59Value(string $parameter59Value): self { $this->options['parameter59Value'] = $parameter59Value; return $this; } /** * Parameter name * * @param string $parameter60Name Parameter name * @return $this Fluent Builder */ public function setParameter60Name(string $parameter60Name): self { $this->options['parameter60Name'] = $parameter60Name; return $this; } /** * Parameter value * * @param string $parameter60Value Parameter value * @return $this Fluent Builder */ public function setParameter60Value(string $parameter60Value): self { $this->options['parameter60Value'] = $parameter60Value; return $this; } /** * Parameter name * * @param string $parameter61Name Parameter name * @return $this Fluent Builder */ public function setParameter61Name(string $parameter61Name): self { $this->options['parameter61Name'] = $parameter61Name; return $this; } /** * Parameter value * * @param string $parameter61Value Parameter value * @return $this Fluent Builder */ public function setParameter61Value(string $parameter61Value): self { $this->options['parameter61Value'] = $parameter61Value; return $this; } /** * Parameter name * * @param string $parameter62Name Parameter name * @return $this Fluent Builder */ public function setParameter62Name(string $parameter62Name): self { $this->options['parameter62Name'] = $parameter62Name; return $this; } /** * Parameter value * * @param string $parameter62Value Parameter value * @return $this Fluent Builder */ public function setParameter62Value(string $parameter62Value): self { $this->options['parameter62Value'] = $parameter62Value; return $this; } /** * Parameter name * * @param string $parameter63Name Parameter name * @return $this Fluent Builder */ public function setParameter63Name(string $parameter63Name): self { $this->options['parameter63Name'] = $parameter63Name; return $this; } /** * Parameter value * * @param string $parameter63Value Parameter value * @return $this Fluent Builder */ public function setParameter63Value(string $parameter63Value): self { $this->options['parameter63Value'] = $parameter63Value; return $this; } /** * Parameter name * * @param string $parameter64Name Parameter name * @return $this Fluent Builder */ public function setParameter64Name(string $parameter64Name): self { $this->options['parameter64Name'] = $parameter64Name; return $this; } /** * Parameter value * * @param string $parameter64Value Parameter value * @return $this Fluent Builder */ public function setParameter64Value(string $parameter64Value): self { $this->options['parameter64Value'] = $parameter64Value; return $this; } /** * Parameter name * * @param string $parameter65Name Parameter name * @return $this Fluent Builder */ public function setParameter65Name(string $parameter65Name): self { $this->options['parameter65Name'] = $parameter65Name; return $this; } /** * Parameter value * * @param string $parameter65Value Parameter value * @return $this Fluent Builder */ public function setParameter65Value(string $parameter65Value): self { $this->options['parameter65Value'] = $parameter65Value; return $this; } /** * Parameter name * * @param string $parameter66Name Parameter name * @return $this Fluent Builder */ public function setParameter66Name(string $parameter66Name): self { $this->options['parameter66Name'] = $parameter66Name; return $this; } /** * Parameter value * * @param string $parameter66Value Parameter value * @return $this Fluent Builder */ public function setParameter66Value(string $parameter66Value): self { $this->options['parameter66Value'] = $parameter66Value; return $this; } /** * Parameter name * * @param string $parameter67Name Parameter name * @return $this Fluent Builder */ public function setParameter67Name(string $parameter67Name): self { $this->options['parameter67Name'] = $parameter67Name; return $this; } /** * Parameter value * * @param string $parameter67Value Parameter value * @return $this Fluent Builder */ public function setParameter67Value(string $parameter67Value): self { $this->options['parameter67Value'] = $parameter67Value; return $this; } /** * Parameter name * * @param string $parameter68Name Parameter name * @return $this Fluent Builder */ public function setParameter68Name(string $parameter68Name): self { $this->options['parameter68Name'] = $parameter68Name; return $this; } /** * Parameter value * * @param string $parameter68Value Parameter value * @return $this Fluent Builder */ public function setParameter68Value(string $parameter68Value): self { $this->options['parameter68Value'] = $parameter68Value; return $this; } /** * Parameter name * * @param string $parameter69Name Parameter name * @return $this Fluent Builder */ public function setParameter69Name(string $parameter69Name): self { $this->options['parameter69Name'] = $parameter69Name; return $this; } /** * Parameter value * * @param string $parameter69Value Parameter value * @return $this Fluent Builder */ public function setParameter69Value(string $parameter69Value): self { $this->options['parameter69Value'] = $parameter69Value; return $this; } /** * Parameter name * * @param string $parameter70Name Parameter name * @return $this Fluent Builder */ public function setParameter70Name(string $parameter70Name): self { $this->options['parameter70Name'] = $parameter70Name; return $this; } /** * Parameter value * * @param string $parameter70Value Parameter value * @return $this Fluent Builder */ public function setParameter70Value(string $parameter70Value): self { $this->options['parameter70Value'] = $parameter70Value; return $this; } /** * Parameter name * * @param string $parameter71Name Parameter name * @return $this Fluent Builder */ public function setParameter71Name(string $parameter71Name): self { $this->options['parameter71Name'] = $parameter71Name; return $this; } /** * Parameter value * * @param string $parameter71Value Parameter value * @return $this Fluent Builder */ public function setParameter71Value(string $parameter71Value): self { $this->options['parameter71Value'] = $parameter71Value; return $this; } /** * Parameter name * * @param string $parameter72Name Parameter name * @return $this Fluent Builder */ public function setParameter72Name(string $parameter72Name): self { $this->options['parameter72Name'] = $parameter72Name; return $this; } /** * Parameter value * * @param string $parameter72Value Parameter value * @return $this Fluent Builder */ public function setParameter72Value(string $parameter72Value): self { $this->options['parameter72Value'] = $parameter72Value; return $this; } /** * Parameter name * * @param string $parameter73Name Parameter name * @return $this Fluent Builder */ public function setParameter73Name(string $parameter73Name): self { $this->options['parameter73Name'] = $parameter73Name; return $this; } /** * Parameter value * * @param string $parameter73Value Parameter value * @return $this Fluent Builder */ public function setParameter73Value(string $parameter73Value): self { $this->options['parameter73Value'] = $parameter73Value; return $this; } /** * Parameter name * * @param string $parameter74Name Parameter name * @return $this Fluent Builder */ public function setParameter74Name(string $parameter74Name): self { $this->options['parameter74Name'] = $parameter74Name; return $this; } /** * Parameter value * * @param string $parameter74Value Parameter value * @return $this Fluent Builder */ public function setParameter74Value(string $parameter74Value): self { $this->options['parameter74Value'] = $parameter74Value; return $this; } /** * Parameter name * * @param string $parameter75Name Parameter name * @return $this Fluent Builder */ public function setParameter75Name(string $parameter75Name): self { $this->options['parameter75Name'] = $parameter75Name; return $this; } /** * Parameter value * * @param string $parameter75Value Parameter value * @return $this Fluent Builder */ public function setParameter75Value(string $parameter75Value): self { $this->options['parameter75Value'] = $parameter75Value; return $this; } /** * Parameter name * * @param string $parameter76Name Parameter name * @return $this Fluent Builder */ public function setParameter76Name(string $parameter76Name): self { $this->options['parameter76Name'] = $parameter76Name; return $this; } /** * Parameter value * * @param string $parameter76Value Parameter value * @return $this Fluent Builder */ public function setParameter76Value(string $parameter76Value): self { $this->options['parameter76Value'] = $parameter76Value; return $this; } /** * Parameter name * * @param string $parameter77Name Parameter name * @return $this Fluent Builder */ public function setParameter77Name(string $parameter77Name): self { $this->options['parameter77Name'] = $parameter77Name; return $this; } /** * Parameter value * * @param string $parameter77Value Parameter value * @return $this Fluent Builder */ public function setParameter77Value(string $parameter77Value): self { $this->options['parameter77Value'] = $parameter77Value; return $this; } /** * Parameter name * * @param string $parameter78Name Parameter name * @return $this Fluent Builder */ public function setParameter78Name(string $parameter78Name): self { $this->options['parameter78Name'] = $parameter78Name; return $this; } /** * Parameter value * * @param string $parameter78Value Parameter value * @return $this Fluent Builder */ public function setParameter78Value(string $parameter78Value): self { $this->options['parameter78Value'] = $parameter78Value; return $this; } /** * Parameter name * * @param string $parameter79Name Parameter name * @return $this Fluent Builder */ public function setParameter79Name(string $parameter79Name): self { $this->options['parameter79Name'] = $parameter79Name; return $this; } /** * Parameter value * * @param string $parameter79Value Parameter value * @return $this Fluent Builder */ public function setParameter79Value(string $parameter79Value): self { $this->options['parameter79Value'] = $parameter79Value; return $this; } /** * Parameter name * * @param string $parameter80Name Parameter name * @return $this Fluent Builder */ public function setParameter80Name(string $parameter80Name): self { $this->options['parameter80Name'] = $parameter80Name; return $this; } /** * Parameter value * * @param string $parameter80Value Parameter value * @return $this Fluent Builder */ public function setParameter80Value(string $parameter80Value): self { $this->options['parameter80Value'] = $parameter80Value; return $this; } /** * Parameter name * * @param string $parameter81Name Parameter name * @return $this Fluent Builder */ public function setParameter81Name(string $parameter81Name): self { $this->options['parameter81Name'] = $parameter81Name; return $this; } /** * Parameter value * * @param string $parameter81Value Parameter value * @return $this Fluent Builder */ public function setParameter81Value(string $parameter81Value): self { $this->options['parameter81Value'] = $parameter81Value; return $this; } /** * Parameter name * * @param string $parameter82Name Parameter name * @return $this Fluent Builder */ public function setParameter82Name(string $parameter82Name): self { $this->options['parameter82Name'] = $parameter82Name; return $this; } /** * Parameter value * * @param string $parameter82Value Parameter value * @return $this Fluent Builder */ public function setParameter82Value(string $parameter82Value): self { $this->options['parameter82Value'] = $parameter82Value; return $this; } /** * Parameter name * * @param string $parameter83Name Parameter name * @return $this Fluent Builder */ public function setParameter83Name(string $parameter83Name): self { $this->options['parameter83Name'] = $parameter83Name; return $this; } /** * Parameter value * * @param string $parameter83Value Parameter value * @return $this Fluent Builder */ public function setParameter83Value(string $parameter83Value): self { $this->options['parameter83Value'] = $parameter83Value; return $this; } /** * Parameter name * * @param string $parameter84Name Parameter name * @return $this Fluent Builder */ public function setParameter84Name(string $parameter84Name): self { $this->options['parameter84Name'] = $parameter84Name; return $this; } /** * Parameter value * * @param string $parameter84Value Parameter value * @return $this Fluent Builder */ public function setParameter84Value(string $parameter84Value): self { $this->options['parameter84Value'] = $parameter84Value; return $this; } /** * Parameter name * * @param string $parameter85Name Parameter name * @return $this Fluent Builder */ public function setParameter85Name(string $parameter85Name): self { $this->options['parameter85Name'] = $parameter85Name; return $this; } /** * Parameter value * * @param string $parameter85Value Parameter value * @return $this Fluent Builder */ public function setParameter85Value(string $parameter85Value): self { $this->options['parameter85Value'] = $parameter85Value; return $this; } /** * Parameter name * * @param string $parameter86Name Parameter name * @return $this Fluent Builder */ public function setParameter86Name(string $parameter86Name): self { $this->options['parameter86Name'] = $parameter86Name; return $this; } /** * Parameter value * * @param string $parameter86Value Parameter value * @return $this Fluent Builder */ public function setParameter86Value(string $parameter86Value): self { $this->options['parameter86Value'] = $parameter86Value; return $this; } /** * Parameter name * * @param string $parameter87Name Parameter name * @return $this Fluent Builder */ public function setParameter87Name(string $parameter87Name): self { $this->options['parameter87Name'] = $parameter87Name; return $this; } /** * Parameter value * * @param string $parameter87Value Parameter value * @return $this Fluent Builder */ public function setParameter87Value(string $parameter87Value): self { $this->options['parameter87Value'] = $parameter87Value; return $this; } /** * Parameter name * * @param string $parameter88Name Parameter name * @return $this Fluent Builder */ public function setParameter88Name(string $parameter88Name): self { $this->options['parameter88Name'] = $parameter88Name; return $this; } /** * Parameter value * * @param string $parameter88Value Parameter value * @return $this Fluent Builder */ public function setParameter88Value(string $parameter88Value): self { $this->options['parameter88Value'] = $parameter88Value; return $this; } /** * Parameter name * * @param string $parameter89Name Parameter name * @return $this Fluent Builder */ public function setParameter89Name(string $parameter89Name): self { $this->options['parameter89Name'] = $parameter89Name; return $this; } /** * Parameter value * * @param string $parameter89Value Parameter value * @return $this Fluent Builder */ public function setParameter89Value(string $parameter89Value): self { $this->options['parameter89Value'] = $parameter89Value; return $this; } /** * Parameter name * * @param string $parameter90Name Parameter name * @return $this Fluent Builder */ public function setParameter90Name(string $parameter90Name): self { $this->options['parameter90Name'] = $parameter90Name; return $this; } /** * Parameter value * * @param string $parameter90Value Parameter value * @return $this Fluent Builder */ public function setParameter90Value(string $parameter90Value): self { $this->options['parameter90Value'] = $parameter90Value; return $this; } /** * Parameter name * * @param string $parameter91Name Parameter name * @return $this Fluent Builder */ public function setParameter91Name(string $parameter91Name): self { $this->options['parameter91Name'] = $parameter91Name; return $this; } /** * Parameter value * * @param string $parameter91Value Parameter value * @return $this Fluent Builder */ public function setParameter91Value(string $parameter91Value): self { $this->options['parameter91Value'] = $parameter91Value; return $this; } /** * Parameter name * * @param string $parameter92Name Parameter name * @return $this Fluent Builder */ public function setParameter92Name(string $parameter92Name): self { $this->options['parameter92Name'] = $parameter92Name; return $this; } /** * Parameter value * * @param string $parameter92Value Parameter value * @return $this Fluent Builder */ public function setParameter92Value(string $parameter92Value): self { $this->options['parameter92Value'] = $parameter92Value; return $this; } /** * Parameter name * * @param string $parameter93Name Parameter name * @return $this Fluent Builder */ public function setParameter93Name(string $parameter93Name): self { $this->options['parameter93Name'] = $parameter93Name; return $this; } /** * Parameter value * * @param string $parameter93Value Parameter value * @return $this Fluent Builder */ public function setParameter93Value(string $parameter93Value): self { $this->options['parameter93Value'] = $parameter93Value; return $this; } /** * Parameter name * * @param string $parameter94Name Parameter name * @return $this Fluent Builder */ public function setParameter94Name(string $parameter94Name): self { $this->options['parameter94Name'] = $parameter94Name; return $this; } /** * Parameter value * * @param string $parameter94Value Parameter value * @return $this Fluent Builder */ public function setParameter94Value(string $parameter94Value): self { $this->options['parameter94Value'] = $parameter94Value; return $this; } /** * Parameter name * * @param string $parameter95Name Parameter name * @return $this Fluent Builder */ public function setParameter95Name(string $parameter95Name): self { $this->options['parameter95Name'] = $parameter95Name; return $this; } /** * Parameter value * * @param string $parameter95Value Parameter value * @return $this Fluent Builder */ public function setParameter95Value(string $parameter95Value): self { $this->options['parameter95Value'] = $parameter95Value; return $this; } /** * Parameter name * * @param string $parameter96Name Parameter name * @return $this Fluent Builder */ public function setParameter96Name(string $parameter96Name): self { $this->options['parameter96Name'] = $parameter96Name; return $this; } /** * Parameter value * * @param string $parameter96Value Parameter value * @return $this Fluent Builder */ public function setParameter96Value(string $parameter96Value): self { $this->options['parameter96Value'] = $parameter96Value; return $this; } /** * Parameter name * * @param string $parameter97Name Parameter name * @return $this Fluent Builder */ public function setParameter97Name(string $parameter97Name): self { $this->options['parameter97Name'] = $parameter97Name; return $this; } /** * Parameter value * * @param string $parameter97Value Parameter value * @return $this Fluent Builder */ public function setParameter97Value(string $parameter97Value): self { $this->options['parameter97Value'] = $parameter97Value; return $this; } /** * Parameter name * * @param string $parameter98Name Parameter name * @return $this Fluent Builder */ public function setParameter98Name(string $parameter98Name): self { $this->options['parameter98Name'] = $parameter98Name; return $this; } /** * Parameter value * * @param string $parameter98Value Parameter value * @return $this Fluent Builder */ public function setParameter98Value(string $parameter98Value): self { $this->options['parameter98Value'] = $parameter98Value; return $this; } /** * Parameter name * * @param string $parameter99Name Parameter name * @return $this Fluent Builder */ public function setParameter99Name(string $parameter99Name): self { $this->options['parameter99Name'] = $parameter99Name; return $this; } /** * Parameter value * * @param string $parameter99Value Parameter value * @return $this Fluent Builder */ public function setParameter99Value(string $parameter99Value): self { $this->options['parameter99Value'] = $parameter99Value; 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.Api.V2010.CreateSiprecOptions ' . $options . ']'; } } V2010/Account/Call/UserDefinedMessageSubscriptionList.php 0000644 00000005211 15111164145 0017175 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; class UserDefinedMessageSubscriptionList extends ListResource { /** * Construct the UserDefinedMessageSubscriptionList * * @param Version $version Version that contains the resource * @param string $accountSid Account SID. * @param string $callSid Call SID. */ public function __construct(Version $version, string $accountSid, string $callSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/UserDefinedMessageSubscriptions.json'; } /** * Create the UserDefinedMessageSubscriptionInstance * * @param string $callback The URL we should call to send user defined messages. * @param array|Options $options Optional Arguments * @return UserDefinedMessageSubscriptionInstance Created * UserDefinedMessageSubscriptionInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $callback, array $options = []): UserDefinedMessageSubscriptionInstance { $options = new Values($options); $data = Values::of([ 'Callback' => $callback, 'IdempotencyKey' => $options['idempotencyKey'], 'Method' => $options['method'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new UserDefinedMessageSubscriptionInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Constructs a UserDefinedMessageSubscriptionContext * * @param string $sid User Defined Message Subscription SID. */ public function getContext(string $sid): UserDefinedMessageSubscriptionContext { return new UserDefinedMessageSubscriptionContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.UserDefinedMessageSubscriptionList]'; } } V2010/Account/Call/UserDefinedMessagePage.php 0000644 00000002512 15111164145 0014532 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class UserDefinedMessagePage 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 UserDefinedMessageInstance \Twilio\Rest\Api\V2010\Account\Call\UserDefinedMessageInstance */ public function buildInstance(array $payload): UserDefinedMessageInstance { return new UserDefinedMessageInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.UserDefinedMessagePage]'; } } V2010/Account/Call/FeedbackSummaryPage.php 0000644 00000002342 15111164146 0014074 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class FeedbackSummaryPage 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 FeedbackSummaryInstance \Twilio\Rest\Api\V2010\Account\Call\FeedbackSummaryInstance */ public function buildInstance(array $payload): FeedbackSummaryInstance { return new FeedbackSummaryInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.FeedbackSummaryPage]'; } } V2010/Account/Call/FeedbackSummaryInstance.php 0000644 00000011376 15111164146 0014773 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Call; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property int $callCount * @property int $callFeedbackCount * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property \DateTime $endDate * @property bool $includeSubaccounts * @property array[] $issues * @property string $qualityScoreAverage * @property string $qualityScoreMedian * @property string $qualityScoreStandardDeviation * @property string $sid * @property \DateTime $startDate * @property string $status */ class FeedbackSummaryInstance extends InstanceResource { /** * Initialize the FeedbackSummaryInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created this resource * @param string $sid A string that uniquely identifies this feedback summary * resource */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'callCount' => Values::array_get($payload, 'call_count'), 'callFeedbackCount' => Values::array_get($payload, 'call_feedback_count'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'includeSubaccounts' => Values::array_get($payload, 'include_subaccounts'), 'issues' => Values::array_get($payload, 'issues'), 'qualityScoreAverage' => Values::array_get($payload, 'quality_score_average'), 'qualityScoreMedian' => Values::array_get($payload, 'quality_score_median'), 'qualityScoreStandardDeviation' => Values::array_get($payload, 'quality_score_standard_deviation'), 'sid' => Values::array_get($payload, 'sid'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'status' => Values::array_get($payload, 'status'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FeedbackSummaryContext Context for this FeedbackSummaryInstance */ protected function proxy(): FeedbackSummaryContext { if (!$this->context) { $this->context = new FeedbackSummaryContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the FeedbackSummaryInstance * * @return FeedbackSummaryInstance Fetched FeedbackSummaryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FeedbackSummaryInstance { return $this->proxy()->fetch(); } /** * Delete the FeedbackSummaryInstance * * @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.Api.V2010.FeedbackSummaryInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/TranscriptionInstance.php 0000644 00000010565 15111164147 0013715 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $duration * @property string $price * @property string $priceUnit * @property string $recordingSid * @property string $sid * @property string $status * @property string $transcriptionText * @property string $type * @property string $uri */ class TranscriptionInstance extends InstanceResource { /** * Initialize the TranscriptionInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'duration' => Values::array_get($payload, 'duration'), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'recordingSid' => Values::array_get($payload, 'recording_sid'), 'sid' => Values::array_get($payload, 'sid'), 'status' => Values::array_get($payload, 'status'), 'transcriptionText' => Values::array_get($payload, 'transcription_text'), 'type' => Values::array_get($payload, 'type'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TranscriptionContext Context for this TranscriptionInstance */ protected function proxy(): TranscriptionContext { if (!$this->context) { $this->context = new TranscriptionContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the TranscriptionInstance * * @return TranscriptionInstance Fetched TranscriptionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TranscriptionInstance { return $this->proxy()->fetch(); } /** * Delete the TranscriptionInstance * * @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.Api.V2010.TranscriptionInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Usage/RecordOptions.php 0000644 00000011134 15111164147 0013220 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage; use Twilio\Options; use Twilio\Values; abstract class RecordOptions { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return ReadRecordOptions Options builder */ public static function read(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE): ReadRecordOptions { return new ReadRecordOptions($category, $startDate, $endDate, $includeSubaccounts); } } class ReadRecordOptions extends Options { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts */ public function __construct(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE) { $this->options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; 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.Api.V2010.ReadRecordOptions ' . $options . ']'; } } V2010/Account/Usage/TriggerContext.php 0000644 00000005551 15111164150 0013376 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Values; use Twilio\Version; class TriggerContext extends InstanceContext { /** * Initialize the TriggerContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Triggers/' . \rawurlencode($sid) . '.json'; } /** * Fetch the TriggerInstance * * @return TriggerInstance Fetched TriggerInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TriggerInstance { $payload = $this->version->fetch('GET', $this->uri); return new TriggerInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the TriggerInstance * * @param array|Options $options Optional Arguments * @return TriggerInstance Updated TriggerInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TriggerInstance { $options = new Values($options); $data = Values::of([ 'CallbackMethod' => $options['callbackMethod'], 'CallbackUrl' => $options['callbackUrl'], 'FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new TriggerInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the TriggerInstance * * @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.Api.V2010.TriggerContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Usage/TriggerPage.php 0000644 00000002264 15111164150 0012624 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class TriggerPage 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 TriggerInstance \Twilio\Rest\Api\V2010\Account\Usage\TriggerInstance */ public function buildInstance(array $payload): TriggerInstance { return new TriggerInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TriggerPage]'; } } V2010/Account/Usage/RecordPage.php 0000644 00000002256 15111164150 0012440 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class RecordPage 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 RecordInstance \Twilio\Rest\Api\V2010\Account\Usage\RecordInstance */ public function buildInstance(array $payload): RecordInstance { return new RecordInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.RecordPage]'; } } V2010/Account/Usage/Record/YesterdayPage.php 0000644 00000002316 15111164151 0014407 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class YesterdayPage 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 YesterdayInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\YesterdayInstance */ public function buildInstance(array $payload): YesterdayInstance { return new YesterdayInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.YesterdayPage]'; } } V2010/Account/Usage/Record/AllTimePage.php 0000644 00000002302 15111164151 0013760 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class AllTimePage 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 AllTimeInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\AllTimeInstance */ public function buildInstance(array $payload): AllTimeInstance { return new AllTimeInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AllTimePage]'; } } V2010/Account/Usage/Record/ThisMonthPage.php 0000644 00000002316 15111164151 0014353 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class ThisMonthPage 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 ThisMonthInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\ThisMonthInstance */ public function buildInstance(array $payload): ThisMonthInstance { return new ThisMonthInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ThisMonthPage]'; } } V2010/Account/Usage/Record/TodayInstance.php 0000644 00000006257 15111164152 0014417 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property string $asOf * @property string $category * @property string $count * @property string $countUnit * @property string $description * @property \DateTime $endDate * @property string $price * @property string $priceUnit * @property \DateTime $startDate * @property array $subresourceUris * @property string $uri * @property string $usage * @property string $usageUnit */ class TodayInstance extends InstanceResource { /** * Initialize the TodayInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.TodayInstance]'; } } V2010/Account/Usage/Record/AllTimeList.php 0000644 00000012233 15111164152 0014024 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class AllTimeList extends ListResource { /** * Construct the AllTimeList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/AllTime.json'; } /** * Streams AllTimeInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AllTimeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 AllTimeInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of AllTimeInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 AllTimePage Page of AllTimeInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AllTimePage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AllTimePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AllTimeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AllTimePage Page of AllTimeInstance */ public function getPage(string $targetUrl): AllTimePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AllTimePage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AllTimeList]'; } } V2010/Account/Usage/Record/AllTimeInstance.php 0000644 00000006265 15111164153 0014666 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property string $asOf * @property string $category * @property string $count * @property string $countUnit * @property string $description * @property \DateTime $endDate * @property string $price * @property string $priceUnit * @property \DateTime $startDate * @property array $subresourceUris * @property string $uri * @property string $usage * @property string $usageUnit */ class AllTimeInstance extends InstanceResource { /** * Initialize the AllTimeInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.AllTimeInstance]'; } } V2010/Account/Usage/Record/YesterdayInstance.php 0000644 00000006273 15111164153 0015307 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property string $asOf * @property string $category * @property string $count * @property string $countUnit * @property string $description * @property \DateTime $endDate * @property string $price * @property string $priceUnit * @property \DateTime $startDate * @property array $subresourceUris * @property string $uri * @property string $usage * @property string $usageUnit */ class YesterdayInstance extends InstanceResource { /** * Initialize the YesterdayInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.YesterdayInstance]'; } } V2010/Account/Usage/Record/DailyInstance.php 0000644 00000006257 15111164153 0014402 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property string $asOf * @property string $category * @property string $count * @property string $countUnit * @property string $description * @property \DateTime $endDate * @property string $price * @property string $priceUnit * @property \DateTime $startDate * @property array $subresourceUris * @property string $uri * @property string $usage * @property string $usageUnit */ class DailyInstance extends InstanceResource { /** * Initialize the DailyInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.DailyInstance]'; } } V2010/Account/Usage/Record/YesterdayOptions.php 0000644 00000011165 15111164154 0015173 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Options; use Twilio\Values; abstract class YesterdayOptions { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return ReadYesterdayOptions Options builder */ public static function read(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE): ReadYesterdayOptions { return new ReadYesterdayOptions($category, $startDate, $endDate, $includeSubaccounts); } } class ReadYesterdayOptions extends Options { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts */ public function __construct(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE) { $this->options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; 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.Api.V2010.ReadYesterdayOptions ' . $options . ']'; } } V2010/Account/Usage/Record/ThisMonthList.php 0000644 00000012275 15111164154 0014422 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class ThisMonthList extends ListResource { /** * Construct the ThisMonthList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/ThisMonth.json'; } /** * Streams ThisMonthInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ThisMonthInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 ThisMonthInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ThisMonthInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 ThisMonthPage Page of ThisMonthInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ThisMonthPage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ThisMonthPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ThisMonthInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ThisMonthPage Page of ThisMonthInstance */ public function getPage(string $targetUrl): ThisMonthPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ThisMonthPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ThisMonthList]'; } } V2010/Account/Usage/Record/TodayOptions.php 0000644 00000011135 15111164154 0014277 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Options; use Twilio\Values; abstract class TodayOptions { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return ReadTodayOptions Options builder */ public static function read(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE): ReadTodayOptions { return new ReadTodayOptions($category, $startDate, $endDate, $includeSubaccounts); } } class ReadTodayOptions extends Options { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts */ public function __construct(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE) { $this->options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; 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.Api.V2010.ReadTodayOptions ' . $options . ']'; } } V2010/Account/Usage/Record/TodayList.php 0000644 00000012171 15111164155 0013561 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class TodayList extends ListResource { /** * Construct the TodayList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/Today.json'; } /** * Streams TodayInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TodayInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 TodayInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of TodayInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 TodayPage Page of TodayInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TodayPage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TodayPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TodayInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TodayPage Page of TodayInstance */ public function getPage(string $targetUrl): TodayPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TodayPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TodayList]'; } } V2010/Account/Usage/Record/LastMonthOptions.php 0000644 00000011165 15111164155 0015134 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Options; use Twilio\Values; abstract class LastMonthOptions { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return ReadLastMonthOptions Options builder */ public static function read(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE): ReadLastMonthOptions { return new ReadLastMonthOptions($category, $startDate, $endDate, $includeSubaccounts); } } class ReadLastMonthOptions extends Options { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts */ public function __construct(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE) { $this->options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; 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.Api.V2010.ReadLastMonthOptions ' . $options . ']'; } } V2010/Account/Usage/Record/DailyList.php 0000644 00000012171 15111164156 0013544 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class DailyList extends ListResource { /** * Construct the DailyList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/Daily.json'; } /** * Streams DailyInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DailyInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 DailyInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of DailyInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 DailyPage Page of DailyInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DailyPage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DailyPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DailyInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DailyPage Page of DailyInstance */ public function getPage(string $targetUrl): DailyPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DailyPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.DailyList]'; } } V2010/Account/Usage/Record/MonthlyPage.php 0000644 00000002302 15111164156 0014070 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class MonthlyPage 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 MonthlyInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\MonthlyInstance */ public function buildInstance(array $payload): MonthlyInstance { return new MonthlyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MonthlyPage]'; } } V2010/Account/Usage/Record/MonthlyInstance.php 0000644 00000006265 15111164156 0014774 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property string $asOf * @property string $category * @property string $count * @property string $countUnit * @property string $description * @property \DateTime $endDate * @property string $price * @property string $priceUnit * @property \DateTime $startDate * @property array $subresourceUris * @property string $uri * @property string $usage * @property string $usageUnit */ class MonthlyInstance extends InstanceResource { /** * Initialize the MonthlyInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.MonthlyInstance]'; } } V2010/Account/Usage/Record/LastMonthList.php 0000644 00000012275 15111164157 0014421 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class LastMonthList extends ListResource { /** * Construct the LastMonthList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/LastMonth.json'; } /** * Streams LastMonthInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads LastMonthInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 LastMonthInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of LastMonthInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 LastMonthPage Page of LastMonthInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): LastMonthPage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new LastMonthPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of LastMonthInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return LastMonthPage Page of LastMonthInstance */ public function getPage(string $targetUrl): LastMonthPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new LastMonthPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.LastMonthList]'; } } V2010/Account/Usage/Record/LastMonthPage.php 0000644 00000002316 15111164157 0014355 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class LastMonthPage 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 LastMonthInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\LastMonthInstance */ public function buildInstance(array $payload): LastMonthInstance { return new LastMonthInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.LastMonthPage]'; } } V2010/Account/Usage/Record/ThisMonthInstance.php 0000644 00000006273 15111164157 0015257 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property string $asOf * @property string $category * @property string $count * @property string $countUnit * @property string $description * @property \DateTime $endDate * @property string $price * @property string $priceUnit * @property \DateTime $startDate * @property array $subresourceUris * @property string $uri * @property string $usage * @property string $usageUnit */ class ThisMonthInstance extends InstanceResource { /** * Initialize the ThisMonthInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.ThisMonthInstance]'; } } V2010/Account/Usage/Record/TodayPage.php 0000644 00000002266 15111164160 0013522 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class TodayPage 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 TodayInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\TodayInstance */ public function buildInstance(array $payload): TodayInstance { return new TodayInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TodayPage]'; } } V2010/Account/Usage/Record/YearlyOptions.php 0000644 00000011143 15111164160 0014460 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Options; use Twilio\Values; abstract class YearlyOptions { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return ReadYearlyOptions Options builder */ public static function read(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE): ReadYearlyOptions { return new ReadYearlyOptions($category, $startDate, $endDate, $includeSubaccounts); } } class ReadYearlyOptions extends Options { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts */ public function __construct(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE) { $this->options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; 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.Api.V2010.ReadYearlyOptions ' . $options . ']'; } } V2010/Account/Usage/Record/MonthlyList.php 0000644 00000012233 15111164161 0014127 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class MonthlyList extends ListResource { /** * Construct the MonthlyList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/Monthly.json'; } /** * Streams MonthlyInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MonthlyInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 MonthlyInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MonthlyInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 MonthlyPage Page of MonthlyInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MonthlyPage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MonthlyPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MonthlyInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MonthlyPage Page of MonthlyInstance */ public function getPage(string $targetUrl): MonthlyPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MonthlyPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MonthlyList]'; } } V2010/Account/Usage/Record/YearlyInstance.php 0000644 00000006262 15111164161 0014600 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property string $asOf * @property string $category * @property string $count * @property string $countUnit * @property string $description * @property \DateTime $endDate * @property string $price * @property string $priceUnit * @property \DateTime $startDate * @property array $subresourceUris * @property string $uri * @property string $usage * @property string $usageUnit */ class YearlyInstance extends InstanceResource { /** * Initialize the YearlyInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.YearlyInstance]'; } } V2010/Account/Usage/Record/AllTimeOptions.php 0000644 00000011151 15111164161 0014542 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Options; use Twilio\Values; abstract class AllTimeOptions { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return ReadAllTimeOptions Options builder */ public static function read(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE): ReadAllTimeOptions { return new ReadAllTimeOptions($category, $startDate, $endDate, $includeSubaccounts); } } class ReadAllTimeOptions extends Options { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts */ public function __construct(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE) { $this->options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; 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.Api.V2010.ReadAllTimeOptions ' . $options . ']'; } } V2010/Account/Usage/Record/YearlyList.php 0000644 00000012212 15111164162 0013740 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class YearlyList extends ListResource { /** * Construct the YearlyList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/Yearly.json'; } /** * Streams YearlyInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads YearlyInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 YearlyInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of YearlyInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 YearlyPage Page of YearlyInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): YearlyPage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new YearlyPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of YearlyInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return YearlyPage Page of YearlyInstance */ public function getPage(string $targetUrl): YearlyPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new YearlyPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.YearlyList]'; } } V2010/Account/Usage/Record/DailyOptions.php 0000644 00000011135 15111164162 0014260 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Options; use Twilio\Values; abstract class DailyOptions { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return ReadDailyOptions Options builder */ public static function read(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE): ReadDailyOptions { return new ReadDailyOptions($category, $startDate, $endDate, $includeSubaccounts); } } class ReadDailyOptions extends Options { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts */ public function __construct(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE) { $this->options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; 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.Api.V2010.ReadDailyOptions ' . $options . ']'; } } V2010/Account/Usage/Record/DailyPage.php 0000644 00000002266 15111164162 0013506 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class DailyPage 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 DailyInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\DailyInstance */ public function buildInstance(array $payload): DailyInstance { return new DailyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.DailyPage]'; } } V2010/Account/Usage/Record/YearlyPage.php 0000644 00000002274 15111164163 0013711 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class YearlyPage 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 YearlyInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\YearlyInstance */ public function buildInstance(array $payload): YearlyInstance { return new YearlyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.YearlyPage]'; } } V2010/Account/Usage/Record/YesterdayList.php 0000644 00000012275 15111164163 0014456 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class YesterdayList extends ListResource { /** * Construct the YesterdayList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/Yesterday.json'; } /** * Streams YesterdayInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads YesterdayInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 YesterdayInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of YesterdayInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 YesterdayPage Page of YesterdayInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): YesterdayPage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new YesterdayPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of YesterdayInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return YesterdayPage Page of YesterdayInstance */ public function getPage(string $targetUrl): YesterdayPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new YesterdayPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.YesterdayList]'; } } V2010/Account/Usage/Record/ThisMonthOptions.php 0000644 00000011165 15111164163 0015137 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Options; use Twilio\Values; abstract class ThisMonthOptions { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return ReadThisMonthOptions Options builder */ public static function read(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE): ReadThisMonthOptions { return new ReadThisMonthOptions($category, $startDate, $endDate, $includeSubaccounts); } } class ReadThisMonthOptions extends Options { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts */ public function __construct(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE) { $this->options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; 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.Api.V2010.ReadThisMonthOptions ' . $options . ']'; } } V2010/Account/Usage/Record/LastMonthInstance.php 0000644 00000006273 15111164164 0015251 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property string $asOf * @property string $category * @property string $count * @property string $countUnit * @property string $description * @property \DateTime $endDate * @property string $price * @property string $priceUnit * @property \DateTime $startDate * @property array $subresourceUris * @property string $uri * @property string $usage * @property string $usageUnit */ class LastMonthInstance extends InstanceResource { /** * Initialize the LastMonthInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.LastMonthInstance]'; } } V2010/Account/Usage/Record/MonthlyOptions.php 0000644 00000011151 15111164164 0014650 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage\Record; use Twilio\Options; use Twilio\Values; abstract class MonthlyOptions { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return ReadMonthlyOptions Options builder */ public static function read(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE): ReadMonthlyOptions { return new ReadMonthlyOptions($category, $startDate, $endDate, $includeSubaccounts); } } class ReadMonthlyOptions extends Options { /** * @param string $category The usage category of the UsageRecord resources to * read * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts */ public function __construct(string $category = Values::NONE, \DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, bool $includeSubaccounts = Values::NONE) { $this->options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; 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.Api.V2010.ReadMonthlyOptions ' . $options . ']'; } } V2010/Account/Usage/TriggerOptions.php 0000644 00000022550 15111164164 0013410 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage; use Twilio\Options; use Twilio\Values; abstract class TriggerOptions { /** * @param string $callbackMethod The HTTP method to use to call callback_url * @param string $callbackUrl The URL we call when the trigger fires * @param string $friendlyName A string to describe the resource * @return UpdateTriggerOptions Options builder */ public static function update(string $callbackMethod = Values::NONE, string $callbackUrl = Values::NONE, string $friendlyName = Values::NONE): UpdateTriggerOptions { return new UpdateTriggerOptions($callbackMethod, $callbackUrl, $friendlyName); } /** * @param string $callbackMethod The HTTP method to use to call callback_url * @param string $friendlyName A string to describe the resource * @param string $recurring The frequency of a recurring UsageTrigger * @param string $triggerBy The field in the UsageRecord resource that fires * the trigger * @return CreateTriggerOptions Options builder */ public static function create(string $callbackMethod = Values::NONE, string $friendlyName = Values::NONE, string $recurring = Values::NONE, string $triggerBy = Values::NONE): CreateTriggerOptions { return new CreateTriggerOptions($callbackMethod, $friendlyName, $recurring, $triggerBy); } /** * @param string $recurring The frequency of recurring UsageTriggers to read * @param string $triggerBy The trigger field of the UsageTriggers to read * @param string $usageCategory The usage category of the UsageTriggers to read * @return ReadTriggerOptions Options builder */ public static function read(string $recurring = Values::NONE, string $triggerBy = Values::NONE, string $usageCategory = Values::NONE): ReadTriggerOptions { return new ReadTriggerOptions($recurring, $triggerBy, $usageCategory); } } class UpdateTriggerOptions extends Options { /** * @param string $callbackMethod The HTTP method to use to call callback_url * @param string $callbackUrl The URL we call when the trigger fires * @param string $friendlyName A string to describe the resource */ public function __construct(string $callbackMethod = Values::NONE, string $callbackUrl = Values::NONE, string $friendlyName = Values::NONE) { $this->options['callbackMethod'] = $callbackMethod; $this->options['callbackUrl'] = $callbackUrl; $this->options['friendlyName'] = $friendlyName; } /** * The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`. * * @param string $callbackMethod The HTTP method to use to call callback_url * @return $this Fluent Builder */ public function setCallbackMethod(string $callbackMethod): self { $this->options['callbackMethod'] = $callbackMethod; return $this; } /** * The URL we should call using `callback_method` when the trigger fires. * * @param string $callbackUrl The URL we call when the trigger fires * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; 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.Api.V2010.UpdateTriggerOptions ' . $options . ']'; } } class CreateTriggerOptions extends Options { /** * @param string $callbackMethod The HTTP method to use to call callback_url * @param string $friendlyName A string to describe the resource * @param string $recurring The frequency of a recurring UsageTrigger * @param string $triggerBy The field in the UsageRecord resource that fires * the trigger */ public function __construct(string $callbackMethod = Values::NONE, string $friendlyName = Values::NONE, string $recurring = Values::NONE, string $triggerBy = Values::NONE) { $this->options['callbackMethod'] = $callbackMethod; $this->options['friendlyName'] = $friendlyName; $this->options['recurring'] = $recurring; $this->options['triggerBy'] = $triggerBy; } /** * The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`. * * @param string $callbackMethod The HTTP method to use to call callback_url * @return $this Fluent Builder */ public function setCallbackMethod(string $callbackMethod): self { $this->options['callbackMethod'] = $callbackMethod; return $this; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The frequency of a recurring UsageTrigger. Can be: `daily`, `monthly`, or `yearly` for recurring triggers or empty for non-recurring triggers. A trigger will only fire once during each period. Recurring times are in GMT. * * @param string $recurring The frequency of a recurring UsageTrigger * @return $this Fluent Builder */ public function setRecurring(string $recurring): self { $this->options['recurring'] = $recurring; return $this; } /** * The field in the [UsageRecord](https://www.twilio.com/docs/usage/api/usage-record) resource that should fire the trigger. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price). The default is `usage`. * * @param string $triggerBy The field in the UsageRecord resource that fires * the trigger * @return $this Fluent Builder */ public function setTriggerBy(string $triggerBy): self { $this->options['triggerBy'] = $triggerBy; 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.Api.V2010.CreateTriggerOptions ' . $options . ']'; } } class ReadTriggerOptions extends Options { /** * @param string $recurring The frequency of recurring UsageTriggers to read * @param string $triggerBy The trigger field of the UsageTriggers to read * @param string $usageCategory The usage category of the UsageTriggers to read */ public function __construct(string $recurring = Values::NONE, string $triggerBy = Values::NONE, string $usageCategory = Values::NONE) { $this->options['recurring'] = $recurring; $this->options['triggerBy'] = $triggerBy; $this->options['usageCategory'] = $usageCategory; } /** * The frequency of recurring UsageTriggers to read. Can be: `daily`, `monthly`, or `yearly` to read recurring UsageTriggers. An empty value or a value of `alltime` reads non-recurring UsageTriggers. * * @param string $recurring The frequency of recurring UsageTriggers to read * @return $this Fluent Builder */ public function setRecurring(string $recurring): self { $this->options['recurring'] = $recurring; return $this; } /** * The trigger field of the UsageTriggers to read. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price). * * @param string $triggerBy The trigger field of the UsageTriggers to read * @return $this Fluent Builder */ public function setTriggerBy(string $triggerBy): self { $this->options['triggerBy'] = $triggerBy; return $this; } /** * The usage category of the UsageTriggers to read. Must be a supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). * * @param string $usageCategory The usage category of the UsageTriggers to read * @return $this Fluent Builder */ public function setUsageCategory(string $usageCategory): self { $this->options['usageCategory'] = $usageCategory; 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.Api.V2010.ReadTriggerOptions ' . $options . ']'; } } V2010/Account/Usage/RecordList.php 0000644 00000022612 15111164165 0012503 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\Usage\Record\AllTimeList; use Twilio\Rest\Api\V2010\Account\Usage\Record\DailyList; use Twilio\Rest\Api\V2010\Account\Usage\Record\LastMonthList; use Twilio\Rest\Api\V2010\Account\Usage\Record\MonthlyList; use Twilio\Rest\Api\V2010\Account\Usage\Record\ThisMonthList; use Twilio\Rest\Api\V2010\Account\Usage\Record\TodayList; use Twilio\Rest\Api\V2010\Account\Usage\Record\YearlyList; use Twilio\Rest\Api\V2010\Account\Usage\Record\YesterdayList; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; /** * @property AllTimeList $allTime * @property DailyList $daily * @property LastMonthList $lastMonth * @property MonthlyList $monthly * @property ThisMonthList $thisMonth * @property TodayList $today * @property YearlyList $yearly * @property YesterdayList $yesterday */ class RecordList extends ListResource { protected $_allTime = null; protected $_daily = null; protected $_lastMonth = null; protected $_monthly = null; protected $_thisMonth = null; protected $_today = null; protected $_yearly = null; protected $_yesterday = null; /** * Construct the RecordList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records.json'; } /** * Streams RecordInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RecordInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 RecordInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of RecordInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 RecordPage Page of RecordInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RecordPage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RecordPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RecordInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RecordPage Page of RecordInstance */ public function getPage(string $targetUrl): RecordPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RecordPage($this->version, $response, $this->solution); } /** * Access the allTime */ protected function getAllTime(): AllTimeList { if (!$this->_allTime) { $this->_allTime = new AllTimeList($this->version, $this->solution['accountSid']); } return $this->_allTime; } /** * Access the daily */ protected function getDaily(): DailyList { if (!$this->_daily) { $this->_daily = new DailyList($this->version, $this->solution['accountSid']); } return $this->_daily; } /** * Access the lastMonth */ protected function getLastMonth(): LastMonthList { if (!$this->_lastMonth) { $this->_lastMonth = new LastMonthList($this->version, $this->solution['accountSid']); } return $this->_lastMonth; } /** * Access the monthly */ protected function getMonthly(): MonthlyList { if (!$this->_monthly) { $this->_monthly = new MonthlyList($this->version, $this->solution['accountSid']); } return $this->_monthly; } /** * Access the thisMonth */ protected function getThisMonth(): ThisMonthList { if (!$this->_thisMonth) { $this->_thisMonth = new ThisMonthList($this->version, $this->solution['accountSid']); } return $this->_thisMonth; } /** * Access the today */ protected function getToday(): TodayList { if (!$this->_today) { $this->_today = new TodayList($this->version, $this->solution['accountSid']); } return $this->_today; } /** * Access the yearly */ protected function getYearly(): YearlyList { if (!$this->_yearly) { $this->_yearly = new YearlyList($this->version, $this->solution['accountSid']); } return $this->_yearly; } /** * Access the yesterday */ protected function getYesterday(): YesterdayList { if (!$this->_yesterday) { $this->_yesterday = new YesterdayList($this->version, $this->solution['accountSid']); } return $this->_yesterday; } /** * 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.Api.V2010.RecordList]'; } } V2010/Account/Usage/TriggerInstance.php 0000644 00000012160 15111164166 0013517 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property string $callbackMethod * @property string $callbackUrl * @property string $currentValue * @property \DateTime $dateCreated * @property \DateTime $dateFired * @property \DateTime $dateUpdated * @property string $friendlyName * @property string $recurring * @property string $sid * @property string $triggerBy * @property string $triggerValue * @property string $uri * @property string $usageCategory * @property string $usageRecordUri */ class TriggerInstance extends InstanceResource { /** * Initialize the TriggerInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'callbackMethod' => Values::array_get($payload, 'callback_method'), 'callbackUrl' => Values::array_get($payload, 'callback_url'), 'currentValue' => Values::array_get($payload, 'current_value'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateFired' => Deserialize::dateTime(Values::array_get($payload, 'date_fired')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'recurring' => Values::array_get($payload, 'recurring'), 'sid' => Values::array_get($payload, 'sid'), 'triggerBy' => Values::array_get($payload, 'trigger_by'), 'triggerValue' => Values::array_get($payload, 'trigger_value'), 'uri' => Values::array_get($payload, 'uri'), 'usageCategory' => Values::array_get($payload, 'usage_category'), 'usageRecordUri' => Values::array_get($payload, 'usage_record_uri'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TriggerContext Context for this TriggerInstance */ protected function proxy(): TriggerContext { if (!$this->context) { $this->context = new TriggerContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the TriggerInstance * * @return TriggerInstance Fetched TriggerInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TriggerInstance { return $this->proxy()->fetch(); } /** * Update the TriggerInstance * * @param array|Options $options Optional Arguments * @return TriggerInstance Updated TriggerInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TriggerInstance { return $this->proxy()->update($options); } /** * Delete the TriggerInstance * * @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.Api.V2010.TriggerInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Usage/RecordInstance.php 0000644 00000006253 15111164166 0013340 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property string $asOf * @property string $category * @property string $count * @property string $countUnit * @property string $description * @property \DateTime $endDate * @property string $price * @property string $priceUnit * @property \DateTime $startDate * @property array $subresourceUris * @property string $uri * @property string $usage * @property string $usageUnit */ class RecordInstance extends InstanceResource { /** * Initialize the RecordInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.RecordInstance]'; } } V2010/Account/Usage/TriggerList.php 0000644 00000014755 15111164167 0012703 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Usage; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class TriggerList extends ListResource { /** * Construct the TriggerList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Triggers.json'; } /** * Create the TriggerInstance * * @param string $callbackUrl The URL we call when the trigger fires * @param string $triggerValue The usage value at which the trigger should fire * @param string $usageCategory The usage category the trigger watches * @param array|Options $options Optional Arguments * @return TriggerInstance Created TriggerInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $callbackUrl, string $triggerValue, string $usageCategory, array $options = []): TriggerInstance { $options = new Values($options); $data = Values::of([ 'CallbackUrl' => $callbackUrl, 'TriggerValue' => $triggerValue, 'UsageCategory' => $usageCategory, 'CallbackMethod' => $options['callbackMethod'], 'FriendlyName' => $options['friendlyName'], 'Recurring' => $options['recurring'], 'TriggerBy' => $options['triggerBy'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TriggerInstance($this->version, $payload, $this->solution['accountSid']); } /** * Streams TriggerInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TriggerInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 TriggerInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of TriggerInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 TriggerPage Page of TriggerInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TriggerPage { $options = new Values($options); $params = Values::of([ 'Recurring' => $options['recurring'], 'TriggerBy' => $options['triggerBy'], 'UsageCategory' => $options['usageCategory'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TriggerPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TriggerInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TriggerPage Page of TriggerInstance */ public function getPage(string $targetUrl): TriggerPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TriggerPage($this->version, $response, $this->solution); } /** * Constructs a TriggerContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): TriggerContext { return new TriggerContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TriggerList]'; } } V2010/Account/ConnectAppList.php 0000644 00000011423 15111164167 0012253 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class ConnectAppList extends ListResource { /** * Construct the ConnectAppList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/ConnectApps.json'; } /** * Streams ConnectAppInstance 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 ConnectAppInstance 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 ConnectAppInstance[] 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 ConnectAppInstance 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 ConnectAppPage Page of ConnectAppInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ConnectAppPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ConnectAppPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ConnectAppInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ConnectAppPage Page of ConnectAppInstance */ public function getPage(string $targetUrl): ConnectAppPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ConnectAppPage($this->version, $response, $this->solution); } /** * Constructs a ConnectAppContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ConnectAppContext { return new ConnectAppContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ConnectAppList]'; } } V2010/Account/TokenInstance.php 0000644 00000004574 15111164167 0012143 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string[] $iceServers * @property string $password * @property string $ttl * @property string $username */ class TokenInstance extends InstanceResource { /** * Initialize the TokenInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'iceServers' => Values::array_get($payload, 'ice_servers'), 'password' => Values::array_get($payload, 'password'), 'ttl' => Values::array_get($payload, 'ttl'), 'username' => Values::array_get($payload, 'username'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.TokenInstance]'; } } V2010/Account/ConnectAppOptions.php 0000644 00000016255 15111164170 0012775 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class ConnectAppOptions { /** * @param string $authorizeRedirectUrl The URL to redirect the user to after * authorization * @param string $companyName The company name to set for the Connect App * @param string $deauthorizeCallbackMethod The HTTP method to use when calling * deauthorize_callback_url * @param string $deauthorizeCallbackUrl The URL to call to de-authorize the * Connect App * @param string $description A description of the Connect App * @param string $friendlyName A string to describe the resource * @param string $homepageUrl A public URL where users can obtain more * information * @param string[] $permissions The set of permissions that your ConnectApp * will request * @return UpdateConnectAppOptions Options builder */ public static function update(string $authorizeRedirectUrl = Values::NONE, string $companyName = Values::NONE, string $deauthorizeCallbackMethod = Values::NONE, string $deauthorizeCallbackUrl = Values::NONE, string $description = Values::NONE, string $friendlyName = Values::NONE, string $homepageUrl = Values::NONE, array $permissions = Values::ARRAY_NONE): UpdateConnectAppOptions { return new UpdateConnectAppOptions($authorizeRedirectUrl, $companyName, $deauthorizeCallbackMethod, $deauthorizeCallbackUrl, $description, $friendlyName, $homepageUrl, $permissions); } } class UpdateConnectAppOptions extends Options { /** * @param string $authorizeRedirectUrl The URL to redirect the user to after * authorization * @param string $companyName The company name to set for the Connect App * @param string $deauthorizeCallbackMethod The HTTP method to use when calling * deauthorize_callback_url * @param string $deauthorizeCallbackUrl The URL to call to de-authorize the * Connect App * @param string $description A description of the Connect App * @param string $friendlyName A string to describe the resource * @param string $homepageUrl A public URL where users can obtain more * information * @param string[] $permissions The set of permissions that your ConnectApp * will request */ public function __construct(string $authorizeRedirectUrl = Values::NONE, string $companyName = Values::NONE, string $deauthorizeCallbackMethod = Values::NONE, string $deauthorizeCallbackUrl = Values::NONE, string $description = Values::NONE, string $friendlyName = Values::NONE, string $homepageUrl = Values::NONE, array $permissions = Values::ARRAY_NONE) { $this->options['authorizeRedirectUrl'] = $authorizeRedirectUrl; $this->options['companyName'] = $companyName; $this->options['deauthorizeCallbackMethod'] = $deauthorizeCallbackMethod; $this->options['deauthorizeCallbackUrl'] = $deauthorizeCallbackUrl; $this->options['description'] = $description; $this->options['friendlyName'] = $friendlyName; $this->options['homepageUrl'] = $homepageUrl; $this->options['permissions'] = $permissions; } /** * The URL to redirect the user to after we authenticate the user and obtain authorization to access the Connect App. * * @param string $authorizeRedirectUrl The URL to redirect the user to after * authorization * @return $this Fluent Builder */ public function setAuthorizeRedirectUrl(string $authorizeRedirectUrl): self { $this->options['authorizeRedirectUrl'] = $authorizeRedirectUrl; return $this; } /** * The company name to set for the Connect App. * * @param string $companyName The company name to set for the Connect App * @return $this Fluent Builder */ public function setCompanyName(string $companyName): self { $this->options['companyName'] = $companyName; return $this; } /** * The HTTP method to use when calling `deauthorize_callback_url`. * * @param string $deauthorizeCallbackMethod The HTTP method to use when calling * deauthorize_callback_url * @return $this Fluent Builder */ public function setDeauthorizeCallbackMethod(string $deauthorizeCallbackMethod): self { $this->options['deauthorizeCallbackMethod'] = $deauthorizeCallbackMethod; return $this; } /** * The URL to call using the `deauthorize_callback_method` to de-authorize the Connect App. * * @param string $deauthorizeCallbackUrl The URL to call to de-authorize the * Connect App * @return $this Fluent Builder */ public function setDeauthorizeCallbackUrl(string $deauthorizeCallbackUrl): self { $this->options['deauthorizeCallbackUrl'] = $deauthorizeCallbackUrl; return $this; } /** * A description of the Connect App. * * @param string $description A description of the Connect App * @return $this Fluent Builder */ public function setDescription(string $description): self { $this->options['description'] = $description; return $this; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * A public URL where users can obtain more information about this Connect App. * * @param string $homepageUrl A public URL where users can obtain more * information * @return $this Fluent Builder */ public function setHomepageUrl(string $homepageUrl): self { $this->options['homepageUrl'] = $homepageUrl; return $this; } /** * A comma-separated list of the permissions you will request from the users of this ConnectApp. Can include: `get-all` and `post-all`. * * @param string[] $permissions The set of permissions that your ConnectApp * will request * @return $this Fluent Builder */ public function setPermissions(array $permissions): self { $this->options['permissions'] = $permissions; 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.Api.V2010.UpdateConnectAppOptions ' . $options . ']'; } } V2010/Account/Recording/TranscriptionContext.php 0000644 00000004600 15111164170 0015476 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Recording; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; class TranscriptionContext extends InstanceContext { /** * Initialize the TranscriptionContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $recordingSid The SID of the recording that created the * transcriptions to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $recordingSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'recordingSid' => $recordingSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($recordingSid) . '/Transcriptions/' . \rawurlencode($sid) . '.json'; } /** * Fetch the TranscriptionInstance * * @return TranscriptionInstance Fetched TranscriptionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TranscriptionInstance { $payload = $this->version->fetch('GET', $this->uri); return new TranscriptionInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['recordingSid'], $this->solution['sid'] ); } /** * Delete the TranscriptionInstance * * @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.Api.V2010.TranscriptionContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Recording/AddOnResult/PayloadList.php 0000644 00000012715 15111164170 0015711 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Recording\AddOnResult; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class PayloadList extends ListResource { /** * Construct the PayloadList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $referenceSid The SID of the recording to which the * AddOnResult resource that contains the payload * belongs * @param string $addOnResultSid The SID of the AddOnResult to which the * payload belongs */ public function __construct(Version $version, string $accountSid, string $referenceSid, string $addOnResultSid) { parent::__construct($version); // Path Solution $this->solution = [ 'accountSid' => $accountSid, 'referenceSid' => $referenceSid, 'addOnResultSid' => $addOnResultSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($referenceSid) . '/AddOnResults/' . \rawurlencode($addOnResultSid) . '/Payloads.json'; } /** * Streams PayloadInstance 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 PayloadInstance 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 PayloadInstance[] 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 PayloadInstance 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 PayloadPage Page of PayloadInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): PayloadPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new PayloadPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of PayloadInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return PayloadPage Page of PayloadInstance */ public function getPage(string $targetUrl): PayloadPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new PayloadPage($this->version, $response, $this->solution); } /** * Constructs a PayloadContext * * @param string $sid The unique string that identifies the resource to fetch */ public function getContext(string $sid): PayloadContext { return new PayloadContext( $this->version, $this->solution['accountSid'], $this->solution['referenceSid'], $this->solution['addOnResultSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.PayloadList]'; } } V2010/Account/Recording/AddOnResult/PayloadPage.php 0000644 00000002536 15111164171 0015653 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Recording\AddOnResult; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class PayloadPage 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 PayloadInstance \Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadInstance */ public function buildInstance(array $payload): PayloadInstance { return new PayloadInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['referenceSid'], $this->solution['addOnResultSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.PayloadPage]'; } } V2010/Account/Recording/AddOnResult/PayloadInstance.php 0000644 00000011475 15111164171 0016545 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Recording\AddOnResult; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $sid * @property string $addOnResultSid * @property string $accountSid * @property string $label * @property string $addOnSid * @property string $addOnConfigurationSid * @property string $contentType * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $referenceSid * @property array $subresourceUris */ class PayloadInstance extends InstanceResource { /** * Initialize the PayloadInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $referenceSid The SID of the recording to which the * AddOnResult resource that contains the payload * belongs * @param string $addOnResultSid The SID of the AddOnResult to which the * payload belongs * @param string $sid The unique string that identifies the resource to fetch */ public function __construct(Version $version, array $payload, string $accountSid, string $referenceSid, string $addOnResultSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'sid' => Values::array_get($payload, 'sid'), 'addOnResultSid' => Values::array_get($payload, 'add_on_result_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'label' => Values::array_get($payload, 'label'), 'addOnSid' => Values::array_get($payload, 'add_on_sid'), 'addOnConfigurationSid' => Values::array_get($payload, 'add_on_configuration_sid'), 'contentType' => Values::array_get($payload, 'content_type'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'referenceSid' => Values::array_get($payload, 'reference_sid'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), ]; $this->solution = [ 'accountSid' => $accountSid, 'referenceSid' => $referenceSid, 'addOnResultSid' => $addOnResultSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return PayloadContext Context for this PayloadInstance */ protected function proxy(): PayloadContext { if (!$this->context) { $this->context = new PayloadContext( $this->version, $this->solution['accountSid'], $this->solution['referenceSid'], $this->solution['addOnResultSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the PayloadInstance * * @return PayloadInstance Fetched PayloadInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PayloadInstance { return $this->proxy()->fetch(); } /** * Delete the PayloadInstance * * @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.Api.V2010.PayloadInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Recording/AddOnResult/PayloadContext.php 0000644 00000005375 15111164171 0016427 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Recording\AddOnResult; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; class PayloadContext extends InstanceContext { /** * Initialize the PayloadContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $referenceSid The SID of the recording to which the * AddOnResult resource that contains the payload * to fetch belongs * @param string $addOnResultSid The SID of the AddOnResult to which the * payload to fetch belongs * @param string $sid The unique string that identifies the resource to fetch */ public function __construct(Version $version, $accountSid, $referenceSid, $addOnResultSid, $sid) { parent::__construct($version); // Path Solution $this->solution = [ 'accountSid' => $accountSid, 'referenceSid' => $referenceSid, 'addOnResultSid' => $addOnResultSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($referenceSid) . '/AddOnResults/' . \rawurlencode($addOnResultSid) . '/Payloads/' . \rawurlencode($sid) . '.json'; } /** * Fetch the PayloadInstance * * @return PayloadInstance Fetched PayloadInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PayloadInstance { $payload = $this->version->fetch('GET', $this->uri); return new PayloadInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['referenceSid'], $this->solution['addOnResultSid'], $this->solution['sid'] ); } /** * Delete the PayloadInstance * * @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.Api.V2010.PayloadContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Recording/TranscriptionList.php 0000644 00000012227 15111164172 0014773 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Recording; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class TranscriptionList extends ListResource { /** * Construct the TranscriptionList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $recordingSid The SID that identifies the transcription's * recording */ public function __construct(Version $version, string $accountSid, string $recordingSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'recordingSid' => $recordingSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($recordingSid) . '/Transcriptions.json'; } /** * Streams TranscriptionInstance 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 TranscriptionInstance 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 TranscriptionInstance[] 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 TranscriptionInstance 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 TranscriptionPage Page of TranscriptionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TranscriptionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TranscriptionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TranscriptionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TranscriptionPage Page of TranscriptionInstance */ public function getPage(string $targetUrl): TranscriptionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TranscriptionPage($this->version, $response, $this->solution); } /** * Constructs a TranscriptionContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): TranscriptionContext { return new TranscriptionContext( $this->version, $this->solution['accountSid'], $this->solution['recordingSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TranscriptionList]'; } } V2010/Account/Recording/AddOnResultPage.php 0000644 00000002457 15111164172 0014265 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Recording; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class AddOnResultPage 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 AddOnResultInstance \Twilio\Rest\Api\V2010\Account\Recording\AddOnResultInstance */ public function buildInstance(array $payload): AddOnResultInstance { return new AddOnResultInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['referenceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AddOnResultPage]'; } } V2010/Account/Recording/TranscriptionPage.php 0000644 00000002473 15111164172 0014736 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Recording; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class TranscriptionPage 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 TranscriptionInstance \Twilio\Rest\Api\V2010\Account\Recording\TranscriptionInstance */ public function buildInstance(array $payload): TranscriptionInstance { return new TranscriptionInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['recordingSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TranscriptionPage]'; } } V2010/Account/Recording/AddOnResultList.php 0000644 00000012205 15111164172 0014314 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Recording; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class AddOnResultList extends ListResource { /** * Construct the AddOnResultList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $referenceSid The SID of the recording to which the * AddOnResult resource belongs */ public function __construct(Version $version, string $accountSid, string $referenceSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'referenceSid' => $referenceSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($referenceSid) . '/AddOnResults.json'; } /** * Streams AddOnResultInstance 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 AddOnResultInstance 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 AddOnResultInstance[] 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 AddOnResultInstance 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 AddOnResultPage Page of AddOnResultInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AddOnResultPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AddOnResultPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AddOnResultInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AddOnResultPage Page of AddOnResultInstance */ public function getPage(string $targetUrl): AddOnResultPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AddOnResultPage($this->version, $response, $this->solution); } /** * Constructs a AddOnResultContext * * @param string $sid The unique string that identifies the resource to fetch */ public function getContext(string $sid): AddOnResultContext { return new AddOnResultContext( $this->version, $this->solution['accountSid'], $this->solution['referenceSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AddOnResultList]'; } } V2010/Account/Recording/AddOnResultContext.php 0000644 00000010170 15111164173 0015025 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Recording; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadList; use Twilio\Values; use Twilio\Version; /** * @property PayloadList $payloads * @method \Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadContext payloads(string $sid) */ class AddOnResultContext extends InstanceContext { protected $_payloads; /** * Initialize the AddOnResultContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $referenceSid The SID of the recording to which the result to * fetch belongs * @param string $sid The unique string that identifies the resource to fetch */ public function __construct(Version $version, $accountSid, $referenceSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'referenceSid' => $referenceSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($referenceSid) . '/AddOnResults/' . \rawurlencode($sid) . '.json'; } /** * Fetch the AddOnResultInstance * * @return AddOnResultInstance Fetched AddOnResultInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AddOnResultInstance { $payload = $this->version->fetch('GET', $this->uri); return new AddOnResultInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['referenceSid'], $this->solution['sid'] ); } /** * Delete the AddOnResultInstance * * @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); } /** * Access the payloads */ protected function getPayloads(): PayloadList { if (!$this->_payloads) { $this->_payloads = new PayloadList( $this->version, $this->solution['accountSid'], $this->solution['referenceSid'], $this->solution['sid'] ); } return $this->_payloads; } /** * 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.Api.V2010.AddOnResultContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Recording/TranscriptionInstance.php 0000644 00000011220 15111164173 0015615 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Recording; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $duration * @property string $price * @property string $priceUnit * @property string $recordingSid * @property string $sid * @property string $status * @property string $transcriptionText * @property string $type * @property string $uri */ class TranscriptionInstance extends InstanceResource { /** * Initialize the TranscriptionInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $recordingSid The SID that identifies the transcription's * recording * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $recordingSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'duration' => Values::array_get($payload, 'duration'), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'recordingSid' => Values::array_get($payload, 'recording_sid'), 'sid' => Values::array_get($payload, 'sid'), 'status' => Values::array_get($payload, 'status'), 'transcriptionText' => Values::array_get($payload, 'transcription_text'), 'type' => Values::array_get($payload, 'type'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'recordingSid' => $recordingSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TranscriptionContext Context for this TranscriptionInstance */ protected function proxy(): TranscriptionContext { if (!$this->context) { $this->context = new TranscriptionContext( $this->version, $this->solution['accountSid'], $this->solution['recordingSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the TranscriptionInstance * * @return TranscriptionInstance Fetched TranscriptionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TranscriptionInstance { return $this->proxy()->fetch(); } /** * Delete the TranscriptionInstance * * @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.Api.V2010.TranscriptionInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Recording/AddOnResultInstance.php 0000644 00000011302 15111164173 0015143 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Recording; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadList; use Twilio\Values; use Twilio\Version; /** * @property string $sid * @property string $accountSid * @property string $status * @property string $addOnSid * @property string $addOnConfigurationSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property \DateTime $dateCompleted * @property string $referenceSid * @property array $subresourceUris */ class AddOnResultInstance extends InstanceResource { protected $_payloads; /** * Initialize the AddOnResultInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $referenceSid The SID of the recording to which the * AddOnResult resource belongs * @param string $sid The unique string that identifies the resource to fetch */ public function __construct(Version $version, array $payload, string $accountSid, string $referenceSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'status' => Values::array_get($payload, 'status'), 'addOnSid' => Values::array_get($payload, 'add_on_sid'), 'addOnConfigurationSid' => Values::array_get($payload, 'add_on_configuration_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'dateCompleted' => Deserialize::dateTime(Values::array_get($payload, 'date_completed')), 'referenceSid' => Values::array_get($payload, 'reference_sid'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), ]; $this->solution = [ 'accountSid' => $accountSid, 'referenceSid' => $referenceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AddOnResultContext Context for this AddOnResultInstance */ protected function proxy(): AddOnResultContext { if (!$this->context) { $this->context = new AddOnResultContext( $this->version, $this->solution['accountSid'], $this->solution['referenceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AddOnResultInstance * * @return AddOnResultInstance Fetched AddOnResultInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AddOnResultInstance { return $this->proxy()->fetch(); } /** * Delete the AddOnResultInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the payloads */ protected function getPayloads(): PayloadList { return $this->proxy()->payloads; } /** * 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.Api.V2010.AddOnResultInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/KeyInstance.php 0000644 00000007437 15111164173 0011611 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; /** * @property string $sid * @property string $friendlyName * @property \DateTime $dateCreated * @property \DateTime $dateUpdated */ class KeyInstance extends InstanceResource { /** * Initialize the KeyInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return KeyContext Context for this KeyInstance */ protected function proxy(): KeyContext { if (!$this->context) { $this->context = new KeyContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the KeyInstance * * @return KeyInstance Fetched KeyInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): KeyInstance { return $this->proxy()->fetch(); } /** * Update the KeyInstance * * @param array|Options $options Optional Arguments * @return KeyInstance Updated KeyInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): KeyInstance { return $this->proxy()->update($options); } /** * Delete the KeyInstance * * @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.Api.V2010.KeyInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/KeyPage.php 0000644 00000002220 15111164174 0010703 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class KeyPage 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 KeyInstance \Twilio\Rest\Api\V2010\Account\KeyInstance */ public function buildInstance(array $payload): KeyInstance { return new KeyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.KeyPage]'; } } V2010/Account/IncomingPhoneNumber/AssignedAddOnList.php 0000644 00000014043 15111164174 0016571 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. */ class AssignedAddOnList extends ListResource { /** * Construct the AssignedAddOnList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $resourceSid The SID of the Phone Number that installed this * Add-on */ public function __construct(Version $version, string $accountSid, string $resourceSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'resourceSid' => $resourceSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . \rawurlencode($resourceSid) . '/AssignedAddOns.json'; } /** * Streams AssignedAddOnInstance 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 AssignedAddOnInstance 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 AssignedAddOnInstance[] 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 AssignedAddOnInstance 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 AssignedAddOnPage Page of AssignedAddOnInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AssignedAddOnPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AssignedAddOnPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AssignedAddOnInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AssignedAddOnPage Page of AssignedAddOnInstance */ public function getPage(string $targetUrl): AssignedAddOnPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AssignedAddOnPage($this->version, $response, $this->solution); } /** * Create the AssignedAddOnInstance * * @param string $installedAddOnSid The SID that identifies the Add-on * installation * @return AssignedAddOnInstance Created AssignedAddOnInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $installedAddOnSid): AssignedAddOnInstance { $data = Values::of(['InstalledAddOnSid' => $installedAddOnSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AssignedAddOnInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['resourceSid'] ); } /** * Constructs a AssignedAddOnContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): AssignedAddOnContext { return new AssignedAddOnContext( $this->version, $this->solution['accountSid'], $this->solution['resourceSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AssignedAddOnList]'; } } V2010/Account/IncomingPhoneNumber/LocalPage.php 0000644 00000002304 15111164174 0015116 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class LocalPage 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 LocalInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\LocalInstance */ public function buildInstance(array $payload): LocalInstance { return new LocalInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.LocalPage]'; } } V2010/Account/IncomingPhoneNumber/LocalList.php 0000644 00000016035 15111164174 0015163 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class LocalList extends ListResource { /** * Construct the LocalList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/Local.json'; } /** * Streams LocalInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads LocalInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 LocalInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of LocalInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 LocalPage Page of LocalInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): LocalPage { $options = new Values($options); $params = Values::of([ 'Beta' => Serialize::booleanToString($options['beta']), 'FriendlyName' => $options['friendlyName'], 'PhoneNumber' => $options['phoneNumber'], 'Origin' => $options['origin'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new LocalPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of LocalInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return LocalPage Page of LocalInstance */ public function getPage(string $targetUrl): LocalPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new LocalPage($this->version, $response, $this->solution); } /** * Create the LocalInstance * * @param string $phoneNumber The phone number to purchase in E.164 format * @param array|Options $options Optional Arguments * @return LocalInstance Created LocalInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $phoneNumber, array $options = []): LocalInstance { $options = new Values($options); $data = Values::of([ 'PhoneNumber' => $phoneNumber, 'ApiVersion' => $options['apiVersion'], 'FriendlyName' => $options['friendlyName'], 'SmsApplicationSid' => $options['smsApplicationSid'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsUrl' => $options['smsUrl'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'VoiceApplicationSid' => $options['voiceApplicationSid'], 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']), 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceUrl' => $options['voiceUrl'], 'IdentitySid' => $options['identitySid'], 'AddressSid' => $options['addressSid'], 'EmergencyStatus' => $options['emergencyStatus'], 'EmergencyAddressSid' => $options['emergencyAddressSid'], 'TrunkSid' => $options['trunkSid'], 'VoiceReceiveMode' => $options['voiceReceiveMode'], 'BundleSid' => $options['bundleSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new LocalInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.LocalList]'; } } V2010/Account/IncomingPhoneNumber/LocalInstance.php 0000644 00000012615 15111164174 0016014 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $addressSid * @property string $addressRequirements * @property string $apiVersion * @property bool $beta * @property string $capabilities * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $friendlyName * @property string $identitySid * @property string $phoneNumber * @property string $origin * @property string $sid * @property string $smsApplicationSid * @property string $smsFallbackMethod * @property string $smsFallbackUrl * @property string $smsMethod * @property string $smsUrl * @property string $statusCallback * @property string $statusCallbackMethod * @property string $trunkSid * @property string $uri * @property string $voiceReceiveMode * @property string $voiceApplicationSid * @property bool $voiceCallerIdLookup * @property string $voiceFallbackMethod * @property string $voiceFallbackUrl * @property string $voiceMethod * @property string $voiceUrl * @property string $emergencyStatus * @property string $emergencyAddressSid * @property string $emergencyAddressStatus * @property string $bundleSid * @property string $status */ class LocalInstance extends InstanceResource { /** * Initialize the LocalInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'addressSid' => Values::array_get($payload, 'address_sid'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'identitySid' => Values::array_get($payload, 'identity_sid'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'origin' => Values::array_get($payload, 'origin'), 'sid' => Values::array_get($payload, 'sid'), 'smsApplicationSid' => Values::array_get($payload, 'sms_application_sid'), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'trunkSid' => Values::array_get($payload, 'trunk_sid'), 'uri' => Values::array_get($payload, 'uri'), 'voiceReceiveMode' => Values::array_get($payload, 'voice_receive_mode'), 'voiceApplicationSid' => Values::array_get($payload, 'voice_application_sid'), 'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'emergencyStatus' => Values::array_get($payload, 'emergency_status'), 'emergencyAddressSid' => Values::array_get($payload, 'emergency_address_sid'), 'emergencyAddressStatus' => Values::array_get($payload, 'emergency_address_status'), 'bundleSid' => Values::array_get($payload, 'bundle_sid'), 'status' => Values::array_get($payload, 'status'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.LocalInstance]'; } } V2010/Account/IncomingPhoneNumber/AssignedAddOnContext.php 0000644 00000010547 15111164174 0017307 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionList; use Twilio\Values; use Twilio\Version; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. * * @property AssignedAddOnExtensionList $extensions * @method \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionContext extensions(string $sid) */ class AssignedAddOnContext extends InstanceContext { protected $_extensions; /** * Initialize the AssignedAddOnContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $resourceSid The SID of the Phone Number that installed this * Add-on * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $resourceSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'resourceSid' => $resourceSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . \rawurlencode($resourceSid) . '/AssignedAddOns/' . \rawurlencode($sid) . '.json'; } /** * Fetch the AssignedAddOnInstance * * @return AssignedAddOnInstance Fetched AssignedAddOnInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssignedAddOnInstance { $payload = $this->version->fetch('GET', $this->uri); return new AssignedAddOnInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['resourceSid'], $this->solution['sid'] ); } /** * Delete the AssignedAddOnInstance * * @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); } /** * Access the extensions */ protected function getExtensions(): AssignedAddOnExtensionList { if (!$this->_extensions) { $this->_extensions = new AssignedAddOnExtensionList( $this->version, $this->solution['accountSid'], $this->solution['resourceSid'], $this->solution['sid'] ); } return $this->_extensions; } /** * 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.Api.V2010.AssignedAddOnContext ' . \implode(' ', $context) . ']'; } } V2010/Account/IncomingPhoneNumber/TollFreePage.php 0000644 00000002326 15111164175 0015605 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class TollFreePage 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 TollFreeInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\TollFreeInstance */ public function buildInstance(array $payload): TollFreeInstance { return new TollFreeInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TollFreePage]'; } } V2010/Account/IncomingPhoneNumber/MobileList.php 0000644 00000016063 15111164175 0015342 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class MobileList extends ListResource { /** * Construct the MobileList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/Mobile.json'; } /** * Streams MobileInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MobileInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 MobileInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MobileInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 MobilePage Page of MobileInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MobilePage { $options = new Values($options); $params = Values::of([ 'Beta' => Serialize::booleanToString($options['beta']), 'FriendlyName' => $options['friendlyName'], 'PhoneNumber' => $options['phoneNumber'], 'Origin' => $options['origin'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MobilePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MobileInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MobilePage Page of MobileInstance */ public function getPage(string $targetUrl): MobilePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MobilePage($this->version, $response, $this->solution); } /** * Create the MobileInstance * * @param string $phoneNumber The phone number to purchase in E.164 format * @param array|Options $options Optional Arguments * @return MobileInstance Created MobileInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $phoneNumber, array $options = []): MobileInstance { $options = new Values($options); $data = Values::of([ 'PhoneNumber' => $phoneNumber, 'ApiVersion' => $options['apiVersion'], 'FriendlyName' => $options['friendlyName'], 'SmsApplicationSid' => $options['smsApplicationSid'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsUrl' => $options['smsUrl'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'VoiceApplicationSid' => $options['voiceApplicationSid'], 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']), 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceUrl' => $options['voiceUrl'], 'IdentitySid' => $options['identitySid'], 'AddressSid' => $options['addressSid'], 'EmergencyStatus' => $options['emergencyStatus'], 'EmergencyAddressSid' => $options['emergencyAddressSid'], 'TrunkSid' => $options['trunkSid'], 'VoiceReceiveMode' => $options['voiceReceiveMode'], 'BundleSid' => $options['bundleSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new MobileInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MobileList]'; } } V2010/Account/IncomingPhoneNumber/MobileOptions.php 0000644 00000055611 15111164175 0016064 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber; use Twilio\Options; use Twilio\Values; abstract class MobileOptions { /** * @param bool $beta Whether to include new phone numbers * @param string $friendlyName A string that identifies the resources to read * @param string $phoneNumber The phone numbers of the resources to read * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. * @return ReadMobileOptions Options builder */ public static function read(bool $beta = Values::NONE, string $friendlyName = Values::NONE, string $phoneNumber = Values::NONE, string $origin = Values::NONE): ReadMobileOptions { return new ReadMobileOptions($beta, $friendlyName, $phoneNumber, $origin); } /** * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @param string $friendlyName A string to describe the new phone number * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @param string $smsMethod The HTTP method to use with sms url * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @param string $voiceMethod The HTTP method used with the voice_url * @param string $voiceUrl The URL we should call when the phone number * receives a call * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @param string $addressSid The SID of the Address resource associated with * the phone number * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @param string $voiceReceiveMode Incoming call type: fax or voice * @param string $bundleSid The SID of the Bundle resource associated with * number * @return CreateMobileOptions Options builder */ public static function create(string $apiVersion = Values::NONE, string $friendlyName = Values::NONE, string $smsApplicationSid = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsUrl = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $voiceApplicationSid = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceUrl = Values::NONE, string $identitySid = Values::NONE, string $addressSid = Values::NONE, string $emergencyStatus = Values::NONE, string $emergencyAddressSid = Values::NONE, string $trunkSid = Values::NONE, string $voiceReceiveMode = Values::NONE, string $bundleSid = Values::NONE): CreateMobileOptions { return new CreateMobileOptions($apiVersion, $friendlyName, $smsApplicationSid, $smsFallbackMethod, $smsFallbackUrl, $smsMethod, $smsUrl, $statusCallback, $statusCallbackMethod, $voiceApplicationSid, $voiceCallerIdLookup, $voiceFallbackMethod, $voiceFallbackUrl, $voiceMethod, $voiceUrl, $identitySid, $addressSid, $emergencyStatus, $emergencyAddressSid, $trunkSid, $voiceReceiveMode, $bundleSid); } } class ReadMobileOptions extends Options { /** * @param bool $beta Whether to include new phone numbers * @param string $friendlyName A string that identifies the resources to read * @param string $phoneNumber The phone numbers of the resources to read * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. */ public function __construct(bool $beta = Values::NONE, string $friendlyName = Values::NONE, string $phoneNumber = Values::NONE, string $origin = Values::NONE) { $this->options['beta'] = $beta; $this->options['friendlyName'] = $friendlyName; $this->options['phoneNumber'] = $phoneNumber; $this->options['origin'] = $origin; } /** * Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to include new phone numbers * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * A string that identifies the resources to read. * * @param string $friendlyName A string that identifies the resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. * * @param string $phoneNumber The phone numbers of the resources to read * @return $this Fluent Builder */ public function setPhoneNumber(string $phoneNumber): self { $this->options['phoneNumber'] = $phoneNumber; return $this; } /** * Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. * * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. * @return $this Fluent Builder */ public function setOrigin(string $origin): self { $this->options['origin'] = $origin; 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.Api.V2010.ReadMobileOptions ' . $options . ']'; } } class CreateMobileOptions extends Options { /** * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @param string $friendlyName A string to describe the new phone number * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @param string $smsMethod The HTTP method to use with sms url * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @param string $voiceMethod The HTTP method used with the voice_url * @param string $voiceUrl The URL we should call when the phone number * receives a call * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @param string $addressSid The SID of the Address resource associated with * the phone number * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @param string $voiceReceiveMode Incoming call type: fax or voice * @param string $bundleSid The SID of the Bundle resource associated with * number */ public function __construct(string $apiVersion = Values::NONE, string $friendlyName = Values::NONE, string $smsApplicationSid = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsUrl = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $voiceApplicationSid = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceUrl = Values::NONE, string $identitySid = Values::NONE, string $addressSid = Values::NONE, string $emergencyStatus = Values::NONE, string $emergencyAddressSid = Values::NONE, string $trunkSid = Values::NONE, string $voiceReceiveMode = Values::NONE, string $bundleSid = Values::NONE) { $this->options['apiVersion'] = $apiVersion; $this->options['friendlyName'] = $friendlyName; $this->options['smsApplicationSid'] = $smsApplicationSid; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsUrl'] = $smsUrl; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['voiceApplicationSid'] = $voiceApplicationSid; $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceUrl'] = $voiceUrl; $this->options['identitySid'] = $identitySid; $this->options['addressSid'] = $addressSid; $this->options['emergencyStatus'] = $emergencyStatus; $this->options['emergencyAddressSid'] = $emergencyAddressSid; $this->options['trunkSid'] = $trunkSid; $this->options['voiceReceiveMode'] = $voiceReceiveMode; $this->options['bundleSid'] = $bundleSid; } /** * The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. * * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @return $this Fluent Builder */ public function setApiVersion(string $apiVersion): self { $this->options['apiVersion'] = $apiVersion; return $this; } /** * A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, the is a formatted version of the phone number. * * @param string $friendlyName A string to describe the new phone number * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those of the application. * * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @return $this Fluent Builder */ public function setSmsApplicationSid(string $smsApplicationSid): self { $this->options['smsApplicationSid'] = $smsApplicationSid; return $this; } /** * The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. * * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsMethod The HTTP method to use with sms url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL we should call when the new phone number receives an incoming SMS message. * * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. * * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @return $this Fluent Builder */ public function setVoiceApplicationSid(string $voiceApplicationSid): self { $this->options['voiceApplicationSid'] = $voiceApplicationSid; return $this; } /** * Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. * * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @return $this Fluent Builder */ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self { $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; return $this; } /** * The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. * * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceMethod The HTTP method used with the voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * * @param string $voiceUrl The URL we should call when the phone number * receives a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. * * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @return $this Fluent Builder */ public function setIdentitySid(string $identitySid): self { $this->options['identitySid'] = $identitySid; return $this; } /** * The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. * * @param string $addressSid The SID of the Address resource associated with * the phone number * @return $this Fluent Builder */ public function setAddressSid(string $addressSid): self { $this->options['addressSid'] = $addressSid; return $this; } /** * The parameter displays if emergency calling is enabled for this number. Active numbers may place emergency calls by dialing valid emergency numbers for the country. * * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @return $this Fluent Builder */ public function setEmergencyStatus(string $emergencyStatus): self { $this->options['emergencyStatus'] = $emergencyStatus; return $this; } /** * The SID of the emergency address configuration to use for emergency calling from the new phone number. * * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @return $this Fluent Builder */ public function setEmergencyAddressSid(string $emergencyAddressSid): self { $this->options['emergencyAddressSid'] = $emergencyAddressSid; return $this; } /** * The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. * * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @return $this Fluent Builder */ public function setTrunkSid(string $trunkSid): self { $this->options['trunkSid'] = $trunkSid; return $this; } /** * The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * * @param string $voiceReceiveMode Incoming call type: fax or voice * @return $this Fluent Builder */ public function setVoiceReceiveMode(string $voiceReceiveMode): self { $this->options['voiceReceiveMode'] = $voiceReceiveMode; return $this; } /** * The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. * * @param string $bundleSid The SID of the Bundle resource associated with * number * @return $this Fluent Builder */ public function setBundleSid(string $bundleSid): self { $this->options['bundleSid'] = $bundleSid; 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.Api.V2010.CreateMobileOptions ' . $options . ']'; } } V2010/Account/IncomingPhoneNumber/TollFreeInstance.php 0000644 00000012626 15111164175 0016501 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $addressSid * @property string $addressRequirements * @property string $apiVersion * @property bool $beta * @property string $capabilities * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $friendlyName * @property string $identitySid * @property string $phoneNumber * @property string $origin * @property string $sid * @property string $smsApplicationSid * @property string $smsFallbackMethod * @property string $smsFallbackUrl * @property string $smsMethod * @property string $smsUrl * @property string $statusCallback * @property string $statusCallbackMethod * @property string $trunkSid * @property string $uri * @property string $voiceReceiveMode * @property string $voiceApplicationSid * @property bool $voiceCallerIdLookup * @property string $voiceFallbackMethod * @property string $voiceFallbackUrl * @property string $voiceMethod * @property string $voiceUrl * @property string $emergencyStatus * @property string $emergencyAddressSid * @property string $emergencyAddressStatus * @property string $bundleSid * @property string $status */ class TollFreeInstance extends InstanceResource { /** * Initialize the TollFreeInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'addressSid' => Values::array_get($payload, 'address_sid'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'identitySid' => Values::array_get($payload, 'identity_sid'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'origin' => Values::array_get($payload, 'origin'), 'sid' => Values::array_get($payload, 'sid'), 'smsApplicationSid' => Values::array_get($payload, 'sms_application_sid'), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'trunkSid' => Values::array_get($payload, 'trunk_sid'), 'uri' => Values::array_get($payload, 'uri'), 'voiceReceiveMode' => Values::array_get($payload, 'voice_receive_mode'), 'voiceApplicationSid' => Values::array_get($payload, 'voice_application_sid'), 'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'emergencyStatus' => Values::array_get($payload, 'emergency_status'), 'emergencyAddressSid' => Values::array_get($payload, 'emergency_address_sid'), 'emergencyAddressStatus' => Values::array_get($payload, 'emergency_address_status'), 'bundleSid' => Values::array_get($payload, 'bundle_sid'), 'status' => Values::array_get($payload, 'status'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.TollFreeInstance]'; } } V2010/Account/IncomingPhoneNumber/MobileInstance.php 0000644 00000012620 15111164175 0016166 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $addressSid * @property string $addressRequirements * @property string $apiVersion * @property bool $beta * @property string $capabilities * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $friendlyName * @property string $identitySid * @property string $phoneNumber * @property string $origin * @property string $sid * @property string $smsApplicationSid * @property string $smsFallbackMethod * @property string $smsFallbackUrl * @property string $smsMethod * @property string $smsUrl * @property string $statusCallback * @property string $statusCallbackMethod * @property string $trunkSid * @property string $uri * @property string $voiceReceiveMode * @property string $voiceApplicationSid * @property bool $voiceCallerIdLookup * @property string $voiceFallbackMethod * @property string $voiceFallbackUrl * @property string $voiceMethod * @property string $voiceUrl * @property string $emergencyStatus * @property string $emergencyAddressSid * @property string $emergencyAddressStatus * @property string $bundleSid * @property string $status */ class MobileInstance extends InstanceResource { /** * Initialize the MobileInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'addressSid' => Values::array_get($payload, 'address_sid'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'identitySid' => Values::array_get($payload, 'identity_sid'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'origin' => Values::array_get($payload, 'origin'), 'sid' => Values::array_get($payload, 'sid'), 'smsApplicationSid' => Values::array_get($payload, 'sms_application_sid'), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'trunkSid' => Values::array_get($payload, 'trunk_sid'), 'uri' => Values::array_get($payload, 'uri'), 'voiceReceiveMode' => Values::array_get($payload, 'voice_receive_mode'), 'voiceApplicationSid' => Values::array_get($payload, 'voice_application_sid'), 'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'emergencyStatus' => Values::array_get($payload, 'emergency_status'), 'emergencyAddressSid' => Values::array_get($payload, 'emergency_address_sid'), 'emergencyAddressStatus' => Values::array_get($payload, 'emergency_address_status'), 'bundleSid' => Values::array_get($payload, 'bundle_sid'), 'status' => Values::array_get($payload, 'status'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.MobileInstance]'; } } V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionList.php 0000644 00000013516 15111164176 0023137 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. */ class AssignedAddOnExtensionList extends ListResource { /** * Construct the AssignedAddOnExtensionList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $resourceSid The SID of the Phone Number to which the Add-on * is assigned * @param string $assignedAddOnSid The SID that uniquely identifies the * assigned Add-on installation */ public function __construct(Version $version, string $accountSid, string $resourceSid, string $assignedAddOnSid) { parent::__construct($version); // Path Solution $this->solution = [ 'accountSid' => $accountSid, 'resourceSid' => $resourceSid, 'assignedAddOnSid' => $assignedAddOnSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . \rawurlencode($resourceSid) . '/AssignedAddOns/' . \rawurlencode($assignedAddOnSid) . '/Extensions.json'; } /** * Streams AssignedAddOnExtensionInstance 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 AssignedAddOnExtensionInstance 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 AssignedAddOnExtensionInstance[] 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 AssignedAddOnExtensionInstance 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 AssignedAddOnExtensionPage Page of AssignedAddOnExtensionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AssignedAddOnExtensionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AssignedAddOnExtensionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AssignedAddOnExtensionInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AssignedAddOnExtensionPage Page of AssignedAddOnExtensionInstance */ public function getPage(string $targetUrl): AssignedAddOnExtensionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AssignedAddOnExtensionPage($this->version, $response, $this->solution); } /** * Constructs a AssignedAddOnExtensionContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): AssignedAddOnExtensionContext { return new AssignedAddOnExtensionContext( $this->version, $this->solution['accountSid'], $this->solution['resourceSid'], $this->solution['assignedAddOnSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AssignedAddOnExtensionList]'; } } V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionInstance.php 0000644 00000010756 15111164176 0023773 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. * * @property string $sid * @property string $accountSid * @property string $resourceSid * @property string $assignedAddOnSid * @property string $friendlyName * @property string $productName * @property string $uniqueName * @property string $uri * @property bool $enabled */ class AssignedAddOnExtensionInstance extends InstanceResource { /** * Initialize the AssignedAddOnExtensionInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $resourceSid The SID of the Phone Number to which the Add-on * is assigned * @param string $assignedAddOnSid The SID that uniquely identifies the * assigned Add-on installation * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $resourceSid, string $assignedAddOnSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'resourceSid' => Values::array_get($payload, 'resource_sid'), 'assignedAddOnSid' => Values::array_get($payload, 'assigned_add_on_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'productName' => Values::array_get($payload, 'product_name'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'uri' => Values::array_get($payload, 'uri'), 'enabled' => Values::array_get($payload, 'enabled'), ]; $this->solution = [ 'accountSid' => $accountSid, 'resourceSid' => $resourceSid, 'assignedAddOnSid' => $assignedAddOnSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AssignedAddOnExtensionContext Context for this * AssignedAddOnExtensionInstance */ protected function proxy(): AssignedAddOnExtensionContext { if (!$this->context) { $this->context = new AssignedAddOnExtensionContext( $this->version, $this->solution['accountSid'], $this->solution['resourceSid'], $this->solution['assignedAddOnSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AssignedAddOnExtensionInstance * * @return AssignedAddOnExtensionInstance Fetched AssignedAddOnExtensionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssignedAddOnExtensionInstance { 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.Api.V2010.AssignedAddOnExtensionInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionContext.php 0000644 00000005231 15111164176 0023643 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. */ class AssignedAddOnExtensionContext extends InstanceContext { /** * Initialize the AssignedAddOnExtensionContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $resourceSid The SID of the Phone Number to which the Add-on * is assigned * @param string $assignedAddOnSid The SID that uniquely identifies the * assigned Add-on installation * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $resourceSid, $assignedAddOnSid, $sid) { parent::__construct($version); // Path Solution $this->solution = [ 'accountSid' => $accountSid, 'resourceSid' => $resourceSid, 'assignedAddOnSid' => $assignedAddOnSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . \rawurlencode($resourceSid) . '/AssignedAddOns/' . \rawurlencode($assignedAddOnSid) . '/Extensions/' . \rawurlencode($sid) . '.json'; } /** * Fetch the AssignedAddOnExtensionInstance * * @return AssignedAddOnExtensionInstance Fetched AssignedAddOnExtensionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssignedAddOnExtensionInstance { $payload = $this->version->fetch('GET', $this->uri); return new AssignedAddOnExtensionInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['resourceSid'], $this->solution['assignedAddOnSid'], $this->solution['sid'] ); } /** * 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.Api.V2010.AssignedAddOnExtensionContext ' . \implode(' ', $context) . ']'; } } V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionPage.php 0000644 00000003102 15111164176 0023066 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. */ class AssignedAddOnExtensionPage 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 AssignedAddOnExtensionInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionInstance */ public function buildInstance(array $payload): AssignedAddOnExtensionInstance { return new AssignedAddOnExtensionInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['resourceSid'], $this->solution['assignedAddOnSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AssignedAddOnExtensionPage]'; } } V2010/Account/IncomingPhoneNumber/LocalOptions.php 0000644 00000056007 15111164176 0015710 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber; use Twilio\Options; use Twilio\Values; abstract class LocalOptions { /** * @param bool $beta Whether to include new phone numbers * @param string $friendlyName A string that identifies the resources to read * @param string $phoneNumber The phone numbers of the resources to read * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. * @return ReadLocalOptions Options builder */ public static function read(bool $beta = Values::NONE, string $friendlyName = Values::NONE, string $phoneNumber = Values::NONE, string $origin = Values::NONE): ReadLocalOptions { return new ReadLocalOptions($beta, $friendlyName, $phoneNumber, $origin); } /** * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @param string $friendlyName A string to describe the new phone number * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @param string $smsFallbackMethod The HTTP method we use to call * status_callback * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @param string $smsMethod The HTTP method to use with sms url * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod HTTP method we should use to call * status_callback * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @param string $voiceMethod The HTTP method used with the voice_url * @param string $voiceUrl The URL we should call when the phone number * receives a call * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @param string $addressSid The SID of the Address resource associated with * the phone number * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @param string $voiceReceiveMode Incoming call type: fax or voice * @param string $bundleSid The SID of the Bundle resource associated with * number * @return CreateLocalOptions Options builder */ public static function create(string $apiVersion = Values::NONE, string $friendlyName = Values::NONE, string $smsApplicationSid = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsUrl = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $voiceApplicationSid = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceUrl = Values::NONE, string $identitySid = Values::NONE, string $addressSid = Values::NONE, string $emergencyStatus = Values::NONE, string $emergencyAddressSid = Values::NONE, string $trunkSid = Values::NONE, string $voiceReceiveMode = Values::NONE, string $bundleSid = Values::NONE): CreateLocalOptions { return new CreateLocalOptions($apiVersion, $friendlyName, $smsApplicationSid, $smsFallbackMethod, $smsFallbackUrl, $smsMethod, $smsUrl, $statusCallback, $statusCallbackMethod, $voiceApplicationSid, $voiceCallerIdLookup, $voiceFallbackMethod, $voiceFallbackUrl, $voiceMethod, $voiceUrl, $identitySid, $addressSid, $emergencyStatus, $emergencyAddressSid, $trunkSid, $voiceReceiveMode, $bundleSid); } } class ReadLocalOptions extends Options { /** * @param bool $beta Whether to include new phone numbers * @param string $friendlyName A string that identifies the resources to read * @param string $phoneNumber The phone numbers of the resources to read * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. */ public function __construct(bool $beta = Values::NONE, string $friendlyName = Values::NONE, string $phoneNumber = Values::NONE, string $origin = Values::NONE) { $this->options['beta'] = $beta; $this->options['friendlyName'] = $friendlyName; $this->options['phoneNumber'] = $phoneNumber; $this->options['origin'] = $origin; } /** * Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to include new phone numbers * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * A string that identifies the resources to read. * * @param string $friendlyName A string that identifies the resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. * * @param string $phoneNumber The phone numbers of the resources to read * @return $this Fluent Builder */ public function setPhoneNumber(string $phoneNumber): self { $this->options['phoneNumber'] = $phoneNumber; return $this; } /** * Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. * * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. * @return $this Fluent Builder */ public function setOrigin(string $origin): self { $this->options['origin'] = $origin; 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.Api.V2010.ReadLocalOptions ' . $options . ']'; } } class CreateLocalOptions extends Options { /** * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @param string $friendlyName A string to describe the new phone number * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @param string $smsFallbackMethod The HTTP method we use to call * status_callback * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @param string $smsMethod The HTTP method to use with sms url * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod HTTP method we should use to call * status_callback * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @param string $voiceMethod The HTTP method used with the voice_url * @param string $voiceUrl The URL we should call when the phone number * receives a call * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @param string $addressSid The SID of the Address resource associated with * the phone number * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @param string $voiceReceiveMode Incoming call type: fax or voice * @param string $bundleSid The SID of the Bundle resource associated with * number */ public function __construct(string $apiVersion = Values::NONE, string $friendlyName = Values::NONE, string $smsApplicationSid = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsUrl = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $voiceApplicationSid = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceUrl = Values::NONE, string $identitySid = Values::NONE, string $addressSid = Values::NONE, string $emergencyStatus = Values::NONE, string $emergencyAddressSid = Values::NONE, string $trunkSid = Values::NONE, string $voiceReceiveMode = Values::NONE, string $bundleSid = Values::NONE) { $this->options['apiVersion'] = $apiVersion; $this->options['friendlyName'] = $friendlyName; $this->options['smsApplicationSid'] = $smsApplicationSid; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsUrl'] = $smsUrl; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['voiceApplicationSid'] = $voiceApplicationSid; $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceUrl'] = $voiceUrl; $this->options['identitySid'] = $identitySid; $this->options['addressSid'] = $addressSid; $this->options['emergencyStatus'] = $emergencyStatus; $this->options['emergencyAddressSid'] = $emergencyAddressSid; $this->options['trunkSid'] = $trunkSid; $this->options['voiceReceiveMode'] = $voiceReceiveMode; $this->options['bundleSid'] = $bundleSid; } /** * The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. * * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @return $this Fluent Builder */ public function setApiVersion(string $apiVersion): self { $this->options['apiVersion'] = $apiVersion; return $this; } /** * A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. * * @param string $friendlyName A string to describe the new phone number * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. * * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @return $this Fluent Builder */ public function setSmsApplicationSid(string $smsApplicationSid): self { $this->options['smsApplicationSid'] = $smsApplicationSid; return $this; } /** * The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsFallbackMethod The HTTP method we use to call * status_callback * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. * * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsMethod The HTTP method to use with sms url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL we should call when the new phone number receives an incoming SMS message. * * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $statusCallbackMethod HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. * * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @return $this Fluent Builder */ public function setVoiceApplicationSid(string $voiceApplicationSid): self { $this->options['voiceApplicationSid'] = $voiceApplicationSid; return $this; } /** * Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. * * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @return $this Fluent Builder */ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self { $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; return $this; } /** * The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. * * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceMethod The HTTP method used with the voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * * @param string $voiceUrl The URL we should call when the phone number * receives a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. * * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @return $this Fluent Builder */ public function setIdentitySid(string $identitySid): self { $this->options['identitySid'] = $identitySid; return $this; } /** * The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. * * @param string $addressSid The SID of the Address resource associated with * the phone number * @return $this Fluent Builder */ public function setAddressSid(string $addressSid): self { $this->options['addressSid'] = $addressSid; return $this; } /** * The parameter displays if emergency calling is enabled for this number. Active numbers may place emergency calls by dialing valid emergency numbers for the country. * * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @return $this Fluent Builder */ public function setEmergencyStatus(string $emergencyStatus): self { $this->options['emergencyStatus'] = $emergencyStatus; return $this; } /** * The SID of the emergency address configuration to use for emergency calling from the new phone number. * * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @return $this Fluent Builder */ public function setEmergencyAddressSid(string $emergencyAddressSid): self { $this->options['emergencyAddressSid'] = $emergencyAddressSid; return $this; } /** * The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. * * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @return $this Fluent Builder */ public function setTrunkSid(string $trunkSid): self { $this->options['trunkSid'] = $trunkSid; return $this; } /** * The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * * @param string $voiceReceiveMode Incoming call type: fax or voice * @return $this Fluent Builder */ public function setVoiceReceiveMode(string $voiceReceiveMode): self { $this->options['voiceReceiveMode'] = $voiceReceiveMode; return $this; } /** * The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. * * @param string $bundleSid The SID of the Bundle resource associated with * number * @return $this Fluent Builder */ public function setBundleSid(string $bundleSid): self { $this->options['bundleSid'] = $bundleSid; 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.Api.V2010.CreateLocalOptions ' . $options . ']'; } } V2010/Account/IncomingPhoneNumber/AssignedAddOnPage.php 0000644 00000002677 15111164177 0016547 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. */ class AssignedAddOnPage 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 AssignedAddOnInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnInstance */ public function buildInstance(array $payload): AssignedAddOnInstance { return new AssignedAddOnInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['resourceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AssignedAddOnPage]'; } } V2010/Account/IncomingPhoneNumber/AssignedAddOnInstance.php 0000644 00000011621 15111164177 0017424 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionList; use Twilio\Values; use Twilio\Version; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. * * @property string $sid * @property string $accountSid * @property string $resourceSid * @property string $friendlyName * @property string $description * @property array $configuration * @property string $uniqueName * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $uri * @property array $subresourceUris */ class AssignedAddOnInstance extends InstanceResource { protected $_extensions; /** * Initialize the AssignedAddOnInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $resourceSid The SID of the Phone Number that installed this * Add-on * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, array $payload, string $accountSid, string $resourceSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'resourceSid' => Values::array_get($payload, 'resource_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'description' => Values::array_get($payload, 'description'), 'configuration' => Values::array_get($payload, 'configuration'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'uri' => Values::array_get($payload, 'uri'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), ]; $this->solution = [ 'accountSid' => $accountSid, 'resourceSid' => $resourceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AssignedAddOnContext Context for this AssignedAddOnInstance */ protected function proxy(): AssignedAddOnContext { if (!$this->context) { $this->context = new AssignedAddOnContext( $this->version, $this->solution['accountSid'], $this->solution['resourceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AssignedAddOnInstance * * @return AssignedAddOnInstance Fetched AssignedAddOnInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssignedAddOnInstance { return $this->proxy()->fetch(); } /** * Delete the AssignedAddOnInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the extensions */ protected function getExtensions(): AssignedAddOnExtensionList { return $this->proxy()->extensions; } /** * 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.Api.V2010.AssignedAddOnInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/IncomingPhoneNumber/MobilePage.php 0000644 00000002312 15111164177 0015275 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class MobilePage 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 MobileInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\MobileInstance */ public function buildInstance(array $payload): MobileInstance { return new MobileInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MobilePage]'; } } V2010/Account/IncomingPhoneNumber/TollFreeList.php 0000644 00000016137 15111164177 0015653 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class TollFreeList extends ListResource { /** * Construct the TollFreeList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/TollFree.json'; } /** * Streams TollFreeInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TollFreeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 TollFreeInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of TollFreeInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 TollFreePage Page of TollFreeInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TollFreePage { $options = new Values($options); $params = Values::of([ 'Beta' => Serialize::booleanToString($options['beta']), 'FriendlyName' => $options['friendlyName'], 'PhoneNumber' => $options['phoneNumber'], 'Origin' => $options['origin'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TollFreePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TollFreeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TollFreePage Page of TollFreeInstance */ public function getPage(string $targetUrl): TollFreePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TollFreePage($this->version, $response, $this->solution); } /** * Create the TollFreeInstance * * @param string $phoneNumber The phone number to purchase in E.164 format * @param array|Options $options Optional Arguments * @return TollFreeInstance Created TollFreeInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $phoneNumber, array $options = []): TollFreeInstance { $options = new Values($options); $data = Values::of([ 'PhoneNumber' => $phoneNumber, 'ApiVersion' => $options['apiVersion'], 'FriendlyName' => $options['friendlyName'], 'SmsApplicationSid' => $options['smsApplicationSid'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsUrl' => $options['smsUrl'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'VoiceApplicationSid' => $options['voiceApplicationSid'], 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']), 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceUrl' => $options['voiceUrl'], 'IdentitySid' => $options['identitySid'], 'AddressSid' => $options['addressSid'], 'EmergencyStatus' => $options['emergencyStatus'], 'EmergencyAddressSid' => $options['emergencyAddressSid'], 'TrunkSid' => $options['trunkSid'], 'VoiceReceiveMode' => $options['voiceReceiveMode'], 'BundleSid' => $options['bundleSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TollFreeInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TollFreeList]'; } } V2010/Account/IncomingPhoneNumber/TollFreeOptions.php 0000644 00000055551 15111164177 0016376 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber; use Twilio\Options; use Twilio\Values; abstract class TollFreeOptions { /** * @param bool $beta Whether to include new phone numbers * @param string $friendlyName A string that identifies the resources to read * @param string $phoneNumber The phone numbers of the resources to read * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. * @return ReadTollFreeOptions Options builder */ public static function read(bool $beta = Values::NONE, string $friendlyName = Values::NONE, string $phoneNumber = Values::NONE, string $origin = Values::NONE): ReadTollFreeOptions { return new ReadTollFreeOptions($beta, $friendlyName, $phoneNumber, $origin); } /** * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @param string $friendlyName A string to describe the new phone number * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @param string $smsMethod The HTTP method to use with sms_url * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @param string $statusCallback The URL to send status information to your * application * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @param string $voiceMethod The HTTP method used with the voice_url * @param string $voiceUrl The URL we should call when the phone number * receives a call * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @param string $addressSid The SID of the Address resource associated with * the phone number * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @param string $voiceReceiveMode Incoming call type: fax or voice * @param string $bundleSid The SID of the Bundle resource associated with * number * @return CreateTollFreeOptions Options builder */ public static function create(string $apiVersion = Values::NONE, string $friendlyName = Values::NONE, string $smsApplicationSid = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsUrl = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $voiceApplicationSid = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceUrl = Values::NONE, string $identitySid = Values::NONE, string $addressSid = Values::NONE, string $emergencyStatus = Values::NONE, string $emergencyAddressSid = Values::NONE, string $trunkSid = Values::NONE, string $voiceReceiveMode = Values::NONE, string $bundleSid = Values::NONE): CreateTollFreeOptions { return new CreateTollFreeOptions($apiVersion, $friendlyName, $smsApplicationSid, $smsFallbackMethod, $smsFallbackUrl, $smsMethod, $smsUrl, $statusCallback, $statusCallbackMethod, $voiceApplicationSid, $voiceCallerIdLookup, $voiceFallbackMethod, $voiceFallbackUrl, $voiceMethod, $voiceUrl, $identitySid, $addressSid, $emergencyStatus, $emergencyAddressSid, $trunkSid, $voiceReceiveMode, $bundleSid); } } class ReadTollFreeOptions extends Options { /** * @param bool $beta Whether to include new phone numbers * @param string $friendlyName A string that identifies the resources to read * @param string $phoneNumber The phone numbers of the resources to read * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. */ public function __construct(bool $beta = Values::NONE, string $friendlyName = Values::NONE, string $phoneNumber = Values::NONE, string $origin = Values::NONE) { $this->options['beta'] = $beta; $this->options['friendlyName'] = $friendlyName; $this->options['phoneNumber'] = $phoneNumber; $this->options['origin'] = $origin; } /** * Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to include new phone numbers * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * A string that identifies the resources to read. * * @param string $friendlyName A string that identifies the resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. * * @param string $phoneNumber The phone numbers of the resources to read * @return $this Fluent Builder */ public function setPhoneNumber(string $phoneNumber): self { $this->options['phoneNumber'] = $phoneNumber; return $this; } /** * Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. * * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. * @return $this Fluent Builder */ public function setOrigin(string $origin): self { $this->options['origin'] = $origin; 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.Api.V2010.ReadTollFreeOptions ' . $options . ']'; } } class CreateTollFreeOptions extends Options { /** * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @param string $friendlyName A string to describe the new phone number * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @param string $smsMethod The HTTP method to use with sms_url * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @param string $statusCallback The URL to send status information to your * application * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @param string $voiceMethod The HTTP method used with the voice_url * @param string $voiceUrl The URL we should call when the phone number * receives a call * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @param string $addressSid The SID of the Address resource associated with * the phone number * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @param string $voiceReceiveMode Incoming call type: fax or voice * @param string $bundleSid The SID of the Bundle resource associated with * number */ public function __construct(string $apiVersion = Values::NONE, string $friendlyName = Values::NONE, string $smsApplicationSid = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsUrl = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $voiceApplicationSid = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceUrl = Values::NONE, string $identitySid = Values::NONE, string $addressSid = Values::NONE, string $emergencyStatus = Values::NONE, string $emergencyAddressSid = Values::NONE, string $trunkSid = Values::NONE, string $voiceReceiveMode = Values::NONE, string $bundleSid = Values::NONE) { $this->options['apiVersion'] = $apiVersion; $this->options['friendlyName'] = $friendlyName; $this->options['smsApplicationSid'] = $smsApplicationSid; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsUrl'] = $smsUrl; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['voiceApplicationSid'] = $voiceApplicationSid; $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceUrl'] = $voiceUrl; $this->options['identitySid'] = $identitySid; $this->options['addressSid'] = $addressSid; $this->options['emergencyStatus'] = $emergencyStatus; $this->options['emergencyAddressSid'] = $emergencyAddressSid; $this->options['trunkSid'] = $trunkSid; $this->options['voiceReceiveMode'] = $voiceReceiveMode; $this->options['bundleSid'] = $bundleSid; } /** * The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. * * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @return $this Fluent Builder */ public function setApiVersion(string $apiVersion): self { $this->options['apiVersion'] = $apiVersion; return $this; } /** * A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. * * @param string $friendlyName A string to describe the new phone number * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. * * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @return $this Fluent Builder */ public function setSmsApplicationSid(string $smsApplicationSid): self { $this->options['smsApplicationSid'] = $smsApplicationSid; return $this; } /** * The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. * * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsMethod The HTTP method to use with sms_url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL we should call when the new phone number receives an incoming SMS message. * * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL to send status information to your * application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. * * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @return $this Fluent Builder */ public function setVoiceApplicationSid(string $voiceApplicationSid): self { $this->options['voiceApplicationSid'] = $voiceApplicationSid; return $this; } /** * Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. * * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @return $this Fluent Builder */ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self { $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; return $this; } /** * The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. * * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceMethod The HTTP method used with the voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * * @param string $voiceUrl The URL we should call when the phone number * receives a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The SID of the Identity resource that we should associate with the new phone number. Some regions require an Identity to meet local regulations. * * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @return $this Fluent Builder */ public function setIdentitySid(string $identitySid): self { $this->options['identitySid'] = $identitySid; return $this; } /** * The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. * * @param string $addressSid The SID of the Address resource associated with * the phone number * @return $this Fluent Builder */ public function setAddressSid(string $addressSid): self { $this->options['addressSid'] = $addressSid; return $this; } /** * The parameter displays if emergency calling is enabled for this number. Active numbers may place emergency calls by dialing valid emergency numbers for the country. * * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @return $this Fluent Builder */ public function setEmergencyStatus(string $emergencyStatus): self { $this->options['emergencyStatus'] = $emergencyStatus; return $this; } /** * The SID of the emergency address configuration to use for emergency calling from the new phone number. * * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @return $this Fluent Builder */ public function setEmergencyAddressSid(string $emergencyAddressSid): self { $this->options['emergencyAddressSid'] = $emergencyAddressSid; return $this; } /** * The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. * * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @return $this Fluent Builder */ public function setTrunkSid(string $trunkSid): self { $this->options['trunkSid'] = $trunkSid; return $this; } /** * The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * * @param string $voiceReceiveMode Incoming call type: fax or voice * @return $this Fluent Builder */ public function setVoiceReceiveMode(string $voiceReceiveMode): self { $this->options['voiceReceiveMode'] = $voiceReceiveMode; return $this; } /** * The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. * * @param string $bundleSid The SID of the Bundle resource associated with * number * @return $this Fluent Builder */ public function setBundleSid(string $bundleSid): self { $this->options['bundleSid'] = $bundleSid; 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.Api.V2010.CreateTollFreeOptions ' . $options . ']'; } } V2010/Account/SipInstance.php 0000644 00000003112 15111164200 0011565 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; class SipInstance extends InstanceResource { /** * Initialize the SipInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, array $payload, string $accountSid) { parent::__construct($version); $this->solution = ['accountSid' => $accountSid, ]; } /** * 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.Api.V2010.SipInstance]'; } } V2010/Account/NotificationContext.php 0000644 00000003471 15111164200 0013350 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; class NotificationContext extends InstanceContext { /** * Initialize the NotificationContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * to fetch * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Notifications/' . \rawurlencode($sid) . '.json'; } /** * Fetch the NotificationInstance * * @return NotificationInstance Fetched NotificationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NotificationInstance { $payload = $this->version->fetch('GET', $this->uri); return new NotificationInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * 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.Api.V2010.NotificationContext ' . \implode(' ', $context) . ']'; } } V2010/Account/QueueInstance.php 0000644 00000010737 15111164200 0012131 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\Queue\MemberList; use Twilio\Values; use Twilio\Version; /** * @property \DateTime $dateUpdated * @property int $currentSize * @property string $friendlyName * @property string $uri * @property string $accountSid * @property int $averageWaitTime * @property string $sid * @property \DateTime $dateCreated * @property int $maxSize */ class QueueInstance extends InstanceResource { protected $_members; /** * Initialize the QueueInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created this resource * @param string $sid The unique string that identifies this resource */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'currentSize' => Values::array_get($payload, 'current_size'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'uri' => Values::array_get($payload, 'uri'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'averageWaitTime' => Values::array_get($payload, 'average_wait_time'), 'sid' => Values::array_get($payload, 'sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'maxSize' => Values::array_get($payload, 'max_size'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return QueueContext Context for this QueueInstance */ protected function proxy(): QueueContext { if (!$this->context) { $this->context = new QueueContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the QueueInstance * * @return QueueInstance Fetched QueueInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): QueueInstance { return $this->proxy()->fetch(); } /** * Update the QueueInstance * * @param array|Options $options Optional Arguments * @return QueueInstance Updated QueueInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): QueueInstance { return $this->proxy()->update($options); } /** * Delete the QueueInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the members */ protected function getMembers(): MemberList { return $this->proxy()->members; } /** * 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.Api.V2010.QueueInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/ShortCodeOptions.php 0000644 00000016240 15111164201 0012622 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class ShortCodeOptions { /** * @param string $friendlyName A string to describe this resource * @param string $apiVersion The API version to use to start a new TwiML session * @param string $smsUrl URL Twilio will request when receiving an SMS * @param string $smsMethod HTTP method to use when requesting the sms url * @param string $smsFallbackUrl URL Twilio will request if an error occurs in * executing TwiML * @param string $smsFallbackMethod HTTP method Twilio will use with * sms_fallback_url * @return UpdateShortCodeOptions Options builder */ public static function update(string $friendlyName = Values::NONE, string $apiVersion = Values::NONE, string $smsUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsFallbackMethod = Values::NONE): UpdateShortCodeOptions { return new UpdateShortCodeOptions($friendlyName, $apiVersion, $smsUrl, $smsMethod, $smsFallbackUrl, $smsFallbackMethod); } /** * @param string $friendlyName The string that identifies the ShortCode * resources to read * @param string $shortCode Filter by ShortCode * @return ReadShortCodeOptions Options builder */ public static function read(string $friendlyName = Values::NONE, string $shortCode = Values::NONE): ReadShortCodeOptions { return new ReadShortCodeOptions($friendlyName, $shortCode); } } class UpdateShortCodeOptions extends Options { /** * @param string $friendlyName A string to describe this resource * @param string $apiVersion The API version to use to start a new TwiML session * @param string $smsUrl URL Twilio will request when receiving an SMS * @param string $smsMethod HTTP method to use when requesting the sms url * @param string $smsFallbackUrl URL Twilio will request if an error occurs in * executing TwiML * @param string $smsFallbackMethod HTTP method Twilio will use with * sms_fallback_url */ public function __construct(string $friendlyName = Values::NONE, string $apiVersion = Values::NONE, string $smsUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsFallbackMethod = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['apiVersion'] = $apiVersion; $this->options['smsUrl'] = $smsUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsFallbackMethod'] = $smsFallbackMethod; } /** * A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the `FriendlyName` is the short code. * * @param string $friendlyName A string to describe this resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. * * @param string $apiVersion The API version to use to start a new TwiML session * @return $this Fluent Builder */ public function setApiVersion(string $apiVersion): self { $this->options['apiVersion'] = $apiVersion; return $this; } /** * The URL we should call when receiving an incoming SMS message to this short code. * * @param string $smsUrl URL Twilio will request when receiving an SMS * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The HTTP method we should use when calling the `sms_url`. Can be: `GET` or `POST`. * * @param string $smsMethod HTTP method to use when requesting the sms url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL that we should call if an error occurs while retrieving or executing the TwiML from `sms_url`. * * @param string $smsFallbackUrl URL Twilio will request if an error occurs in * executing TwiML * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method that we should use to call the `sms_fallback_url`. Can be: `GET` or `POST`. * * @param string $smsFallbackMethod HTTP method Twilio will use with * sms_fallback_url * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; 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.Api.V2010.UpdateShortCodeOptions ' . $options . ']'; } } class ReadShortCodeOptions extends Options { /** * @param string $friendlyName The string that identifies the ShortCode * resources to read * @param string $shortCode Filter by ShortCode */ public function __construct(string $friendlyName = Values::NONE, string $shortCode = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['shortCode'] = $shortCode; } /** * The string that identifies the ShortCode resources to read. * * @param string $friendlyName The string that identifies the ShortCode * resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit. * * @param string $shortCode Filter by ShortCode * @return $this Fluent Builder */ public function setShortCode(string $shortCode): self { $this->options['shortCode'] = $shortCode; 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.Api.V2010.ReadShortCodeOptions ' . $options . ']'; } } V2010/Account/ApplicationPage.php 0000644 00000002300 15111164201 0012404 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class ApplicationPage 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 ApplicationInstance \Twilio\Rest\Api\V2010\Account\ApplicationInstance */ public function buildInstance(array $payload): ApplicationInstance { return new ApplicationInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ApplicationPage]'; } } V2010/Account/AddressContext.php 0000644 00000011734 15111164201 0012311 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\ListResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\Address\DependentPhoneNumberList; use Twilio\Serialize; use Twilio\Values; use Twilio\Version; /** * @property DependentPhoneNumberList $dependentPhoneNumbers */ class AddressContext extends InstanceContext { protected $_dependentPhoneNumbers; /** * Initialize the AddressContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that is responsible for * this address * @param string $sid The unique string that identifies the resource */ public function __construct(Version $version, $accountSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Addresses/' . \rawurlencode($sid) . '.json'; } /** * Delete the AddressInstance * * @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); } /** * Fetch the AddressInstance * * @return AddressInstance Fetched AddressInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AddressInstance { $payload = $this->version->fetch('GET', $this->uri); return new AddressInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the AddressInstance * * @param array|Options $options Optional Arguments * @return AddressInstance Updated AddressInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AddressInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'CustomerName' => $options['customerName'], 'Street' => $options['street'], 'City' => $options['city'], 'Region' => $options['region'], 'PostalCode' => $options['postalCode'], 'EmergencyEnabled' => Serialize::booleanToString($options['emergencyEnabled']), 'AutoCorrectAddress' => Serialize::booleanToString($options['autoCorrectAddress']), 'StreetSecondary' => $options['streetSecondary'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new AddressInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Access the dependentPhoneNumbers */ protected function getDependentPhoneNumbers(): DependentPhoneNumberList { if (!$this->_dependentPhoneNumbers) { $this->_dependentPhoneNumbers = new DependentPhoneNumberList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_dependentPhoneNumbers; } /** * 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.Api.V2010.AddressContext ' . \implode(' ', $context) . ']'; } } V2010/Account/AddressOptions.php 0000644 00000033152 15111164201 0012316 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class AddressOptions { /** * @param string $friendlyName A string to describe the new resource * @param bool $emergencyEnabled Whether to enable emergency calling on the new * address * @param bool $autoCorrectAddress Whether we should automatically correct the * address * @param string $streetSecondary The additional number and street address of * the address * @return CreateAddressOptions Options builder */ public static function create(string $friendlyName = Values::NONE, bool $emergencyEnabled = Values::NONE, bool $autoCorrectAddress = Values::NONE, string $streetSecondary = Values::NONE): CreateAddressOptions { return new CreateAddressOptions($friendlyName, $emergencyEnabled, $autoCorrectAddress, $streetSecondary); } /** * @param string $friendlyName A string to describe the resource * @param string $customerName The name to associate with the address * @param string $street The number and street address of the address * @param string $city The city of the address * @param string $region The state or region of the address * @param string $postalCode The postal code of the address * @param bool $emergencyEnabled Whether to enable emergency calling on the * address * @param bool $autoCorrectAddress Whether we should automatically correct the * address * @param string $streetSecondary The additional number and street address of * the address * @return UpdateAddressOptions Options builder */ public static function update(string $friendlyName = Values::NONE, string $customerName = Values::NONE, string $street = Values::NONE, string $city = Values::NONE, string $region = Values::NONE, string $postalCode = Values::NONE, bool $emergencyEnabled = Values::NONE, bool $autoCorrectAddress = Values::NONE, string $streetSecondary = Values::NONE): UpdateAddressOptions { return new UpdateAddressOptions($friendlyName, $customerName, $street, $city, $region, $postalCode, $emergencyEnabled, $autoCorrectAddress, $streetSecondary); } /** * @param string $customerName The `customer_name` of the Address resources to * read * @param string $friendlyName The string that identifies the Address resources * to read * @param string $isoCountry The ISO country code of the Address resources to * read * @return ReadAddressOptions Options builder */ public static function read(string $customerName = Values::NONE, string $friendlyName = Values::NONE, string $isoCountry = Values::NONE): ReadAddressOptions { return new ReadAddressOptions($customerName, $friendlyName, $isoCountry); } } class CreateAddressOptions extends Options { /** * @param string $friendlyName A string to describe the new resource * @param bool $emergencyEnabled Whether to enable emergency calling on the new * address * @param bool $autoCorrectAddress Whether we should automatically correct the * address * @param string $streetSecondary The additional number and street address of * the address */ public function __construct(string $friendlyName = Values::NONE, bool $emergencyEnabled = Values::NONE, bool $autoCorrectAddress = Values::NONE, string $streetSecondary = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['emergencyEnabled'] = $emergencyEnabled; $this->options['autoCorrectAddress'] = $autoCorrectAddress; $this->options['streetSecondary'] = $streetSecondary; } /** * A descriptive string that you create to describe the new address. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the new resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Whether to enable emergency calling on the new address. Can be: `true` or `false`. * * @param bool $emergencyEnabled Whether to enable emergency calling on the new * address * @return $this Fluent Builder */ public function setEmergencyEnabled(bool $emergencyEnabled): self { $this->options['emergencyEnabled'] = $emergencyEnabled; return $this; } /** * Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide. * * @param bool $autoCorrectAddress Whether we should automatically correct the * address * @return $this Fluent Builder */ public function setAutoCorrectAddress(bool $autoCorrectAddress): self { $this->options['autoCorrectAddress'] = $autoCorrectAddress; return $this; } /** * The additional number and street address of the address. * * @param string $streetSecondary The additional number and street address of * the address * @return $this Fluent Builder */ public function setStreetSecondary(string $streetSecondary): self { $this->options['streetSecondary'] = $streetSecondary; 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.Api.V2010.CreateAddressOptions ' . $options . ']'; } } class UpdateAddressOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $customerName The name to associate with the address * @param string $street The number and street address of the address * @param string $city The city of the address * @param string $region The state or region of the address * @param string $postalCode The postal code of the address * @param bool $emergencyEnabled Whether to enable emergency calling on the * address * @param bool $autoCorrectAddress Whether we should automatically correct the * address * @param string $streetSecondary The additional number and street address of * the address */ public function __construct(string $friendlyName = Values::NONE, string $customerName = Values::NONE, string $street = Values::NONE, string $city = Values::NONE, string $region = Values::NONE, string $postalCode = Values::NONE, bool $emergencyEnabled = Values::NONE, bool $autoCorrectAddress = Values::NONE, string $streetSecondary = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['customerName'] = $customerName; $this->options['street'] = $street; $this->options['city'] = $city; $this->options['region'] = $region; $this->options['postalCode'] = $postalCode; $this->options['emergencyEnabled'] = $emergencyEnabled; $this->options['autoCorrectAddress'] = $autoCorrectAddress; $this->options['streetSecondary'] = $streetSecondary; } /** * A descriptive string that you create to describe the address. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The name to associate with the address. * * @param string $customerName The name to associate with the address * @return $this Fluent Builder */ public function setCustomerName(string $customerName): self { $this->options['customerName'] = $customerName; return $this; } /** * The number and street address of the address. * * @param string $street The number and street address of the address * @return $this Fluent Builder */ public function setStreet(string $street): self { $this->options['street'] = $street; return $this; } /** * The city of the address. * * @param string $city The city of the address * @return $this Fluent Builder */ public function setCity(string $city): self { $this->options['city'] = $city; return $this; } /** * The state or region of the address. * * @param string $region The state or region of the address * @return $this Fluent Builder */ public function setRegion(string $region): self { $this->options['region'] = $region; return $this; } /** * The postal code of the address. * * @param string $postalCode The postal code of the address * @return $this Fluent Builder */ public function setPostalCode(string $postalCode): self { $this->options['postalCode'] = $postalCode; return $this; } /** * Whether to enable emergency calling on the address. Can be: `true` or `false`. * * @param bool $emergencyEnabled Whether to enable emergency calling on the * address * @return $this Fluent Builder */ public function setEmergencyEnabled(bool $emergencyEnabled): self { $this->options['emergencyEnabled'] = $emergencyEnabled; return $this; } /** * Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide. * * @param bool $autoCorrectAddress Whether we should automatically correct the * address * @return $this Fluent Builder */ public function setAutoCorrectAddress(bool $autoCorrectAddress): self { $this->options['autoCorrectAddress'] = $autoCorrectAddress; return $this; } /** * The additional number and street address of the address. * * @param string $streetSecondary The additional number and street address of * the address * @return $this Fluent Builder */ public function setStreetSecondary(string $streetSecondary): self { $this->options['streetSecondary'] = $streetSecondary; 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.Api.V2010.UpdateAddressOptions ' . $options . ']'; } } class ReadAddressOptions extends Options { /** * @param string $customerName The `customer_name` of the Address resources to * read * @param string $friendlyName The string that identifies the Address resources * to read * @param string $isoCountry The ISO country code of the Address resources to * read */ public function __construct(string $customerName = Values::NONE, string $friendlyName = Values::NONE, string $isoCountry = Values::NONE) { $this->options['customerName'] = $customerName; $this->options['friendlyName'] = $friendlyName; $this->options['isoCountry'] = $isoCountry; } /** * The `customer_name` of the Address resources to read. * * @param string $customerName The `customer_name` of the Address resources to * read * @return $this Fluent Builder */ public function setCustomerName(string $customerName): self { $this->options['customerName'] = $customerName; return $this; } /** * The string that identifies the Address resources to read. * * @param string $friendlyName The string that identifies the Address resources * to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The ISO country code of the Address resources to read. * * @param string $isoCountry The ISO country code of the Address resources to * read * @return $this Fluent Builder */ public function setIsoCountry(string $isoCountry): self { $this->options['isoCountry'] = $isoCountry; 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.Api.V2010.ReadAddressOptions ' . $options . ']'; } } V2010/Account/IncomingPhoneNumberOptions.php 0000644 00000131773 15111164202 0014650 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Options; use Twilio\Values; abstract class IncomingPhoneNumberOptions { /** * @param string $accountSid The SID of the Account that created the resource * to update * @param string $apiVersion The API version to use for incoming calls made to * the phone number * @param string $friendlyName A string to describe the resource * @param string $smsApplicationSid Unique string that identifies the * application * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @param string $smsMethod The HTTP method to use with sms_url * @param string $smsUrl The URL we should call when the phone number receives * an incoming SMS message * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @param string $voiceApplicationSid The SID of the application to handle the * phone number * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $voiceFallbackMethod The HTTP method used with fallback_url * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @param string $voiceMethod The HTTP method used with the voice_url * @param string $voiceUrl The URL we should call when the phone number * receives a call * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @param string $trunkSid SID of the trunk to handle phone calls to the phone * number * @param string $voiceReceiveMode Incoming call type: fax or voice * @param string $identitySid Unique string that identifies the identity * associated with number * @param string $addressSid The SID of the Address resource associated with * the phone number * @param string $bundleSid The SID of the Bundle resource associated with * number * @return UpdateIncomingPhoneNumberOptions Options builder */ public static function update(string $accountSid = Values::NONE, string $apiVersion = Values::NONE, string $friendlyName = Values::NONE, string $smsApplicationSid = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsUrl = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $voiceApplicationSid = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceUrl = Values::NONE, string $emergencyStatus = Values::NONE, string $emergencyAddressSid = Values::NONE, string $trunkSid = Values::NONE, string $voiceReceiveMode = Values::NONE, string $identitySid = Values::NONE, string $addressSid = Values::NONE, string $bundleSid = Values::NONE): UpdateIncomingPhoneNumberOptions { return new UpdateIncomingPhoneNumberOptions($accountSid, $apiVersion, $friendlyName, $smsApplicationSid, $smsFallbackMethod, $smsFallbackUrl, $smsMethod, $smsUrl, $statusCallback, $statusCallbackMethod, $voiceApplicationSid, $voiceCallerIdLookup, $voiceFallbackMethod, $voiceFallbackUrl, $voiceMethod, $voiceUrl, $emergencyStatus, $emergencyAddressSid, $trunkSid, $voiceReceiveMode, $identitySid, $addressSid, $bundleSid); } /** * @param bool $beta Whether to include new phone numbers * @param string $friendlyName A string that identifies the IncomingPhoneNumber * resources to read * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber * resources to read * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. * @return ReadIncomingPhoneNumberOptions Options builder */ public static function read(bool $beta = Values::NONE, string $friendlyName = Values::NONE, string $phoneNumber = Values::NONE, string $origin = Values::NONE): ReadIncomingPhoneNumberOptions { return new ReadIncomingPhoneNumberOptions($beta, $friendlyName, $phoneNumber, $origin); } /** * @param string $phoneNumber The phone number to purchase in E.164 format * @param string $areaCode The desired area code for the new phone number * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @param string $friendlyName A string to describe the new phone number * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @param string $smsMethod The HTTP method to use with sms url * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod HTTP method we should use to call * status_callback * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @param string $voiceMethod The HTTP method used with the voice_url * @param string $voiceUrl The URL we should call when the phone number * receives a call * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @param string $addressSid The SID of the Address resource associated with * the phone number * @param string $voiceReceiveMode Incoming call type: fax or voice * @param string $bundleSid The SID of the Bundle resource associated with * number * @return CreateIncomingPhoneNumberOptions Options builder */ public static function create(string $phoneNumber = Values::NONE, string $areaCode = Values::NONE, string $apiVersion = Values::NONE, string $friendlyName = Values::NONE, string $smsApplicationSid = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsUrl = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $voiceApplicationSid = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceUrl = Values::NONE, string $emergencyStatus = Values::NONE, string $emergencyAddressSid = Values::NONE, string $trunkSid = Values::NONE, string $identitySid = Values::NONE, string $addressSid = Values::NONE, string $voiceReceiveMode = Values::NONE, string $bundleSid = Values::NONE): CreateIncomingPhoneNumberOptions { return new CreateIncomingPhoneNumberOptions($phoneNumber, $areaCode, $apiVersion, $friendlyName, $smsApplicationSid, $smsFallbackMethod, $smsFallbackUrl, $smsMethod, $smsUrl, $statusCallback, $statusCallbackMethod, $voiceApplicationSid, $voiceCallerIdLookup, $voiceFallbackMethod, $voiceFallbackUrl, $voiceMethod, $voiceUrl, $emergencyStatus, $emergencyAddressSid, $trunkSid, $identitySid, $addressSid, $voiceReceiveMode, $bundleSid); } } class UpdateIncomingPhoneNumberOptions extends Options { /** * @param string $accountSid The SID of the Account that created the resource * to update * @param string $apiVersion The API version to use for incoming calls made to * the phone number * @param string $friendlyName A string to describe the resource * @param string $smsApplicationSid Unique string that identifies the * application * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @param string $smsMethod The HTTP method to use with sms_url * @param string $smsUrl The URL we should call when the phone number receives * an incoming SMS message * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @param string $voiceApplicationSid The SID of the application to handle the * phone number * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $voiceFallbackMethod The HTTP method used with fallback_url * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @param string $voiceMethod The HTTP method used with the voice_url * @param string $voiceUrl The URL we should call when the phone number * receives a call * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @param string $trunkSid SID of the trunk to handle phone calls to the phone * number * @param string $voiceReceiveMode Incoming call type: fax or voice * @param string $identitySid Unique string that identifies the identity * associated with number * @param string $addressSid The SID of the Address resource associated with * the phone number * @param string $bundleSid The SID of the Bundle resource associated with * number */ public function __construct(string $accountSid = Values::NONE, string $apiVersion = Values::NONE, string $friendlyName = Values::NONE, string $smsApplicationSid = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsUrl = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $voiceApplicationSid = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceUrl = Values::NONE, string $emergencyStatus = Values::NONE, string $emergencyAddressSid = Values::NONE, string $trunkSid = Values::NONE, string $voiceReceiveMode = Values::NONE, string $identitySid = Values::NONE, string $addressSid = Values::NONE, string $bundleSid = Values::NONE) { $this->options['accountSid'] = $accountSid; $this->options['apiVersion'] = $apiVersion; $this->options['friendlyName'] = $friendlyName; $this->options['smsApplicationSid'] = $smsApplicationSid; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsUrl'] = $smsUrl; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['voiceApplicationSid'] = $voiceApplicationSid; $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceUrl'] = $voiceUrl; $this->options['emergencyStatus'] = $emergencyStatus; $this->options['emergencyAddressSid'] = $emergencyAddressSid; $this->options['trunkSid'] = $trunkSid; $this->options['voiceReceiveMode'] = $voiceReceiveMode; $this->options['identitySid'] = $identitySid; $this->options['addressSid'] = $addressSid; $this->options['bundleSid'] = $bundleSid; } /** * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers). * * @param string $accountSid The SID of the Account that created the resource * to update * @return $this Fluent Builder */ public function setAccountSid(string $accountSid): self { $this->options['accountSid'] = $accountSid; return $this; } /** * The API version to use for incoming calls made to the phone number. The default is `2010-04-01`. * * @param string $apiVersion The API version to use for incoming calls made to * the phone number * @return $this Fluent Builder */ public function setApiVersion(string $apiVersion): self { $this->options['apiVersion'] = $apiVersion; return $this; } /** * A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. * * @param string $smsApplicationSid Unique string that identifies the * application * @return $this Fluent Builder */ public function setSmsApplicationSid(string $smsApplicationSid): self { $this->options['smsApplicationSid'] = $smsApplicationSid; return $this; } /** * The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. * * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsMethod The HTTP method to use with sms_url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL we should call when the phone number receives an incoming SMS message. * * @param string $smsUrl The URL we should call when the phone number receives * an incoming SMS message * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. * * @param string $voiceApplicationSid The SID of the application to handle the * phone number * @return $this Fluent Builder */ public function setVoiceApplicationSid(string $voiceApplicationSid): self { $this->options['voiceApplicationSid'] = $voiceApplicationSid; return $this; } /** * Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. * * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @return $this Fluent Builder */ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self { $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; return $this; } /** * The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceFallbackMethod The HTTP method used with fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. * * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceMethod The HTTP method used with the voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * * @param string $voiceUrl The URL we should call when the phone number * receives a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The parameter displays if emergency calling is enabled for this number. Active numbers may place emergency calls by dialing valid emergency numbers for the country. * * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @return $this Fluent Builder */ public function setEmergencyStatus(string $emergencyStatus): self { $this->options['emergencyStatus'] = $emergencyStatus; return $this; } /** * The SID of the emergency address configuration to use for emergency calling from this phone number. * * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @return $this Fluent Builder */ public function setEmergencyAddressSid(string $emergencyAddressSid): self { $this->options['emergencyAddressSid'] = $emergencyAddressSid; return $this; } /** * The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. * * @param string $trunkSid SID of the trunk to handle phone calls to the phone * number * @return $this Fluent Builder */ public function setTrunkSid(string $trunkSid): self { $this->options['trunkSid'] = $trunkSid; return $this; } /** * The configuration parameter for the phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * * @param string $voiceReceiveMode Incoming call type: fax or voice * @return $this Fluent Builder */ public function setVoiceReceiveMode(string $voiceReceiveMode): self { $this->options['voiceReceiveMode'] = $voiceReceiveMode; return $this; } /** * The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations. * * @param string $identitySid Unique string that identifies the identity * associated with number * @return $this Fluent Builder */ public function setIdentitySid(string $identitySid): self { $this->options['identitySid'] = $identitySid; return $this; } /** * The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations. * * @param string $addressSid The SID of the Address resource associated with * the phone number * @return $this Fluent Builder */ public function setAddressSid(string $addressSid): self { $this->options['addressSid'] = $addressSid; return $this; } /** * The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. * * @param string $bundleSid The SID of the Bundle resource associated with * number * @return $this Fluent Builder */ public function setBundleSid(string $bundleSid): self { $this->options['bundleSid'] = $bundleSid; 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.Api.V2010.UpdateIncomingPhoneNumberOptions ' . $options . ']'; } } class ReadIncomingPhoneNumberOptions extends Options { /** * @param bool $beta Whether to include new phone numbers * @param string $friendlyName A string that identifies the IncomingPhoneNumber * resources to read * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber * resources to read * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. */ public function __construct(bool $beta = Values::NONE, string $friendlyName = Values::NONE, string $phoneNumber = Values::NONE, string $origin = Values::NONE) { $this->options['beta'] = $beta; $this->options['friendlyName'] = $friendlyName; $this->options['phoneNumber'] = $phoneNumber; $this->options['origin'] = $origin; } /** * Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to include new phone numbers * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * A string that identifies the IncomingPhoneNumber resources to read. * * @param string $friendlyName A string that identifies the IncomingPhoneNumber * resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. * * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber * resources to read * @return $this Fluent Builder */ public function setPhoneNumber(string $phoneNumber): self { $this->options['phoneNumber'] = $phoneNumber; return $this; } /** * Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. * * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. * @return $this Fluent Builder */ public function setOrigin(string $origin): self { $this->options['origin'] = $origin; 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.Api.V2010.ReadIncomingPhoneNumberOptions ' . $options . ']'; } } class CreateIncomingPhoneNumberOptions extends Options { /** * @param string $phoneNumber The phone number to purchase in E.164 format * @param string $areaCode The desired area code for the new phone number * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @param string $friendlyName A string to describe the new phone number * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @param string $smsMethod The HTTP method to use with sms url * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod HTTP method we should use to call * status_callback * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @param string $voiceMethod The HTTP method used with the voice_url * @param string $voiceUrl The URL we should call when the phone number * receives a call * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @param string $addressSid The SID of the Address resource associated with * the phone number * @param string $voiceReceiveMode Incoming call type: fax or voice * @param string $bundleSid The SID of the Bundle resource associated with * number */ public function __construct(string $phoneNumber = Values::NONE, string $areaCode = Values::NONE, string $apiVersion = Values::NONE, string $friendlyName = Values::NONE, string $smsApplicationSid = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsUrl = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $voiceApplicationSid = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceUrl = Values::NONE, string $emergencyStatus = Values::NONE, string $emergencyAddressSid = Values::NONE, string $trunkSid = Values::NONE, string $identitySid = Values::NONE, string $addressSid = Values::NONE, string $voiceReceiveMode = Values::NONE, string $bundleSid = Values::NONE) { $this->options['phoneNumber'] = $phoneNumber; $this->options['areaCode'] = $areaCode; $this->options['apiVersion'] = $apiVersion; $this->options['friendlyName'] = $friendlyName; $this->options['smsApplicationSid'] = $smsApplicationSid; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsUrl'] = $smsUrl; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['voiceApplicationSid'] = $voiceApplicationSid; $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceUrl'] = $voiceUrl; $this->options['emergencyStatus'] = $emergencyStatus; $this->options['emergencyAddressSid'] = $emergencyAddressSid; $this->options['trunkSid'] = $trunkSid; $this->options['identitySid'] = $identitySid; $this->options['addressSid'] = $addressSid; $this->options['voiceReceiveMode'] = $voiceReceiveMode; $this->options['bundleSid'] = $bundleSid; } /** * The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234. * * @param string $phoneNumber The phone number to purchase in E.164 format * @return $this Fluent Builder */ public function setPhoneNumber(string $phoneNumber): self { $this->options['phoneNumber'] = $phoneNumber; return $this; } /** * The desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. **You must provide an `area_code` or a `phone_number`.** (US and Canada only). * * @param string $areaCode The desired area code for the new phone number * @return $this Fluent Builder */ public function setAreaCode(string $areaCode): self { $this->options['areaCode'] = $areaCode; return $this; } /** * The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. * * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @return $this Fluent Builder */ public function setApiVersion(string $apiVersion): self { $this->options['apiVersion'] = $apiVersion; return $this; } /** * A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number. * * @param string $friendlyName A string to describe the new phone number * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. * * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @return $this Fluent Builder */ public function setSmsApplicationSid(string $smsApplicationSid): self { $this->options['smsApplicationSid'] = $smsApplicationSid; return $this; } /** * The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. * * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsMethod The HTTP method to use with sms url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL we should call when the new phone number receives an incoming SMS message. * * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $statusCallbackMethod HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. * * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @return $this Fluent Builder */ public function setVoiceApplicationSid(string $voiceApplicationSid): self { $this->options['voiceApplicationSid'] = $voiceApplicationSid; return $this; } /** * Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. * * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @return $this Fluent Builder */ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self { $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; return $this; } /** * The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. * * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceMethod The HTTP method used with the voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * * @param string $voiceUrl The URL we should call when the phone number * receives a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The parameter displays if emergency calling is enabled for this number. Active numbers may place emergency calls by dialing valid emergency numbers for the country. * * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @return $this Fluent Builder */ public function setEmergencyStatus(string $emergencyStatus): self { $this->options['emergencyStatus'] = $emergencyStatus; return $this; } /** * The SID of the emergency address configuration to use for emergency calling from the new phone number. * * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @return $this Fluent Builder */ public function setEmergencyAddressSid(string $emergencyAddressSid): self { $this->options['emergencyAddressSid'] = $emergencyAddressSid; return $this; } /** * The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. * * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @return $this Fluent Builder */ public function setTrunkSid(string $trunkSid): self { $this->options['trunkSid'] = $trunkSid; return $this; } /** * The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. * * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @return $this Fluent Builder */ public function setIdentitySid(string $identitySid): self { $this->options['identitySid'] = $identitySid; return $this; } /** * The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. * * @param string $addressSid The SID of the Address resource associated with * the phone number * @return $this Fluent Builder */ public function setAddressSid(string $addressSid): self { $this->options['addressSid'] = $addressSid; return $this; } /** * The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * * @param string $voiceReceiveMode Incoming call type: fax or voice * @return $this Fluent Builder */ public function setVoiceReceiveMode(string $voiceReceiveMode): self { $this->options['voiceReceiveMode'] = $voiceReceiveMode; return $this; } /** * The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. * * @param string $bundleSid The SID of the Bundle resource associated with * number * @return $this Fluent Builder */ public function setBundleSid(string $bundleSid): self { $this->options['bundleSid'] = $bundleSid; 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.Api.V2010.CreateIncomingPhoneNumberOptions ' . $options . ']'; } } V2010/Account/ShortCodeInstance.php 0000644 00000010607 15111164203 0012736 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $apiVersion * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $friendlyName * @property string $shortCode * @property string $sid * @property string $smsFallbackMethod * @property string $smsFallbackUrl * @property string $smsMethod * @property string $smsUrl * @property string $uri */ class ShortCodeInstance extends InstanceResource { /** * Initialize the ShortCodeInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created this resource * @param string $sid The unique string that identifies this resource */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'shortCode' => Values::array_get($payload, 'short_code'), 'sid' => Values::array_get($payload, 'sid'), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ShortCodeContext Context for this ShortCodeInstance */ protected function proxy(): ShortCodeContext { if (!$this->context) { $this->context = new ShortCodeContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ShortCodeInstance * * @return ShortCodeInstance Fetched ShortCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ShortCodeInstance { return $this->proxy()->fetch(); } /** * Update the ShortCodeInstance * * @param array|Options $options Optional Arguments * @return ShortCodeInstance Updated ShortCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ShortCodeInstance { 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.Api.V2010.ShortCodeInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/AuthorizedConnectAppInstance.php 0000644 00000010315 15111164203 0015131 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $connectAppCompanyName * @property string $connectAppDescription * @property string $connectAppFriendlyName * @property string $connectAppHomepageUrl * @property string $connectAppSid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string[] $permissions * @property string $uri */ class AuthorizedConnectAppInstance extends InstanceResource { /** * Initialize the AuthorizedConnectAppInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $connectAppSid The SID of the Connect App to fetch */ public function __construct(Version $version, array $payload, string $accountSid, string $connectAppSid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'connectAppCompanyName' => Values::array_get($payload, 'connect_app_company_name'), 'connectAppDescription' => Values::array_get($payload, 'connect_app_description'), 'connectAppFriendlyName' => Values::array_get($payload, 'connect_app_friendly_name'), 'connectAppHomepageUrl' => Values::array_get($payload, 'connect_app_homepage_url'), 'connectAppSid' => Values::array_get($payload, 'connect_app_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'permissions' => Values::array_get($payload, 'permissions'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'connectAppSid' => $connectAppSid ?: $this->properties['connectAppSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AuthorizedConnectAppContext Context for this * AuthorizedConnectAppInstance */ protected function proxy(): AuthorizedConnectAppContext { if (!$this->context) { $this->context = new AuthorizedConnectAppContext( $this->version, $this->solution['accountSid'], $this->solution['connectAppSid'] ); } return $this->context; } /** * Fetch the AuthorizedConnectAppInstance * * @return AuthorizedConnectAppInstance Fetched AuthorizedConnectAppInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthorizedConnectAppInstance { 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.Api.V2010.AuthorizedConnectAppInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/NewKeyList.php 0000644 00000003165 15111164203 0011416 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; class NewKeyList extends ListResource { /** * Construct the NewKeyList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Keys.json'; } /** * Create the NewKeyInstance * * @param array|Options $options Optional Arguments * @return NewKeyInstance Created NewKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): NewKeyInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new NewKeyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NewKeyList]'; } } V2010/Account/SipPage.php 0000644 00000002220 15111164203 0010677 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class SipPage 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 SipInstance \Twilio\Rest\Api\V2010\Account\SipInstance */ public function buildInstance(array $payload): SipInstance { return new SipInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SipPage]'; } } V2010/Account/ApplicationList.php 0000644 00000015536 15111164204 0012465 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class ApplicationList extends ListResource { /** * Construct the ApplicationList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Applications.json'; } /** * Create the ApplicationInstance * * @param array|Options $options Optional Arguments * @return ApplicationInstance Created ApplicationInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ApplicationInstance { $options = new Values($options); $data = Values::of([ 'ApiVersion' => $options['apiVersion'], 'VoiceUrl' => $options['voiceUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']), 'SmsUrl' => $options['smsUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'SmsStatusCallback' => $options['smsStatusCallback'], 'MessageStatusCallback' => $options['messageStatusCallback'], 'FriendlyName' => $options['friendlyName'], 'PublicApplicationConnectEnabled' => Serialize::booleanToString($options['publicApplicationConnectEnabled']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ApplicationInstance($this->version, $payload, $this->solution['accountSid']); } /** * Streams ApplicationInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ApplicationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 ApplicationInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ApplicationInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 ApplicationPage Page of ApplicationInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ApplicationPage { $options = new Values($options); $params = Values::of([ 'FriendlyName' => $options['friendlyName'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ApplicationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ApplicationInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ApplicationPage Page of ApplicationInstance */ public function getPage(string $targetUrl): ApplicationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ApplicationPage($this->version, $response, $this->solution); } /** * Constructs a ApplicationContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ApplicationContext { return new ApplicationContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ApplicationList]'; } } V2010/Account/SigningKeyList.php 0000644 00000011432 15111164204 0012260 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\ListResource; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class SigningKeyList extends ListResource { /** * Construct the SigningKeyList * * @param Version $version Version that contains the resource * @param string $accountSid A 34 character string that uniquely identifies * this resource. */ public function __construct(Version $version, string $accountSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SigningKeys.json'; } /** * Streams SigningKeyInstance 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 SigningKeyInstance 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 SigningKeyInstance[] 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 SigningKeyInstance 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 SigningKeyPage Page of SigningKeyInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SigningKeyPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SigningKeyPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SigningKeyInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SigningKeyPage Page of SigningKeyInstance */ public function getPage(string $targetUrl): SigningKeyPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SigningKeyPage($this->version, $response, $this->solution); } /** * Constructs a SigningKeyContext * * @param string $sid The sid */ public function getContext(string $sid): SigningKeyContext { return new SigningKeyContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SigningKeyList]'; } } V2010/Account/Message/MediaInstance.php 0000644 00000007653 15111164204 0013457 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Message; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $contentType * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $parentSid * @property string $sid * @property string $uri */ class MediaInstance extends InstanceResource { /** * Initialize the MediaInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created this resource * @param string $messageSid The unique string that identifies the resource * @param string $sid The unique string that identifies this resource */ public function __construct(Version $version, array $payload, string $accountSid, string $messageSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'contentType' => Values::array_get($payload, 'content_type'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'parentSid' => Values::array_get($payload, 'parent_sid'), 'sid' => Values::array_get($payload, 'sid'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'messageSid' => $messageSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MediaContext Context for this MediaInstance */ protected function proxy(): MediaContext { if (!$this->context) { $this->context = new MediaContext( $this->version, $this->solution['accountSid'], $this->solution['messageSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the MediaInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the MediaInstance * * @return MediaInstance Fetched MediaInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MediaInstance { 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.Api.V2010.MediaInstance ' . \implode(' ', $context) . ']'; } } V2010/Account/Message/FeedbackPage.php 0000644 00000002427 15111164204 0013226 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Message; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class FeedbackPage 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 FeedbackInstance \Twilio\Rest\Api\V2010\Account\Message\FeedbackInstance */ public function buildInstance(array $payload): FeedbackInstance { return new FeedbackInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['messageSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.FeedbackPage]'; } } V2010/Account/Message/MediaOptions.php 0000644 00000010077 15111164204 0013340 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Message; use Twilio\Options; use Twilio\Values; abstract class MediaOptions { /** * @param string $dateCreatedBefore Only include media that was created on this * date * @param string $dateCreated Only include media that was created on this date * @param string $dateCreatedAfter Only include media that was created on this * date * @return ReadMediaOptions Options builder */ public static function read(string $dateCreatedBefore = Values::NONE, string $dateCreated = Values::NONE, string $dateCreatedAfter = Values::NONE): ReadMediaOptions { return new ReadMediaOptions($dateCreatedBefore, $dateCreated, $dateCreatedAfter); } } class ReadMediaOptions extends Options { /** * @param string $dateCreatedBefore Only include media that was created on this * date * @param string $dateCreated Only include media that was created on this date * @param string $dateCreatedAfter Only include media that was created on this * date */ public function __construct(string $dateCreatedBefore = Values::NONE, string $dateCreated = Values::NONE, string $dateCreatedAfter = Values::NONE) { $this->options['dateCreatedBefore'] = $dateCreatedBefore; $this->options['dateCreated'] = $dateCreated; $this->options['dateCreatedAfter'] = $dateCreatedAfter; } /** * Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. * * @param string $dateCreatedBefore Only include media that was created on this * date * @return $this Fluent Builder */ public function setDateCreatedBefore(string $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. * * @param string $dateCreated Only include media that was created on this date * @return $this Fluent Builder */ public function setDateCreated(string $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. * * @param string $dateCreatedAfter Only include media that was created on this * date * @return $this Fluent Builder */ public function setDateCreatedAfter(string $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; 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.Api.V2010.ReadMediaOptions ' . $options . ']'; } } V2010/Account/Message/MediaContext.php 0000644 00000004443 15111164204 0013331 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Message; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; class MediaContext extends InstanceContext { /** * Initialize the MediaContext * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the * resource(s) to fetch * @param string $messageSid The SID of the Message resource that this Media * resource belongs to * @param string $sid The unique string that identifies this resource */ public function __construct(Version $version, $accountSid, $messageSid, $sid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'messageSid' => $messageSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Messages/' . \rawurlencode($messageSid) . '/Media/' . \rawurlencode($sid) . '.json'; } /** * Delete the MediaInstance * * @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); } /** * Fetch the MediaInstance * * @return MediaInstance Fetched MediaInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MediaInstance { $payload = $this->version->fetch('GET', $this->uri); return new MediaInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['messageSid'], $this->solution['sid'] ); } /** * 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.Api.V2010.MediaContext ' . \implode(' ', $context) . ']'; } } V2010/Account/Message/FeedbackInstance.php 0000644 00000004736 15111164204 0014123 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Message; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Values; use Twilio\Version; /** * @property string $accountSid * @property string $messageSid * @property string $outcome * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $uri */ class FeedbackInstance extends InstanceResource { /** * Initialize the FeedbackInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created the resource * @param string $messageSid The SID of the Message resource for which the * feedback was provided */ public function __construct(Version $version, array $payload, string $accountSid, string $messageSid) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'messageSid' => Values::array_get($payload, 'message_sid'), 'outcome' => Values::array_get($payload, 'outcome'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'messageSid' => $messageSid, ]; } /** * 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.Api.V2010.FeedbackInstance]'; } } V2010/Account/Message/FeedbackList.php 0000644 00000003625 15111164205 0013267 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Message; use Twilio\Exceptions\TwilioException; use Twilio\ListResource; use Twilio\Options; use Twilio\Values; use Twilio\Version; class FeedbackList extends ListResource { /** * Construct the FeedbackList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created the resource * @param string $messageSid The SID of the Message resource for which the * feedback was provided */ public function __construct(Version $version, string $accountSid, string $messageSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'messageSid' => $messageSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Messages/' . \rawurlencode($messageSid) . '/Feedback.json'; } /** * Create the FeedbackInstance * * @param array|Options $options Optional Arguments * @return FeedbackInstance Created FeedbackInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): FeedbackInstance { $options = new Values($options); $data = Values::of(['Outcome' => $options['outcome'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FeedbackInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['messageSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.FeedbackList]'; } } V2010/Account/Message/FeedbackOptions.php 0000644 00000003205 15111164205 0014001 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Message; use Twilio\Options; use Twilio\Values; abstract class FeedbackOptions { /** * @param string $outcome Whether the feedback has arrived * @return CreateFeedbackOptions Options builder */ public static function create(string $outcome = Values::NONE): CreateFeedbackOptions { return new CreateFeedbackOptions($outcome); } } class CreateFeedbackOptions extends Options { /** * @param string $outcome Whether the feedback has arrived */ public function __construct(string $outcome = Values::NONE) { $this->options['outcome'] = $outcome; } /** * Whether the feedback has arrived. Can be: `unconfirmed` or `confirmed`. If `provide_feedback`=`true` in [the initial HTTP POST](https://www.twilio.com/docs/sms/api/message-resource#create-a-message-resource), the initial value of this property is `unconfirmed`. After the message arrives, update the value to `confirmed`. * * @param string $outcome Whether the feedback has arrived * @return $this Fluent Builder */ public function setOutcome(string $outcome): self { $this->options['outcome'] = $outcome; 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.Api.V2010.CreateFeedbackOptions ' . $options . ']'; } } V2010/Account/Message/MediaPage.php 0000644 00000002405 15111164205 0012556 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Message; use Twilio\Http\Response; use Twilio\Page; use Twilio\Version; class MediaPage 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 MediaInstance \Twilio\Rest\Api\V2010\Account\Message\MediaInstance */ public function buildInstance(array $payload): MediaInstance { return new MediaInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['messageSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MediaPage]'; } } V2010/Account/Message/MediaList.php 0000644 00000013075 15111164205 0012622 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Message; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; use Twilio\Stream; use Twilio\Values; use Twilio\Version; class MediaList extends ListResource { /** * Construct the MediaList * * @param Version $version Version that contains the resource * @param string $accountSid The SID of the Account that created this resource * @param string $messageSid The unique string that identifies the resource */ public function __construct(Version $version, string $accountSid, string $messageSid) { parent::__construct($version); // Path Solution $this->solution = ['accountSid' => $accountSid, 'messageSid' => $messageSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Messages/' . \rawurlencode($messageSid) . '/Media.json'; } /** * Streams MediaInstance 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 array|Options $options Optional Arguments * @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(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MediaInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @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 MediaInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MediaInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @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 MediaPage Page of MediaInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MediaPage { $options = new Values($options); $params = Values::of([ 'DateCreated<' => Serialize::iso8601DateTime($options['dateCreatedBefore']), 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateCreated>' => Serialize::iso8601DateTime($options['dateCreatedAfter']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MediaPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MediaInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MediaPage Page of MediaInstance */ public function getPage(string $targetUrl): MediaPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MediaPage($this->version, $response, $this->solution); } /** * Constructs a MediaContext * * @param string $sid The unique string that identifies this resource */ public function getContext(string $sid): MediaContext { return new MediaContext( $this->version, $this->solution['accountSid'], $this->solution['messageSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MediaList]'; } } V2010/Account/CallInstance.php 0000644 00000020153 15111164205 0011716 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\Call\EventList; use Twilio\Rest\Api\V2010\Account\Call\FeedbackList; use Twilio\Rest\Api\V2010\Account\Call\NotificationList; use Twilio\Rest\Api\V2010\Account\Call\PaymentList; use Twilio\Rest\Api\V2010\Account\Call\RecordingList; use Twilio\Rest\Api\V2010\Account\Call\SiprecList; use Twilio\Rest\Api\V2010\Account\Call\StreamList; use Twilio\Rest\Api\V2010\Account\Call\UserDefinedMessageList; use Twilio\Rest\Api\V2010\Account\Call\UserDefinedMessageSubscriptionList; use Twilio\Values; use Twilio\Version; /** * @property string $sid * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $parentCallSid * @property string $accountSid * @property string $to * @property string $toFormatted * @property string $from * @property string $fromFormatted * @property string $phoneNumberSid * @property string $status * @property \DateTime $startTime * @property \DateTime $endTime * @property string $duration * @property string $price * @property string $priceUnit * @property string $direction * @property string $answeredBy * @property string $apiVersion * @property string $forwardedFrom * @property string $groupSid * @property string $callerName * @property string $queueTime * @property string $trunkSid * @property string $uri * @property array $subresourceUris */ class CallInstance extends InstanceResource { protected $_recordings; protected $_notifications; protected $_feedback; protected $_events; protected $_payments; protected $_siprec; protected $_streams; protected $_userDefinedMessageSubscriptions; protected $_userDefinedMessages; /** * Initialize the CallInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid The SID of the Account that created this resource * @param string $sid The SID of the Call resource to fetch */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'sid' => Values::array_get($payload, 'sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'parentCallSid' => Values::array_get($payload, 'parent_call_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'to' => Values::array_get($payload, 'to'), 'toFormatted' => Values::array_get($payload, 'to_formatted'), 'from' => Values::array_get($payload, 'from'), 'fromFormatted' => Values::array_get($payload, 'from_formatted'), 'phoneNumberSid' => Values::array_get($payload, 'phone_number_sid'), 'status' => Values::array_get($payload, 'status'), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')), 'duration' => Values::array_get($payload, 'duration'), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'direction' => Values::array_get($payload, 'direction'), 'answeredBy' => Values::array_get($payload, 'answered_by'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'forwardedFrom' => Values::array_get($payload, 'forwarded_from'), 'groupSid' => Values::array_get($payload, 'group_sid'), 'callerName' => Values::array_get($payload, 'caller_name'), 'queueTime' => Values::array_get($payload, 'queue_time'), 'trunkSid' => Values::array_get($payload, 'trunk_sid'), 'uri' => Values::array_get($payload, 'uri'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CallContext Context for this CallInstance */ protected function proxy(): CallContext { if (!$this->context) { $this->context = new CallContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the CallInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the CallInstance * * @return CallInstance Fetched CallInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CallInstance { return $this->proxy()->fetch(); } /** * Update the CallInstance * * @param array|Options $options Optional Arguments * @return CallInstance Updated CallInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CallInstance { return $this->proxy()->update($options); } /** * Access the recordings */ protected function getRecordings(): RecordingList { return $this->proxy()->recordings; } /** * Access the notifications */ protected function getNotifications(): NotificationList { return $this->proxy()->notifications; } /** * Access the feedback */ protected function getFeedback(): FeedbackList { return $this->proxy()->feedback; } /** * Access the events */ protected function getEvents(): EventList { return $this->proxy()->events; } /** * Access the payments */ protected function getPayments(): PaymentList { return $this->proxy()->payments; } /** * Access the siprec */ protected function getSiprec(): SiprecList { return $this->proxy()->siprec; } /** * Access the streams */ protected function getStreams(): StreamList { return $this->proxy()->streams; } /** * Access the userDefinedMessageSubscriptions */ protected function getUserDefinedMessageSubscriptions(): UserDefinedMessageSubscriptionList { return $this->proxy()->userDefinedMessageSubscriptions; } /** * Access the userDefinedMessages */ protected function getUserDefinedMessages(): UserDefinedMessageList { return $this->proxy()->userDefinedMessages; } /** * 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.Api.V2010.CallInstance ' . \implode(' ', $context) . ']'; } } V2010/AccountInstance.php 0000644 00000022603 15111164205 0011045 0 ustar 00 <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; use Twilio\Rest\Api\V2010\Account\AddressList; use Twilio\Rest\Api\V2010\Account\ApplicationList; use Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList; use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList; use Twilio\Rest\Api\V2010\Account\BalanceList; use Twilio\Rest\Api\V2010\Account\CallList; use Twilio\Rest\Api\V2010\Account\ConferenceList; use Twilio\Rest\Api\V2010\Account\ConnectAppList; use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList; use Twilio\Rest\Api\V2010\Account\KeyList; use Twilio\Rest\Api\V2010\Account\MessageList; use Twilio\Rest\Api\V2010\Account\NewKeyList; use Twilio\Rest\Api\V2010\Account\NewSigningKeyList; use Twilio\Rest\Api\V2010\Account\NotificationList; use Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList; use Twilio\Rest\Api\V2010\Account\QueueList; use Twilio\Rest\Api\V2010\Account\RecordingList; use Twilio\Rest\Api\V2010\Account\ShortCodeList; use Twilio\Rest\Api\V2010\Account\SigningKeyList; use Twilio\Rest\Api\V2010\Account\SipList; use Twilio\Rest\Api\V2010\Account\TokenList; use Twilio\Rest\Api\V2010\Account\TranscriptionList; use Twilio\Rest\Api\V2010\Account\UsageList; use Twilio\Rest\Api\V2010\Account\ValidationRequestList; use Twilio\Values; use Twilio\Version; /** * @property string $authToken * @property \DateTime $dateCreated * @property \DateTime $dateUpdated * @property string $friendlyName * @property string $ownerAccountSid * @property string $sid * @property string $status * @property array $subresourceUris * @property string $type * @property string $uri */ class AccountInstance extends InstanceResource { protected $_addresses; protected $_applications; protected $_authorizedConnectApps; protected $_availablePhoneNumbers; protected $_balance; protected $_calls; protected $_conferences; protected $_connectApps; protected $_incomingPhoneNumbers; protected $_keys; protected $_messages; protected $_newKeys; protected $_newSigningKeys; protected $_notifications; protected $_outgoingCallerIds; protected $_queues; protected $_recordings; protected $_signingKeys; protected $_sip; protected $_shortCodes; protected $_tokens; protected $_transcriptions; protected $_usage; protected $_validationRequests; /** * Initialize the AccountInstance * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $sid Fetch by unique Account Sid */ public function __construct(Version $version, array $payload, string $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = [ 'authToken' => Values::array_get($payload, 'auth_token'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'ownerAccountSid' => Values::array_get($payload, 'owner_account_sid'), 'sid' => Values::array_get($payload, 'sid'), 'status' => Values::array_get($payload, 'status'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'type' => Values::array_get($payload, 'type'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AccountContext Context for this AccountInstance */ protected function proxy(): AccountContext { if (!$this->context) { $this->context = new AccountContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the AccountInstance * * @return AccountInstance Fetched AccountInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AccountInstance { return $this->proxy()->fetch(); } /** * Update the AccountInstance * * @param array|Options $options Optional Arguments * @return AccountInstance Updated AccountInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AccountInstance { return $this->proxy()->update($options); } /** * Access the addresses */ protected function getAddresses(): AddressList { return $this->proxy()->addresses; } /** * Access the applications */ protected function getApplications(): ApplicationList { return $this->proxy()->applications; } /** * Access the authorizedConnectApps */ protected function getAuthorizedConnectApps(): AuthorizedConnectAppList { return $this->proxy()->authorizedConnectApps; } /** * Access the availablePhoneNumbers */ protected function getAvailablePhoneNumbers(): AvailablePhoneNumberCountryList { return $this->proxy()->availablePhoneNumbers; } /** * Access the balance */ protected function getBalance(): BalanceList { return $this->proxy()->balance; } /** * Access the calls */ protected function getCalls(): CallList { return $this->proxy()->calls; } /** * Access the conferences */ protected function getConferences(): ConferenceList { return $this->proxy()->conferences; } /** * Access the connectApps */ protected function getConnectApps(): ConnectAppList { return $this->proxy()->connectApps; } /** * Access the incomingPhoneNumbers */ protected function getIncomingPhoneNumbers(): IncomingPhoneNumberList { return $this->proxy()->incomingPhoneNumbers; } /** * Access the keys */ protected function getKeys(): KeyList { return $this->proxy()->keys; } /** * Access the messages */ protected function getMessages(): MessageList { return $this->proxy()->messages; } /** * Access the newKeys */ protected function getNewKeys(): NewKeyList { return $this->proxy()->newKeys; } /** * Access the newSigningKeys */ protected function getNewSigningKeys(): NewSigningKeyList { return $this->proxy()->newSigningKeys; } /** * Access the notifications */ protected function getNotifications(): NotificationList { return $this->proxy()->notifications; } /** * Access the outgoingCallerIds */ protected function getOutgoingCallerIds(): OutgoingCallerIdList { return $this->proxy()->outgoingCallerIds; } /** * Access the queues */ protected function getQueues(): QueueList { return $this->proxy()->queues; } /** * Access the recordings */ protected function getRecordings(): RecordingList { return $this->proxy()->recordings; } /** * Access the signingKeys */ protected function getSigningKeys(): SigningKeyList { return $this->proxy()->signingKeys; } /** * Access the sip */ protected function getSip(): SipList { return $this->proxy()->sip; } /** * Access the shortCodes */ protected function getShortCodes(): ShortCodeList { return $this->proxy()->shortCodes; } /** * Access the tokens */ protected function getTokens(): TokenList { return $this->proxy()->tokens; } /** * Access the transcriptions */ protected function getTranscriptions(): TranscriptionList { return $this->proxy()->transcriptions; } /** * Access the usage */ protected function getUsage(): UsageList { return $this->proxy()->usage; } /** * Access the validationRequests */ protected function getValidationRequests(): ValidationRequestList { return $this->proxy()->validationRequests; } /** * 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.Api.V2010.AccountInstance ' . \implode(' ', $context) . ']'; } } Front/FrontendController.php 0000644 00000030160 15111407530 0012165 0 ustar 00 <?php namespace App\Http\Controllers\Api\Front; use App\Classes\GeniusMailer; use App\Http\Controllers\Controller; use App\Http\Resources\BlogResource; use App\Http\Resources\TeamResource; use App\Models\AccountProcess; use App\Models\Blog; use App\Models\Currency; use App\Models\Feature; use App\Models\Generalsetting; use App\Models\Language; use App\Models\Page; use App\Models\Pagesetting; use App\Models\Plan; use App\Models\Review; use App\Models\Team; use Illuminate\Http\Request; use Illuminate\Support\Facades\Validator; class FrontendController extends Controller { public function __construct() { $this->ps = Pagesetting::first(); $this->gs = Generalsetting::first(); } public function banner(){ $data['title'] = $this->ps->hero_title; $data['subtitle'] = $this->ps->hero_subtitle; $data['button_url'] = $this->ps->hero_btn_url; $data['video_link'] = $this->ps->hero_link; return response()->json(['status' => true, 'data' => $data, 'error' => []]); } public function about(){ $data['subtitle'] = $this->ps->about_title; $data['description'] = $this->ps->about_text; $data['read_more_link'] = $this->ps->about_link; $data['photo'] = $this->ps->about_photo != NULL ? url('/') . '/assets/images/' . $this->ps->about_photo : 'NULL'; return response()->json(['status' => true, 'data' => $data, 'error' => []]); } public function profit_calculator(){ $data['subtitle'] = $this->ps->profit_title; $data['description'] = $this->ps->profit_text; $data['plans'] = Plan::whereStatus(1)->orderBy('id','desc')->get(); $data['banner'] = $this->ps->profit_banner != NULL ? url('/') . '/assets/images/' . $this->ps->profit_banner : 'NULL'; return response()->json(['status' => true, 'data' => $data, 'error' => []]); } public function calculate(Request $request){ $rules = [ 'plan_id'=>'required', 'amount'=>'required' ]; $validator = Validator::make($request->all(), $rules); if ($validator->fails()) { return response()->json(['status' => false, 'data' => [], 'error' => $validator->errors()]); } $plan = Plan::whereId($request->plan_id)->first(); if($plan->invest_type == 'range'){ if($request->amount < $plan->min_amount || $request->amount > $plan->max_amount){ return response()->json(['status' => false, 'data' => [], 'error' => ["message" => 'Request amount should be between of '. $plan->min_amount.' minimum ' .$plan->max_amount. ' maximum amount']]); } }else{ if($plan->fixed_amount != $request->amount){ return response()->json(['status' => false, 'data' => [], 'error' => ["message" => 'Request amount should be '.$plan->fixed_amount]]); } } $percentage = ($request->amount * $plan->profit_percentage)/100; $profit = $request->amount + $percentage; $msg = showPrice($percentage); return response()->json(['status' => true, 'data' => $msg, 'error' => []]); } public function plans(){ $data = Plan::whereStatus(1) ->orderBy('id','desc') ->take(6) ->get(); return response()->json(['status' => true, 'data' => $data, 'error' => []]); } public function allPlans(){ $data = Plan::whereStatus(1) ->orderBy('id','desc') ->get(); return response()->json(['status' => true, 'data' => $data, 'error' => []]); } public function partners(){ $data = Partner::orderBy('id','desc') ->get(); return response()->json(['status' => true, 'data' => $data, 'error' => []]); } public function transactions(){ $data['deposits'] = getDeposits(); $data['withdraws'] = getWithdraws(); return response()->json(['status' => true, 'data' => $data, 'error' => []]); } public function how_to_start(){ $data['subtitle'] = $this->ps->start_title; $data['description'] = $this->ps->start_text; $data['banner'] = $this->ps->start_photo != NULL ? url('/') . '/assets/images/' . $this->ps->start_photo : 'NULL'; $data['steps'] = AccountProcess::orderBy('id','desc')->get(); return response()->json(['status' => true, 'data' => $data, 'error' => []]); } public function features(){ $data['subtitle'] = $this->ps->feature_title; $data['description'] = $this->ps->feature_text; $data['features'] = Feature::orderBy('id','desc')->get(); return response()->json(['status' => true, 'data' => $data, 'error' => []]); } public function referrals(){ $data['subtitle'] = $this->ps->referral_title; $data['description'] = $this->ps->referral_text; $data['referral_percentages'] = $this->ps->referral_percentage != NULL ? json_decode($this->ps->referral_percentage,true) : 'NULL'; return response()->json(['status' => true, 'data' => $data, 'error' => []]); } public function teams(){ $data['subtitle'] = $this->ps->team_title; $data['description'] = $this->ps->team_text; $teams = Team::orderBy('id','desc')->get(); return response()->json(['status' => true, 'data' =>['homepage'=>$data,'teams'=>TeamResource::collection($teams)], 'error' => []]); } public function testimonials(){ $data = Review::orderBy('id','desc')->get(); return response()->json(['status' => true, 'data' => $data, 'error' => []]); } public function ctas(){ $data['title'] = $this->ps->call_title; $data['subtitle'] = $this->ps->call_subtitle; $data['cta_link'] = $this->ps->call_link; $data['background_color'] = $this->ps->call_bg; return response()->json(['status' => true, 'data' => $data, 'error' => []]); } public function blogs(){ $data['subtitle'] = $this->ps->blog_title; $data['description'] = $this->ps->blog_text; $blogs = Blog::orderBy('id','desc')->limit(3)->get(); return response()->json(['status' => true, 'data' => ['homepage'=>$data,'blogs'=> BlogResource::collection($blogs)], 'error' => []]); } public function payment_gateways(){ $data['subtitle'] = $this->ps->brand_title; $data['description'] = $this->ps->brand_text; $data['banner'] = $this->ps->brand_photo != NULL ? url('/') . '/assets/images/' . $this->ps->brand_photo : 'NULL'; $data['payment_gateways'] = getBrands(); return response()->json(['status' => true, 'data' => $data, 'error' => []]); } public function defaultLanguage() { try{ $language = Language::where('is_default','=',1)->first(); if(!$language){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => 'No Language Found']]); } $data_results = file_get_contents(resource_path().'/lang/'.$language->file); $lang = json_decode($data_results); return response()->json(['status' => true, 'data' => ['basic' => $language ,'languages' => $lang], 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $e->getMessage()]]); } } public function language($id) { try{ $language = Language::find($id); if(!$language){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => 'No Language Found']]); } $data_results = file_get_contents(resource_path().'/lang/'.$language->file); $lang = json_decode($data_results); return response()->json(['status' => true, 'data' => ['basic' => $language ,'languages' => $lang], 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $e->getMessage()]]); } } public function languages() { try{ $languages = Language::all(); return response()->json(['status' => true, 'data' => $languages, 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $e->getMessage()]]); } } public function defaultCurrency() { try{ $currency = Currency::where('is_default','=',1)->first(); if(!$currency){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => 'No Currency Found']]); } return response()->json(['status' => true, 'data' => $currency, 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $e->getMessage()]]); } } public function currency($id) { try{ $currency = Currency::find($id); if(!$currency){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => 'No Currency Found']]); } return response()->json(['status' => true, 'data' => $currency, 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $e->getMessage()]]); } } public function currencies() { try{ $currencies = Currency::all(); return response()->json(['status' => true, 'data' => $currencies, 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $e->getMessage()]]); } } public function pages(){ try{ $pages = Page::whereStatus(1)->orderBy('id','desc')->get(); return response()->json(['status' => true, 'data' => $pages, 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $e->getMessage()]]); } } public function page($slug) { try{ $page = Page::whereSlug($slug)->first(); return response()->json(['status' => true, 'data' => $page, 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $e->getMessage()]]); } } public function info(){ $data['latitude'] = $this->gs->latitude; $data['longitude'] = $this->gs->longitude; $data['subtitle'] = $this->ps->side_title; $data['description'] = $this->ps->side_text; $data['address'] = $this->ps->street; $data['phone'] = $this->ps->phone; $data['email'] = $this->ps->email; return response()->json(['status' => true, 'data' => $data, 'error' => []]); } public function contact(Request $request) { try { $gs = Generalsetting::findOrFail(1); $subject = $request->subject; $to = $this->ps->contact_email; $name = $request->name; $phone = $request->phone; $from = $request->email; $msg = "Name: ".$name."\Phone: ".$phone."\nEmail: ".$from."\nMessage: ".$request->message; if($gs->is_smtp) { $data = [ 'to' => $to, 'subject' => $subject, 'body' => $msg, ]; $mailer = new GeniusMailer(); $mailer->sendCustomMail($data); } else { $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } return response()->json(['status' => true, 'data' => ['message' => 'Email Sent Successfully!'], 'error' => []]); } catch (\Throwable $th) { return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $th->getMessage()]]); } } } Front/BlogController.php 0000644 00000003473 15111407530 0011300 0 ustar 00 <?php namespace App\Http\Controllers\Api\Front; use App\Http\Controllers\Controller; use App\Http\Resources\BlogResource; use App\Models\Blog; use App\Models\BlogCategory; use Illuminate\Http\Request; class BlogController extends Controller { public function blogs(){ try{ $blogs = Blog::all(); return response()->json(['status' => true, 'data' => BlogResource::collection($blogs), 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $e->getMessage()]]); } } public function recentBlogs(){ try{ $blogs = Blog::orderBy('id','desc')->orderBy('id','desc')->limit(3)->get(); return response()->json(['status' => true, 'data' => BlogResource::collection($blogs), 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $e->getMessage()]]); } } public function blogDetails($slug){ try{ $blog = Blog::whereSlug($slug) ->whereStatus(1) ->first(); return response()->json(['status' => true, 'data' => new BlogResource($blog), 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $e->getMessage()]]); } } public function blogCategory(){ try{ $categories = BlogCategory::all(); return response()->json(['status' => true, 'data' => $categories, 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $e->getMessage()]]); } } } Front/error_log 0000644 00000000515 15111407530 0007547 0 ustar 00 [25-Nov-2025 19:52:54 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Front/BlogController.php:11 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Front/BlogController.php on line 11 Auth/AuthController.php 0000644 00000021110 15111407530 0011113 0 ustar 00 <?php namespace App\Http\Controllers\Api\Auth; use JWTAuth; use Validator; use App\Models\User; use Illuminate\Support\Str; use Illuminate\Http\Request; use App\Classes\GeniusMailer; use App\Models\Generalsetting; use App\Http\Controllers\Controller; use App\Http\Resources\UserResource; use Illuminate\Support\Facades\Hash; class AuthController extends Controller { public function __construct() { $this->middleware('auth:api', ['except' => ['login', 'register', 'logout','social_login','forgot','forgot_submit']]); $this->middleware('setapi'); } public function register(Request $request) { try{ $rules = [ 'name' => 'required', 'email' => 'required|email|unique:users', 'username' => 'required', 'phone' => 'required', 'password' => 'required' ]; $validator = Validator::make($request->all(), $rules); if ($validator->fails()) { return response()->json(['status' => false, 'data' => [], 'error' => $validator->errors()]); } $gs = Generalsetting::first(); $user = new User; $user->name = $request->name; $user->username = $request->username; $user->email = $request->email; $user->phone = $request->phone; $token = md5(time().$request->name.$request->email); $user->password = bcrypt($request->password); if($gs->is_verification_email == 0) { $user->email_verified = 'Yes'; }else{ $to = $request->email; $subject = 'Verify your email address.'; $msg = "Dear Customer,<br> We noticed that you need to verify your email address. <a href=".url('user/register/verify/'.$token).">Simply click here to verify. </a>"; if($gs->is_smtp == 1) { $data = [ 'to' => $to, 'subject' => $subject, 'body' => $msg, ]; $mailer = new GeniusMailer(); $mailer->sendCustomMail($data); } else { $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } } $user->save(); $token = auth()->login($user); return response()->json(['status' => true, 'data' => ['token' => $token, 'user' => new UserResource($user)], 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $e->getMessage()]]); } } public function login(Request $request) { try{ $rules = [ 'email' => 'required', 'password' => 'required' ]; $validator = Validator::make($request->all(), $rules); if ($validator->fails()) { return response()->json(['status' => false, 'data' => [], 'error' => $validator->errors()]); } $credentials = request(['email', 'password']); if (! $token = auth()->attempt($credentials)) { return response()->json(['status' => false, 'data' => [], 'error' => ["message" => "Email / password didn't match."]]); } if(auth()->user()->email_verified == 'No') { auth()->logout(); return response()->json(['status' => false, 'data' => [], 'error' => ["message" => 'Your Email is not Verified!']]); } if(auth()->user()->is_banned == 1) { auth()->logout(); return response()->json(['status' => false, 'data' => [], 'error' => ["message" => 'Your Account Has Been Banned.']]); } return response()->json(['status' => true, 'data' => ['token' => $token, 'user' => new UserResource(auth()->user())], 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $e->getMessage()]]); } } public function social_login(Request $request) { try{ $rules = [ 'name' => 'required', 'email' => 'required' ]; $validator = Validator::make($request->all(), $rules); if ($validator->fails()) { return response()->json(['status' => false, 'data' => [], 'error' => $validator->errors()]); } $user = User::where('email','=',$request->email)->first(); if(!$user){ $rules = [ 'email' => 'email|unique:users' ]; $validator = Validator::make($request->all(), $rules); if ($validator->fails()) { return response()->json(['status' => false, 'data' => [], 'error' => $validator->errors()]); } $user = new User; $user->name = $request->name; $user->email = $request->email; $user->email_verified = 'Yes'; $user->save(); $token = auth()->login($user); return response()->json(['status' => true, 'data' => ['token' => $token], 'error' => []]); } $userToken = JWTAuth::fromUser($user); if($user->email_verified == 'No') { return response()->json(['status' => false, 'data' => [], 'error' => ["message" => 'Your Email is not Verified!']]); } if($user->ban == 1) { return response()->json(['status' => false, 'data' => [], 'error' => ["message" => 'Your Account Has Been Banned.']]); } auth()->login($user); return response()->json(['status' => true, 'data' => ['token' => $userToken, 'user' => auth()->user()], 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $e->getMessage()]]); } } public function details() { try{ return response()->json(['status' => true, 'data' => new UserResource(auth()->user()), 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => $e->getMessage()]]); } } public function logout() { auth()->logout(); return response()->json(['status' => true, 'data' => ['message' => 'Successfully logged out.'], 'error' => []]); } public function sendVerificationCode(Request $request) { $gs = Generalsetting::first(); } public function refresh() { return $this->respondWithToken(auth()->refresh()); } protected function respondWithToken($token) { return response()->json([ 'access_token' => $token, 'token_type' => 'bearer', 'expires_in' => auth()->factory()->getTTL() * 300 ]); } public function reset_password(Request $request){ $gs = Generalsetting::findOrFail(1); $user = User::where('email',$request->email)->first(); if($user){ $token = Str::random(6); $subject = "Reset Password Request"; $msg = "Your Forgot Password Token: ".$token; $user->password = bcrypt($token); $user->update(); if($gs->is_smtp == 1) { $data = [ 'to' => $request->email, 'subject' => $subject, 'body' => $msg, ]; $mailer = new GeniusMailer(); $mailer->sendCustomMail($data); } else { $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($request->email,$subject,$msg,$headers); } return response()->json(['status' => true, 'data' => ['user_id' => $user->id,'new_password' => $token], 'error' => []]); }else{ return response()->json(['status' => false, 'data' => [], 'error' => 'Account not found']); } } public function change_password(Request $request){ if($request->new_password != $request->confirm_password){ return response()->json(['status' => false, 'data' => [], 'error' => 'New password & confirm password not match']); } $user = User::where('id',$request->user_id)->where('reset_token',$request->reset_token)->first(); if($user){ $password = Hash::make($request->new_password); $user->password = $password; $user->reset_token = null; $user->update(); return response()->json(['status' => true, 'data' => ['message' => 'Password Changed Successfully'], 'error' => []]); }else{ return response()->json(['status' => false, 'data' => [], 'error' => 'Something is wrong']); } } } Checkout/RazorpayController.php 0000644 00000012173 15111407530 0012676 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Repositories\OrderRepository; use Illuminate\Http\Request; use Razorpay\Api\Api; use Illuminate\Support\Facades\Session; class RazorpayController extends Controller { public $orderRepositorty; public function __construct(OrderRepository $orderRepositorty) { $data = PaymentGateway::whereKeyword('razorpay')->first(); $paydata = $data->convertAutoData(); $this->keyId = $paydata['key']; $this->keySecret = $paydata['secret']; $this->displayCurrency = 'INR'; $this->api = new Api($this->keyId, $this->keySecret); $this->orderRepositorty = $orderRepositorty; } public function store(Request $request) { if($request->currency_code != "INR") { return redirect()->back()->with('unsuccess','Please Select INR Currency For Rezorpay.'); } $settings = Generalsetting::findOrFail(1); $invest = Invest::findOrFail($request->invest_id); $item_name = $settings->title." Invest"; $order['item_name'] = $item_name; $order['item_number'] = $invest->transaction_no; $order['item_amount'] = round($request->amount,2); $cancel_url = route('api.checkout.razorpay.cancel'); $notify_url = route('api.checkout.razorpay.notify'); $orderData = [ 'receipt' => $order['item_number'], 'amount' => $order['item_amount'] * 100, 'currency' => 'INR', 'payment_capture' => 1 ]; $razorpayOrder = $this->api->order->create($orderData); $input['user_id'] = $request->user_id; Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); Session::put('order_data',$order); Session::put('order_payment_id', $razorpayOrder['id']); $displayAmount = $amount = $orderData['amount']; if ($this->displayCurrency !== 'INR') { $url = "https://api.fixer.io/latest?symbols=$this->displayCurrency&base=INR"; $exchange = json_decode(file_get_contents($url), true); $displayAmount = $exchange['rates'][$this->displayCurrency] * $amount / 100; } $checkout = 'automatic'; if (isset($_GET['checkout']) and in_array($_GET['checkout'], ['automatic', 'manual'], true)) { $checkout = $_GET['checkout']; } $data = [ "key" => $this->keyId, "amount" => $amount, "name" => $order['item_name'], "description" => $order['item_name'], "prefill" => [ "name" => $request->customer_name, "email" => $request->customer_email, "contact" => $request->customer_phone, ], "notes" => [ "address" => $request->customer_address, "merchant_order_id" => $order['item_number'], ], "theme" => [ "color" => "{{$settings->colors}}" ], "order_id" => $razorpayOrder['id'], ]; if ($this->displayCurrency !== 'INR') { $data['display_currency'] = $this->displayCurrency; $data['display_amount'] = $displayAmount; } $json = json_encode($data); $displayCurrency = $this->displayCurrency; return view( 'frontend.razorpay-checkout', compact( 'data','displayCurrency','json','notify_url' ) ); } public function notify(Request $request) { $input_data = $request->all(); $payment_id = Session::get('order_payment_id'); $input = Session::get('request_data'); $success = true; if (empty($input_data['razorpay_payment_id']) === false) { try { $attributes = array( 'razorpay_order_id' => $payment_id, 'razorpay_payment_id' => $input_data['razorpay_payment_id'], 'razorpay_signature' => $input_data['razorpay_signature'] ); $this->api->utility->verifyPaymentSignature($attributes); } catch(SignatureVerificationError $e) { $success = false; } } $method = Session::get('method'); $invest_id = Session::get('invest_id'); if ($success === true){ $invest = Invest::findOrFail($invest_id); $addionalData = ['txnid' => $payment_id, 'status'=>'running','method'=>$method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); } return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning','Payment Cancelled!'); } } Checkout/BlockIoController.php 0000644 00000013275 15111407530 0012415 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App; use URL; use Auth; use Hash; use Config; use Session; use Redirect; use Validator; use Carbon\Carbon; use App\Models\User; use App\Models\Order; use App\Classes\BlockIO; use App\Models\Transaction; use App\Models\Notification; use Illuminate\Http\Request; use App\Classes\GeniusMailer; use App\Models\Generalsetting; use App\Classes\CoinPaymentsAPI; use App\Models\UserNotification; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Invest; use Illuminate\Support\Facades\Input; use App\Models\PaymentGateway; use App\Models\Plan; use Illuminate\Support\Carbon as IlluminateCarbon; use Illuminate\Support\Facades\Session as FacadesSession; use Illuminate\Support\Str; class BlockIoController extends Controller { public function blockioInvest() { return view('user.invest.blockio'); } public function blockiocallback(Request $request) { $notifyID = $request['notification_id']; $amountRec = $request['data']['amount_received']; if (Invest::where('notify_id',$notifyID)->exists()){ $order = Invest::where('notify_id',$notifyID)->where('payment_status','pending')->first(); $data['txnid'] = $request['data']['txid']; $data['payment_status'] = "completed"; $order->update($data); $trans = new Transaction(); $trans->email = auth()->user()->email; $trans->amount = $order->amount; $trans->type = "Invest"; $trans->txnid = $order->transaction_no; $trans->user_id = $order->user_id; $trans->save(); $gs = Generalsetting::findOrFail(1); $user = User::whereId($order->user_id)->first(); if($gs->is_smtp == 1) { $data = [ 'to' => $user->email, 'type' => "Invest", 'cname' => $user->name, 'oamount' => $order->amount, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $order->customer_email; $subject = " You have invested successfully."; $msg = "Hello ".$order->customer_name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } } } function curlGetCall($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPGET, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $data = curl_exec ($ch); curl_close ($ch); return $data; } public function deposit(Request $request) { $invest = Invest::findOrFail($request->invest_id); $user = User::findOrFail($invest->user_id); if($request->amount > 0){ $methods = $request->method; $version = 2; $coin = "BTC"; $my_api_key = ''; if($methods == "block.io.ltc"){ $blockinfo = PaymentGateway::whereKeyword('block.io.ltc')->first(); $blocksettings= $blockinfo->convertAutoData(); $coin = "Litecoin"; $my_api_key = $blocksettings['blockio_api_ltc']; }elseif($methods == "block.io.btc"){ $blockinfo = PaymentGateway::whereKeyword('block.io.btc')->first(); $blocksettings= $blockinfo->convertAutoData(); $coin = "Bitcoin"; $my_api_key = $blocksettings['blockio_api_btc']; }elseif ($methods == "block.io.dgc"){ $coin = "Dogecoin"; $blockinfo = PaymentGateway::whereKeyword('block.io.dgc')->first(); $blocksettings= $blockinfo->convertAutoData(); $my_api_key = $blocksettings['blockio_api_dgc']; } $acc = Auth::user()->id; $item_number = $invest->transaction_no; $item_amount = $request->amount; $currency_code = $request->currency_code; $secret = $blocksettings['secret_string']; $my_callback_url = route('api.checkout.blockio.notify'); $block_io = new BlockIO($my_api_key, $secret, $version); $biorate = 1; $coin_amount = round($item_amount / $biorate, 8); $root_url = 'https://block.io/api/v2/'; $addObject = $block_io->get_new_address(array()); $address = $addObject->data->address; $notifyObject = $block_io->create_notification(array('type' => 'address', 'address' => $address, 'url' => $my_callback_url)); $notifyID = $notifyObject->data->notification_id; $invest->method = $request->method; $invest->coin_amount = $coin_amount; $invest->notify_id = $notifyID; $invest->update(); $qrcode_url = "https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl=bitcoin:".$address."?amount=".$coin_amount."&choe=UTF-8"; return redirect()->route('api.user.invest.checkout',$invest->id)->with('success',['address' => $address,'qrcode_url' => $qrcode_url,]); } return redirect()->route('api.user.invest.checkout',$invest->id)->with('error','Please enter a valid amount.')->withInput(); } } Checkout/ManualController.php 0000644 00000015644 15111407530 0012312 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Models\Generalsetting; use PHPMailer\PHPMailer\PHPMailer; use App\Models\Invest; use App\Models\User; use App\Repositories\OrderRepository; use Illuminate\Http\Request; class ManualController extends Controller { public $gs; public function __construct(OrderRepository $orderRepositorty) { $this->gs = Generalsetting::findOrFail(1); $this->orderRepositorty = $orderRepositorty; } public function store(Request $request){ $invest_id = $request->invest_id; $invest = Invest::findOrFail($invest_id); $this->orderRepositorty->apiOrder($request,$invest); $user = User::whereId($invest->user_id)->first(); $to = $user->email; $subject = 'Your Investment is Being Processed'; $msg = '<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Your Investment is Being Processed</title> <style> body { margin: 0; padding: 0; font-family: "Arial", sans-serif; background-color: #f7f7f7; } .email-wrapper { width: 100%; background-color: #f7f7f7; padding: 20px 0; } .email-content { width: 100%; max-width: 600px; background-color: #ffffff; border-radius: 8px; margin: 0 auto; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); } .email-header { background-color: #003366; padding: 20px; text-align: center; border-radius: 8px 8px 0 0; } .email-header img { max-width: 200px; } .email-header span { font-size: 18px; font-weight: 600; color: #00BFFF; display: block; margin-top: 10px; } .email-body { padding: 16px 30px; font-size: 16px; line-height: 1.5; color: #333; } .email-body h3 { color: #003366; margin-bottom: 15px; } .email-body p { margin-bottom: 20px; } .email-button { display: inline-block; background-color: #003366; color: #ffffff !important; padding: 6px 12px; font-size: 16px; border-radius: 5px; text-decoration: none; } .email-footer { background-color: #1f1f1f; color: #ffffff; text-align: center; padding: 12px; border-radius: 0 0 8px 8px; font-size: 14px; } .email-footer a { color: #00BFFF; text-decoration: none; } </style> </head> <body> <div class="email-wrapper"> <div class="email-content"> <div class="email-header"> <img src="https://fluxeassets.com/imgx/etemp.png" alt="Fluxe Assets Logo"> <span>Guiding You Toward Financial Growth</span> </div> <div class="email-body"> <p>Dear <strong>'.$user->name.'</strong>,</p> <p>Thank you for choosing an investment plan with <strong>Fluxe Assets</strong>.</p> <p>Your investment is currently being processed. Once confirmed, profits will begin accruing based on your selected plan.</p> <p>You can view your investment status and details anytime in your dashboard:</p> <a href="https://fluxeassets.com/user/login" class="email-button" target="_blank">Access Your Dashboard</a> <p style="margin-top: 30px;">Thank you for your trust in us.<br>The Fluxe Assets Team</p> </div> <div class="email-footer"> <p>Copyright © 2025 <a href="https://fluxeassets.com">Fluxe Assets</a>. All rights reserved.</p> </div> </div> </div> </body> </html>'; if($this->gs->is_smtp == 1) { $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = $this->gs->smtp_host; $mail->SMTPAuth = true; $mail->Username = $this->gs->smtp_user; $mail->Password = $this->gs->smtp_pass; if ($this->gs->smtp_encryption == 'ssl') { $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; } else { $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; } $mail->Port = $this->gs->smtp_port; $mail->CharSet = 'UTF-8'; $mail->setFrom($this->gs->from_email, $this->gs->from_name); $mail->addAddress($user->email, $user->name); $mail->addReplyTo($this->gs->from_email, $this->gs->from_name); $mail->isHTML(true); $mail->Subject = $subject; $mail->Body = $msg; $mail->send(); } catch (Exception $e) { } } else { $headers = "From: ".$this->gs->from_name."<".$this->gs->from_email.">"; mail($to,$subject,$msg,$headers); } return redirect()->back()->with('message','Invest successfully complete.'); } } Checkout/MollieController.php 0000644 00000006306 15111407530 0012311 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Models\Invest; use Session; use Auth; use Str; use Illuminate\Http\Request; use Mollie\Laravel\Facades\Mollie; use App\Repositories\OrderRepository; class MollieController extends Controller { public $orderRepositorty; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; } public function store(Request $request){ $invest = Invest::findOrFail($request->invest_id); $support = [ 'AED', 'AUD', 'BGN', 'BRL', 'CAD', 'CHF', 'CZK', 'DKK', 'EUR', 'GBP', 'HKD', 'HRK', 'HUF', 'ILS', 'ISK', 'JPY', 'MXN', 'MYR', 'NOK', 'NZD', 'PHP', 'PLN', 'RON', 'RUB', 'SEK', 'SGD', 'THB', 'TWD', 'USD', 'ZAR' ]; if(!in_array($request->currency_code,$support)){ return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning','Please Select USD Or EUR Currency For Paypal.'); } $item_amount = $request->amount; $input = $request->all(); $item_name = "Deposit via Molly Payment"; $payment = Mollie::api()->payments()->create([ 'amount' => [ 'currency' => $request->currency_code, 'value' => ''.sprintf('%0.2f', $item_amount).'', ], 'description' => $item_name , 'redirectUrl' => route('api.checkout.molly.notify'), ]); Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); Session::put('molly_data',$input); Session::put('payment_id',$payment->id); $payment = Mollie::api()->payments()->get($payment->id); return redirect($payment->getCheckoutUrl(), 303); } public function notify(Request $request){ $input = Session::get('molly_data'); $item_number = Str::random(4).time(); $payment = Mollie::api()->payments()->get(Session::get('payment_id')); dd($payment); $method = Session::get('method'); $invest_id = Session::get('invest_id'); $invest = Invest::findOrFail($invest_id); if($payment->status == 'paid'){ $addionalData = ['status'=>'running','method'=>$method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); Session::forget('molly_data'); Session::forget('method'); Session::forget('invest_id'); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning','Something went wrong!'); } return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning','Something went wrong!'); } } Checkout/CoinPaymentController.php 0000644 00000015372 15111407530 0013321 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Classes\CoinPaymentsAPI; use App\Models\Currency; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Models\Plan; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Str; class CoinPaymentController extends Controller { public function blockInvest() { return view('user.coinpay'); } public function coinCallback(Request $request) { Session::put('check_txn',$request->all()); $blockinfo = PaymentGateway::whereKeyword('coinPayment')->first(); $blocksettings= $blockinfo->convertAutoData(); $real_secret = $blocksettings['secret_string']; $trans_id = $request->custom; $status = $request->status; $amount2 = floatval($request->amount2); $currency2 = $request->currency2; $getSec = Input::get('secret'); if ($real_secret == $getSec){ if (Order::where('order_number',$trans_id)->exists()){ $order = Order::where('order_number',$trans_id)->where('payment_status','pending')->first(); if ($status >= 100 || $status == 2) { if ($currency2 == "BTC" && $order->coin_amount <= $amount2) { $data['payment_status'] = "completed"; $order->update($data); $notification = new Notification; $notification->order_id = $order->id; $notification->save(); $trans = new Transaction; $trans->email = $order->customer_email; $trans->amount = $order->invest; $trans->type = "Invest"; $trans->txnid = $order->order_number; $trans->user_id = $order->user_id; $trans->save(); $notf = new UserNotification; $notf->user_id = $order->user_id; $notf->order_id = $order->id; $notf->type = "Invest"; $notf->save(); $gs = Generalsetting::findOrFail(1); if($gs->is_affilate == 1) { $user = User::find($order->user_id); if ($user->referral_id != 0) { $val = $order->invest / 100; $sub = $val * $gs->affilate_charge; $sub = round($sub,2); $ref = User::find($user->referral_id); if(isset($ref)) { $ref->income += $sub; $ref->update(); $trans = new Transaction; $trans->email = $ref->email; $trans->amount = $sub; $trans->type = "Referral Bonus"; $trans->txnid = $order->order_number; $trans->user_id = $ref->id; $trans->save(); } } } if($gs->is_smtp == 1) { $data = [ 'to' => $order->customer_email, 'type' => "Invest", 'cname' => $order->customer_name, 'oamount' => $order->order_number, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $order->customer_email; $subject = " You have invested successfully."; $msg = "Hello ".$order->customer_name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } } } } } } public function deposit(Request $request) { $invest = Invest::findOrFail($request->invest_id); $user = User::findOrFail($invest->user_id); $generalsettings = Generalsetting::findOrFail(1); $blockinfo = PaymentGateway::whereKeyword('coinPayment')->first(); $blocksettings= $blockinfo->convertAutoData(); if($request->amount > 0){ $acc =$user; $item_number = $invest->transaction_no; $item_amount = $request->amount; $currency_code = $request->currency_code; $public_key =$blocksettings['public_key']; $private_key = $blocksettings['private_key']; $req['version'] = 1; $req['cmd'] = "get_callback_address"; $req['currency'] = $request->currency_code; $req['ipn_url'] = route('api.checkout.coinpay.notify'); $req['key'] = $public_key; $req['format'] = 'json'; $post_data = http_build_query($req, '', '&'); $hmac = hash_hmac('sha512', $post_data, $private_key); $ch = curl_init('https://www.coinpayments.net/api.php'); curl_setopt($ch, CURLOPT_FAILONERROR, TRUE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, array('HMAC: '.$hmac)); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); $data = json_decode(curl_exec($ch)); $invest->method = $request->method; $invest->notify_id = $data->result->address; $invest->update(); return redirect()->route('api.user.invest.checkout',$invest->id)->with('success',$data->result->address); }else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess', 'Something went wrong'); } } } Checkout/PaypalController.php 0000644 00000012017 15111407530 0012312 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use PayPal\{ Api\Item, Api\Payer, Api\Amount, Api\Payment, Api\ItemList, Rest\ApiContext, Api\Transaction, Api\RedirectUrls, Api\PaymentExecution, Auth\OAuthTokenCredential }; use Illuminate\Support\Facades\Redirect; use Illuminate\Support\Facades\Session; use App\Repositories\OrderRepository; use Illuminate\Http\Request; class PaypalController extends Controller { private $_api_context; public $orderRepositorty; public function __construct(OrderRepository $orderRepositorty) { $data = PaymentGateway::whereKeyword('paypal')->first(); $paydata = $data->convertAutoData(); $paypal_conf = \Config::get('paypal'); $paypal_conf['client_id'] = $paydata['client_id']; $paypal_conf['secret'] = $paydata['client_secret']; $paypal_conf['settings']['mode'] = $paydata['sandbox_check'] == 1 ? 'sandbox' : 'live'; $this->_api_context = new ApiContext(new OAuthTokenCredential( $paypal_conf['client_id'], $paypal_conf['secret']) ); $this->_api_context->setConfig($paypal_conf['settings']); $this->orderRepositorty = $orderRepositorty; } public function store(Request $request){ $cancel_url = route('api.checkout.paypal.cancel'); $notify_url = route('api.checkout.paypal.notify'); $gs = Generalsetting::findOrFail(1); $item_name = $gs->title." Invest"; $item_amount = $request->amount; $invest = Invest::findOrFail($request->invest_id); $support = ['USD','EUR']; if(!in_array($request->currency_code,$support)){ return redirect()->back()->with('warning','Please Select USD Or EUR Currency For Paypal.'); } $payer = new Payer(); $payer->setPaymentMethod('paypal'); $item_1 = new Item(); $item_1->setName($item_name) ->setCurrency('USD') ->setQuantity(1) ->setPrice($item_amount); $item_list = new ItemList(); $item_list->setItems(array($item_1)); $amount = new Amount(); $amount->setCurrency('USD') ->setTotal($item_amount); $transaction = new Transaction(); $transaction->setAmount($amount) ->setItemList($item_list) ->setDescription($item_name.' Via Paypal'); $redirect_urls = new RedirectUrls(); $redirect_urls->setReturnUrl($notify_url) ->setCancelUrl($cancel_url); $payment = new Payment(); $payment->setIntent('Sale') ->setPayer($payer) ->setRedirectUrls($redirect_urls) ->setTransactions(array($transaction)); try { $payment->create($this->_api_context); } catch (\PayPal\Exception\PPConnectionException $ex) { return redirect()->back()->with('unsuccess',$ex->getMessage()); } foreach ($payment->getLinks() as $link) { if ($link->getRel() == 'approval_url') { $redirect_url = $link->getHref(); break; } } Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); Session::put('paypal_payment_id', $payment->getId()); if (isset($redirect_url)) { return Redirect::away($redirect_url); } return redirect()->back()->with('unsuccess','Unknown error occurred'); if (isset($redirect_url)) { return Redirect::away($redirect_url); } return redirect()->back()->with('unsuccess','Unknown error occurred'); } public function notify(Request $request) { $payment_id = Session::get('paypal_payment_id'); if (empty( $request['PayerID']) || empty( $request['token'])) { return redirect()->back()->with('error', 'Payment Failed'); } $payment = Payment::get($request->paymentId, $this->_api_context); $execution = new PaymentExecution(); $execution->setPayerId($request['PayerID']); $method = Session::get('method'); $invest_id = Session::get('invest_id'); $result = $payment->execute($execution, $this->_api_context); if ($result->getState() == 'approved') { $resp = json_decode($payment, true); $addionalData = ['charge_id'=>$resp['transactions'][0]['related_resources'][0]['sale']['id'],'status'=>'running','method'=>$method]; $invest = Invest::findOrFail($invest_id); $this->orderRepositorty->apiOrder($request,$invest,$addionalData); Session::forget('method'); Session::forget('invest_id'); Session::forget('paypal_payment_id'); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); } } public function cancel(){ return back(); } } Checkout/AuthorizeController.php 0000644 00000011067 15111407530 0013042 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use Illuminate\Support\Str; use Illuminate\Http\Request; use App\Models\PaymentGateway; use App\Models\Generalsetting; use App\Models\Invest; use App\Repositories\OrderRepository; use Illuminate\Support\Facades\Validator; use net\authorize\api\contract\v1 as AnetAPI; use net\authorize\api\controller as AnetController; class AuthorizeController extends Controller { public $orderRepositorty; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; } public function store(Request $request){ $support = ['USD']; if(!in_array($request->currency_code,$support)){ return redirect()->back()->with('warning','Please Select USD Currency For Authorize.'); } $settings = Generalsetting::find(1); $authorizeinfo = PaymentGateway::whereKeyword('authorize.net')->first(); $authorizesettings= $authorizeinfo->convertAutoData(); $invest = Invest::findOrFail($request->invest_id); $item_name = $settings->title." Order"; $item_number = $invest->transaction_no; $item_amount = $request->amount; $validator = Validator::make($request->all(),[ 'cardNumber' => 'required', 'cardCVC' => 'required', 'month' => 'required', 'year' => 'required', ]); if ($validator->passes()) { $merchantAuthentication = new AnetAPI\MerchantAuthenticationType(); $merchantAuthentication->setName($authorizesettings['login_id']); $merchantAuthentication->setTransactionKey($authorizesettings['txn_key']); $refId = 'ref' . time(); $creditCard = new AnetAPI\CreditCardType(); $creditCard->setCardNumber(str_replace(' ','',$request->cardNumber)); $year = $request->year; $month = $request->month; $creditCard->setExpirationDate($year.'-'.$month); $creditCard->setCardCode($request->cardCVC); $paymentOne = new AnetAPI\PaymentType(); $paymentOne->setCreditCard($creditCard); $orderr = new AnetAPI\OrderType(); $orderr->setInvoiceNumber($item_number); $orderr->setDescription($item_name); $transactionRequestType = new AnetAPI\TransactionRequestType(); $transactionRequestType->setTransactionType("authCaptureTransaction"); $transactionRequestType->setAmount($item_amount); $transactionRequestType->setOrder($orderr); $transactionRequestType->setPayment($paymentOne); $requestt = new AnetAPI\CreateTransactionRequest(); $requestt->setMerchantAuthentication($merchantAuthentication); $requestt->setRefId($refId); $requestt->setTransactionRequest($transactionRequestType); $controller = new AnetController\CreateTransactionController($requestt); if($authorizesettings['sandbox_check'] == 1){ $response = $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::SANDBOX); } else { $response = $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::PRODUCTION); } if ($response != null) { if ($response->getMessages()->getResultCode() == "Ok") { $tresponse = $response->getTransactionResponse(); if ($tresponse != null && $tresponse->getMessages() != null) { $addionalData = ['txnid'=>$tresponse->getTransId(), 'status'=>'running', 'method' => $request->method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest Successfully Complete.'); } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning', 'Payment Failed.'); } } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning', 'Payment Failed.'); } } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning', 'Payment Failed.'); } } return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning', 'Invalid Payment Details.'); } } Checkout/CoinGateController.php 0000644 00000013732 15111407530 0012562 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Classes\GeniusMailer; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Models\Plan; use App\Models\Transaction; use App\Models\User; use CoinGate\CoinGate; use Illuminate\Http\Request; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Str; class CoinGateController extends Controller { public function coingetCallback(Request $request) { $trans_id = $request->order_id; if ($request->status == 'paid') { if (Invest::where('transaction_no',$trans_id)->where('payment_status','pending')->exists()){ $deposits = $request->receive_amount; $order = Invest::where('transaction_no',$trans_id)->where('payment_status','pending')->first(); $data['coin_amount'] = $request->pay_amount; $data['status'] = 1; $data['payment_status'] = "completed"; $data['txnid'] = $request->token; $order->update($data); $user = User::whereId($order->user_id)->first(); $trans = new Transaction(); $trans->email = $user->email; $trans->amount = $order->amount; $trans->type = "Invest"; $trans->txnid = $order->transaction_no; $trans->user_id = $order->user_id; $trans->save(); $gs = Generalsetting::findOrFail(1); if($gs->is_affilate == 1) { $user = User::find($order->user_id); if ($user->referral_id != 0) { $val = $order->invest / 100; $sub = $val * $gs->affilate_charge; $sub = round($sub,2); $ref = User::find($user->referral_id); if(isset($ref)) { $ref->income += $sub; $ref->update(); $trans = new Transaction; $trans->email = $ref->email; $trans->amount = $sub; $trans->type = "Referral Bonus"; $trans->txnid = $order->order_number; $trans->user_id = $ref->id; $trans->save(); } } } if($gs->is_smtp == 1) { $data = [ 'to' => $order->customer_email, 'type' => "Invest", 'cname' => $order->customer_name, 'oamount' => $order->order_number, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $order->customer_email; $subject = " You have invested successfully."; $msg = "Hello ".$order->customer_name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } // return "*ok*"; } } } public function deposit(Request $request) { $invest = Invest::findOrFail($request->invest_id); $user = User::findOrFail($invest->user_id); $generalsettings = Generalsetting::findOrFail(1); $blockinfo = PaymentGateway::whereKeyword('coingate')->first(); $blocksettings= $blockinfo->convertAutoData(); if($request->amount > 0){ $acc = $user; $item_number = $invest->transaction_no; $item_amount = $request->amount; $currency_code = $request->currency_code; $item_name = $generalsettings->title." Invest"; $my_callback_url = route('api.checkout.coingate.notify'); $return_url = route('api.user.invest.checkout',$invest->id); $cancel_url = route('api.user.invest.checkout',$invest->id); CoinGate::config(array( 'environment' => 'sandbox', // sandbox OR live 'auth_token' => $blocksettings['secret_string'] )); $post_params = array( 'order_id' => $item_number, 'price_amount' => $item_amount, 'price_currency' => $currency_code, 'receive_currency' => $currency_code, 'callback_url' => $my_callback_url, 'cancel_url' => $cancel_url, 'success_url' => $return_url, 'title' => $item_name, 'description' => 'Invest' ); $coinGate = \CoinGate\Merchant\Order::create($post_params); if ($coinGate) { $invest->method = $request->method; $invest->update(); return redirect($coinGate->payment_url); } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','Some Problem Occurrs! Please Try Again'); } } return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','Please enter a valid amount.')->withInput(); } } Checkout/error_log 0000644 00000006073 15111407530 0010231 0 ustar 00 [25-Nov-2025 18:00:40 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/StripeController.php:20 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/StripeController.php on line 20 [25-Nov-2025 18:02:12 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/MercadopagoController.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/MercadopagoController.php on line 19 [25-Nov-2025 18:46:12 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/CoinPaymentController.php:18 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/CoinPaymentController.php on line 18 [25-Nov-2025 19:52:16 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/CoinGateController.php:20 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/CoinGateController.php on line 20 [25-Nov-2025 19:56:32 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PaytmController.php:15 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PaytmController.php on line 15 [25-Nov-2025 19:57:58 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/ManualController.php:13 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/ManualController.php on line 13 [25-Nov-2025 20:00:45 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/RazorpayController.php:14 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/RazorpayController.php on line 14 [25-Nov-2025 20:04:04 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PerfectMoneyController.php:17 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PerfectMoneyController.php on line 17 [25-Nov-2025 20:04:19 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/AuthorizeController.php:16 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/AuthorizeController.php on line 16 Checkout/SkrillController.php 0000644 00000005273 15111407530 0012332 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Repositories\OrderRepository; use Illuminate\Http\Request; use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; class SkrillController extends Controller { public $orderRepositorty; public $allusers = []; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; $this->payment = PaymentGateway::whereKeyword('skrill')->first(); $this->paydata = $this->payment->convertAutoData(); } public function store(Request $request){ $gs = Generalsetting::findOrFail(1); $invest_name = $gs->title." Invest"; $invest_number = Str::random(4).time(); $invest = Invest::findOrFail($request->invest_id); Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); $info['pay_to_email'] = trim($this->paydata['email']); $info['transaction_id'] = $invest->transaction_no; $info['status_url'] = route('api.checkout.skrill.notify'); $info['language'] = 'EN'; $info['amount'] = round($request->amount,2); $info['currency'] = $request->currency_code; $info['detail1_description'] = $gs->title; $info['detail1_text'] = "Pay To ".$gs->title; $data['info'] = $info; $data['method'] = "POST"; $data['url'] = "https://pay.skrill.com"; return view('payment.redirect',compact('data')); } public function notify(Request $request){ $method = Session::get('method'); $invest_id = Session::get('invest_id'); $invest = Invest::findOrFail($invest_id); $concatFields = $request->merchant_id . $request->transaction_id . strtoupper(md5(trim($this->paydata['secret']))) . $request->mb_amount . $request->mb_currency . $request->status; if (strtoupper(md5($concatFields)) == $request->md5sig && $request->pay_to_email == trim($this->paydata['email']) && $invest->status = '0') { $addionalData = ['status'=>'running','method'=>$method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); }else{ return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','Something went wrong!'); } } } Checkout/PaystackController.php 0000644 00000002052 15111407530 0012641 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use App\Models\Generalsetting; use App\Models\Invest; use App\Repositories\OrderRepository; use Illuminate\Support\Str; class PaystackController extends Controller { public $orderRepositorty; public $allusers = []; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; } public function store(Request $request){ if($request->currency_code != "NGN") { return redirect()->back()->with('unsuccess','Please Select NGN Currency For Paystack.'); } $invest = Invest::findOrFail($request->invest_id); $addionalData = ['txnid'=>$request->paystack_txn, 'status'=>'running', 'method' => $request->method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); } } Checkout/StripeController.php 0000644 00000006670 15111407530 0012342 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use Cartalyst\Stripe\Laravel\Facades\Stripe; use App\Repositories\OrderRepository; use App\Http\Controllers\Controller; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use Illuminate\Http\Request; use Illuminate\Support\Str; use App\Models\Transaction; use App\Models\Referral; use App\Models\User; use Carbon\Carbon; use Validator; use Config; class StripeController extends Controller { public $orderRepositorty; public $allusers = []; public function __construct(OrderRepository $orderRepositorty) { $data = PaymentGateway::whereKeyword('Stripe')->first(); $paydata = $data->convertAutoData(); Config::set('services.stripe.key', $paydata['key']); Config::set('services.stripe.secret', $paydata['secret']); $this->orderRepositorty = $orderRepositorty; } public function store(Request $request){ $gs = Generalsetting::findOrFail(1); $item_name = $gs->title." Invest"; $item_number = Str::random(4).time(); $item_amount = $request->amount; $invest_id = $request->invest_id; $support = ['USD']; if(!in_array($request->currency_code,$support)){ return redirect()->back()->with('warning','Please Select USD Currency For Stripe.'); } $validator = Validator::make($request->all(),[ 'cardNumber' => 'required', 'cardCVC' => 'required', 'month' => 'required', 'year' => 'required', ]); if ($validator->passes()) { $stripe = Stripe::make(Config::get('services.stripe.secret')); try{ $token = $stripe->tokens()->create([ 'card' =>[ 'number' => $request->cardNumber, 'exp_month' => $request->month, 'exp_year' => $request->year, 'cvc' => $request->cardCVC, ], ]); if (!isset($token['id'])) { return back()->with('error','Token Problem With Your Token.'); } $charge = $stripe->charges()->create([ 'card' => $token['id'], 'currency' => $request->currency_code, 'amount' => $item_amount, 'description' => $item_name, ]); if ($charge['status'] == 'succeeded') { $addionalData = ['txnid'=>$charge['balance_transaction'],'charge_id'=>$charge['id'],'status'=>'running']; $invest = Invest::findOrFail($invest_id); $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return back()->with('success','Invest successfully complete.'); } }catch (Exception $e){ return back()->with('unsuccess', $e->getMessage()); }catch (\Cartalyst\Stripe\Exception\CardErrorException $e){ return back()->with('unsuccess', $e->getMessage()); }catch (\Cartalyst\Stripe\Exception\MissingParameterException $e){ return back()->with('unsuccess', $e->getMessage()); } } return back()->with('warning', 'Please Enter Valid Credit Card Informations.'); } } Checkout/PaytmController.php 0000644 00000031765 15111407530 0012171 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Repositories\OrderRepository; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use Illuminate\Support\Str; use Illuminate\Http\Request; use Illuminate\Support\Facades\Session; class PaytmController extends Controller { public $orderRepositorty; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; } public function store(Request $request){ if($request->currency_code != "INR") { return redirect()->back()->with('unsuccess','Please Select INR Currency For Paytm.'); } $settings = Generalsetting::findOrFail(1); $invest = Invest::findOrFail($request->invest_id); $item_name = $settings->title." Invest"; $item_number = $invest->transaction_no; $item_amount = $request->amount; Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); $data_for_request = $this->handlePaytmRequest( $item_number, $item_amount ); $paytm_txn_url = 'https://securegw-stage.paytm.in/theia/processTransaction'; $paramList = $data_for_request['paramList']; $checkSum = $data_for_request['checkSum']; return view( 'frontend.paytm-merchant-form', compact( 'paytm_txn_url', 'paramList', 'checkSum' ) ); } public function handlePaytmRequest( $transaction_id, $amount) { $gs = Generalsetting::first(); $data = PaymentGateway::whereKeyword('Paytm')->first(); $paydata = $data->convertAutoData(); $this->getAllEncdecFunc(); $checkSum = ""; $paramList = array(); $paramList["MID"] = $paydata['merchant']; $paramList["ORDER_ID"] = $transaction_id; $paramList["CUST_ID"] = $transaction_id; $paramList["INDUSTRY_TYPE_ID"] = $paydata['industry']; $paramList["CHANNEL_ID"] = 'WEB'; $paramList["TXN_AMOUNT"] = $amount; $paramList["WEBSITE"] = $paydata['website']; $paramList["CALLBACK_URL"] = route('api.checkout.paytm.notify'); $paytm_merchant_key = $paydata['secret']; $checkSum = getChecksumFromArray( $paramList, $paytm_merchant_key ); return array( 'checkSum' => $checkSum, 'paramList' => $paramList ); } function getAllEncdecFunc() { function encrypt_e($input, $ky) { $key = html_entity_decode($ky); $iv = "@@@@&&&&####$$$$"; $data = openssl_encrypt ( $input , "AES-128-CBC" , $key, 0, $iv ); return $data; } function decrypt_e($crypt, $ky) { $key = html_entity_decode($ky); $iv = "@@@@&&&&####$$$$"; $data = openssl_decrypt ( $crypt , "AES-128-CBC" , $key, 0, $iv ); return $data; } function pkcs5_pad_e($text, $blocksize) { $pad = $blocksize - (strlen($text) % $blocksize); return $text . str_repeat(chr($pad), $pad); } function pkcs5_unpad_e($text) { $pad = ord($text(strlen($text) - 1)); if ($pad > strlen($text)) return false; return substr($text, 0, -1 * $pad); } function generateSalt_e($length) { $random = ""; srand((double) microtime() * 1000000); $data = "AbcDE123IJKLMN67QRSTUVWXYZ"; $data .= "aBCdefghijklmn123opq45rs67tuv89wxyz"; $data .= "0FGH45OP89"; for ($i = 0; $i < $length; $i++) { $random .= substr($data, (rand() % (strlen($data))), 1); } return $random; } function checkString_e($value) { if ($value == 'null') $value = ''; return $value; } function getChecksumFromArray($arrayList, $key, $sort=1) { if ($sort != 0) { ksort($arrayList); } $str = getArray2Str($arrayList); $salt = generateSalt_e(4); $finalString = $str . "|" . $salt; $hash = hash("sha256", $finalString); $hashString = $hash . $salt; $checksum = encrypt_e($hashString, $key); return $checksum; } function getChecksumFromString($str, $key) { $salt = generateSalt_e(4); $finalString = $str . "|" . $salt; $hash = hash("sha256", $finalString); $hashString = $hash . $salt; $checksum = encrypt_e($hashString, $key); return $checksum; } function verifychecksum_e($arrayList, $key, $checksumvalue) { $arrayList = removeCheckSumParam($arrayList); ksort($arrayList); $str = getArray2StrForVerify($arrayList); $paytm_hash = decrypt_e($checksumvalue, $key); $salt = substr($paytm_hash, -4); $finalString = $str . "|" . $salt; $website_hash = hash("sha256", $finalString); $website_hash .= $salt; $validFlag = "FALSE"; if ($website_hash == $paytm_hash) { $validFlag = "TRUE"; } else { $validFlag = "FALSE"; } return $validFlag; } function verifychecksum_eFromStr($str, $key, $checksumvalue) { $paytm_hash = decrypt_e($checksumvalue, $key); $salt = substr($paytm_hash, -4); $finalString = $str . "|" . $salt; $website_hash = hash("sha256", $finalString); $website_hash .= $salt; $validFlag = "FALSE"; if ($website_hash == $paytm_hash) { $validFlag = "TRUE"; } else { $validFlag = "FALSE"; } return $validFlag; } function getArray2Str($arrayList) { $findme = 'REFUND'; $findmepipe = '|'; $paramStr = ""; $flag = 1; foreach ($arrayList as $key => $value) { $pos = strpos($value, $findme); $pospipe = strpos($value, $findmepipe); if ($pos !== false || $pospipe !== false) { continue; } if ($flag) { $paramStr .= checkString_e($value); $flag = 0; } else { $paramStr .= "|" . checkString_e($value); } } return $paramStr; } function getArray2StrForVerify($arrayList) { $paramStr = ""; $flag = 1; foreach ($arrayList as $key => $value) { if ($flag) { $paramStr .= checkString_e($value); $flag = 0; } else { $paramStr .= "|" . checkString_e($value); } } return $paramStr; } function redirect2PG($paramList, $key) { $hashString = getchecksumFromArray($paramList, $key); $checksum = encrypt_e($hashString, $key); } function removeCheckSumParam($arrayList) { if (isset($arrayList["CHECKSUMHASH"])) { unset($arrayList["CHECKSUMHASH"]); } return $arrayList; } function getTxnStatus($requestParamList) { return callAPI(PAYTM_STATUS_QUERY_URL, $requestParamList); } function getTxnStatusNew($requestParamList) { return callNewAPI(PAYTM_STATUS_QUERY_NEW_URL, $requestParamList); } function initiateTxnRefund($requestParamList) { $CHECKSUM = getRefundChecksumFromArray($requestParamList,PAYTM_MERCHANT_KEY,0); $requestParamList["CHECKSUM"] = $CHECKSUM; return callAPI(PAYTM_REFUND_URL, $requestParamList); } function callAPI($apiURL, $requestParamList) { $jsonResponse = ""; $responseParamList = array(); $JsonData =json_encode($requestParamList); $postData = 'JsonData='.urlencode($JsonData); $ch = curl_init($apiURL); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($postData)) ); $jsonResponse = curl_exec($ch); $responseParamList = json_decode($jsonResponse,true); return $responseParamList; } function callNewAPI($apiURL, $requestParamList) { $jsonResponse = ""; $responseParamList = array(); $JsonData =json_encode($requestParamList); $postData = 'JsonData='.urlencode($JsonData); $ch = curl_init($apiURL); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($postData)) ); $jsonResponse = curl_exec($ch); $responseParamList = json_decode($jsonResponse,true); return $responseParamList; } function getRefundChecksumFromArray($arrayList, $key, $sort=1) { if ($sort != 0) { ksort($arrayList); } $str = getRefundArray2Str($arrayList); $salt = generateSalt_e(4); $finalString = $str . "|" . $salt; $hash = hash("sha256", $finalString); $hashString = $hash . $salt; $checksum = encrypt_e($hashString, $key); return $checksum; } function getRefundArray2Str($arrayList) { $findmepipe = '|'; $paramStr = ""; $flag = 1; foreach ($arrayList as $key => $value) { $pospipe = strpos($value, $findmepipe); if ($pospipe !== false) { continue; } if ($flag) { $paramStr .= checkString_e($value); $flag = 0; } else { $paramStr .= "|" . checkString_e($value); } } return $paramStr; } function callRefundAPI($refundApiURL, $requestParamList) { $jsonResponse = ""; $responseParamList = array(); $JsonData =json_encode($requestParamList); $postData = 'JsonData='.urlencode($JsonData); $ch = curl_init($apiURL); curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_URL, $refundApiURL); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $headers = array(); $headers[] = 'Content-Type: application/json'; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $jsonResponse = curl_exec($ch); $responseParamList = json_decode($jsonResponse,true); return $responseParamList; } } function getConfigPaytmSettings() { $gs = Generalsetting::first(); if ($gs->paytm_mode == 'sandbox') { define('PAYTM_ENVIRONMENT', 'TEST'); // PROD } elseif ($gs->paytm_mode == 'live') { define('PAYTM_ENVIRONMENT', 'PROD'); // PROD } define('PAYTM_MERCHANT_KEY', $gs->paytm_secret); define('PAYTM_MERCHANT_MID', $gs->paytm_merchant); define('PAYTM_MERCHANT_WEBSITE', $gs->paytm_website); $PAYTM_STATUS_QUERY_NEW_URL='https://securegw-stage.paytm.in/merchant-status/getTxnStatus'; $PAYTM_TXN_URL='https://securegw-stage.paytm.in/theia/processTransaction'; if (PAYTM_ENVIRONMENT == 'PROD') { $PAYTM_STATUS_QUERY_NEW_URL='https://securegw.paytm.in/merchant-status/getTxnStatus'; $PAYTM_TXN_URL='https://securegw.paytm.in/theia/processTransaction'; } define('PAYTM_REFUND_URL', ''); define('PAYTM_STATUS_QUERY_URL', $PAYTM_STATUS_QUERY_NEW_URL); define('PAYTM_STATUS_QUERY_NEW_URL', $PAYTM_STATUS_QUERY_NEW_URL); define('PAYTM_TXN_URL', $PAYTM_TXN_URL); } public function paytmCallback( Request $request ) { $method = Session::get('method'); $invest_id = Session::get('invest_id'); $transaction_id = $request['ORDERID']; if ( 'TXN_SUCCESS' === $request['STATUS'] ) { $invest = Invest::findOrFail($invest_id); $addionalData = ['txnid' => $request['TXNID'], 'status'=>'running','method'=>$method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); Session::forget('method'); Session::forget('invest_id'); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); } else if( 'TXN_FAILURE' === $request['STATUS'] ){ return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning','Payment Cancelled!'); } } } Checkout/FlutterwaveController.php 0000644 00000011143 15111407530 0013373 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use Illuminate\Support\Str; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Models\User; use App\Repositories\OrderRepository; use Illuminate\Support\Facades\Session; class FlutterwaveController extends Controller { public $public_key; private $secret_key; public $orderRepositorty; public function __construct(OrderRepository $orderRepositorty) { $data = PaymentGateway::whereKeyword('flutterwave')->first(); $paydata = $data->convertAutoData(); $this->public_key = $paydata['public_key']; $this->secret_key = $paydata['secret_key']; $this->orderRepositorty = $orderRepositorty; } public function store(Request $request) { $invest = Invest::findOrFail($request->invest_id); $user = User::findOrFail($invest->user_id); $item_amount = $request->amount; $curl = curl_init(); $customer_email = $user->email; $amount = $item_amount; $currency = $request->currency_code; $txref = $invest->transaction_no; $PBFPubKey = $this->public_key; $redirect_url = route('api.checkout.flutter.notify'); $payment_plan = ""; Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.ravepay.co/flwv3-pug/getpaidx/api/v2/hosted/pay", CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'amount' => $amount, 'customer_email' => $customer_email, 'currency' => $currency, 'txref' => $txref, 'PBFPubKey' => $PBFPubKey, 'redirect_url' => $redirect_url, 'payment_plan' => $payment_plan ]), CURLOPT_HTTPHEADER => [ "content-type: application/json", "cache-control: no-cache" ], )); $response = curl_exec($curl); $err = curl_error($curl); if($err){ die('Curl returned error: ' . $err); } $transaction = json_decode($response); if(!$transaction->data && !$transaction->data->link){ print_r('API returned error: ' . $transaction->message); } return redirect($transaction->data->link); } public function notify(Request $request) { $input = $request->all(); $method = Session::get('method'); $invest_id = Session::get('invest_id'); $invest = Invest::findOrFail($invest_id); if($request->cancelled == "true"){ return redirect()->route('api.user.invest.checkout',$invest->id)->with('success',__('Payment Cancelled!')); } if (isset($input['txref'])) { $ref = $input['txref']; $query = array( "SECKEY" => $this->secret_key, "txref" => $ref ); $data_string = json_encode($query); $ch = curl_init('https://api.ravepay.co/flwv3-pug/getpaidx/api/v2/verify'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); $response = curl_exec($ch); curl_close($ch); $resp = json_decode($response, true); if ($resp['status'] == "success") { $paymentStatus = $resp['data']['status']; $chargeResponsecode = $resp['data']['chargecode']; if (($chargeResponsecode == "00" || $chargeResponsecode == "0") && ($paymentStatus == "successful")) { $addionalData = ['status'=>'running','method'=>$method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning','Something went wrong!'); } } } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning','Something went wrong!'); } } } Checkout/PerfectMoneyController.php 0000644 00000007510 15111407530 0013466 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Models\User; use App\Repositories\OrderRepository; use Illuminate\Http\Request; use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; class PerfectMoneyController extends Controller { public $orderRepositorty; public $allusers = []; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; $this->payment = PaymentGateway::whereKeyword('perfectmoney')->first(); $this->paydata = $this->payment->convertAutoData(); } public function store(Request $request){ $method = Session::get('method'); $invest_id = Session::get('invest_id'); $invest = Invest::findOrFail($invest_id); $user = User::findOrFail($invest->user_id); $gs = Generalsetting::findOrFail(1); $invest_name = $gs->title." Invest"; Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); $info['PAYEE_ACCOUNT'] = trim($this->paydata['wallet_code']); $info['PAYEE_NAME'] = $invest_name; $info['PAYMENT_ID'] = $invest->transaction_no; $info['PAYMENT_AMOUNT'] = round($request->amount,2); $info['PAYMENT_UNITS'] = $request->currency_code; $info['STATUS_URL'] = route('api.checkout.perfectmoney.notify'); $info['PAYMENT_URL'] = route('api.user.invest.checkout',$invest->id); $info['PAYMENT_URL_METHOD'] = 'POST'; $info['NOPAYMENT_URL'] = route('api.user.invest.checkout',$invest->id); $info['NOPAYMENT_URL_METHOD'] = 'POST'; $info['SUGGESTED_MEMO'] = $user->name; $info['BAGGAGE_FIELDS'] = 'IDENT'; $data['info'] = $info; $data['method'] = 'post'; $data['url'] = 'https://perfectmoney.is/api/step1.asp'; return view('payment.redirect',compact('data')); } public function notify(Request $request){ $method = Session::get('method'); $invest_id = Session::get('invest_id'); $invest = Invest::findOrFail($invest_id); $alt_passphrase = strtoupper(md5($this->paydata['alternative_passphrase'])); define('ALTERNATE_PHRASE_HASH', $alt_passphrase); define('PATH_TO_LOG', '/somewhere/out/of/document_root/'); $string = $_POST['PAYMENT_ID'] . ':' . $_POST['PAYEE_ACCOUNT'] . ':' . $_POST['PAYMENT_AMOUNT'] . ':' . $_POST['PAYMENT_UNITS'] . ':' . $_POST['PAYMENT_BATCH_NUM'] . ':' . $_POST['PAYER_ACCOUNT'] . ':' . ALTERNATE_PHRASE_HASH . ':' . $_POST['TIMESTAMPGMT']; $hash = strtoupper(md5($string)); $hash2 = $_POST['V2_HASH']; if ($hash == $hash2) { foreach ($_POST as $key => $value) { $details[$key] = $value; } $pay_amount = $_POST['PAYMENT_AMOUNT']; $track = $_POST['PAYMENT_ID']; if ($_POST['PAYEE_ACCOUNT'] == $this->paydata['wallet_code'] && $pay_amount == round($invest->amount,2) && $invest->status == 0) { $addionalData = ['txnid'=>$details, 'status'=>'running', 'method'=>$method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); }else{ return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','Something went wrong!'); } }else{ return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','Something went wrong!'); } } } Checkout/MercadopagoController.php 0000644 00000003541 15111407530 0013307 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Models\Plan; use App\Models\User; use App\Repositories\OrderRepository; use Illuminate\Http\Request; use Illuminate\Support\Carbon; use Illuminate\Support\Str; use MercadoPago; use Auth; class MercadopagoController extends Controller { public $orderRepositorty; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; } public function store(Request $request){ $gs = Generalsetting::findOrFail(1); $invest = Invest::findOrFail($request->invest_id); $user = User::findOrFail($invest->user_id); $payment_amount = $invest->amount; $data = PaymentGateway::whereKeyword('mercadopago')->first(); $paydata = $data->convertAutoData(); MercadoPago\SDK::setAccessToken($paydata['token']); $payment = new MercadoPago\Payment(); $payment->transaction_amount = $payment_amount; $payment->token = $request->token; $payment->description = 'Checkout '.$gs->title; $payment->installments = 1; $payment->payer = array( "email" => $user ? $user->email : 'example@gmail.com' ); $payment->save(); if ($payment->status == 'approved') { $addionalData = ['status'=>'running', 'method'=>$request->method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); }else{ return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','Something went wrong!'); } } } Checkout/PayeerController.php 0000644 00000007311 15111407530 0012312 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Repositories\OrderRepository; use Illuminate\Http\Request; use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; class PayeerController extends Controller { public $orderRepositorty; public $allusers = []; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; $this->payment = PaymentGateway::whereKeyword('payeer')->first(); $this->paydata = $this->payment->convertAutoData(); } public function store(Request $request){ $gs = Generalsetting::findOrFail(1); $invest_name = $gs->title." Invest"; $invest_number = Str::random(4).time(); $invest = Invest::findOrFail($request->invest_id); Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); $arHash = [ trim($this->paydata['merchant_id']), $invest->transaction_no, $request->amount, $request->currency_code, base64_encode("Pay To $gs->title"), trim($this->paydata['secret_key']) ]; $info['m_shop'] = trim($this->paydata['merchant_id']); $info['m_orderid'] = $invest->transaction_no; $info['m_amount'] = $request->amount; $info['m_curr'] = $request->currency_code; $info['m_desc'] = base64_encode("Pay To $gs->title"); $info['m_sign'] = strtoupper(hash('sha256', implode(":", $arHash))); $info['lang'] = 'en'; $data['info'] = $info; $data['method'] = "GET"; $data['url'] = "https://payeer.com/merchant"; return view('payment.redirect',compact('data')); } public function notify(Request $request) { $method = Session::get('method'); $invest_id = Session::get('invest_id'); $invest = Invest::findOrFail($invest_id); if (isset($request->m_operation_id) && isset($request->m_sign)) { $sign_hash = strtoupper(hash('sha256', implode(":", array( $request->m_operation_id, $request->m_operation_ps, $request->m_operation_date, $request->m_operation_pay_date, $request->m_shop, $request->m_orderid, $request->m_amount, $request->m_curr, $request->m_desc, $request->m_status, $this->paydata['secret_key'] )))); if ($request->m_sign != $sign_hash) { return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','digital signature not matched!'); } else { $invest = Invest::where('transaction_no', $request->m_orderid)->first(); if ($request->m_amount == round($invest->amount,2) && $request->m_status == 'success' && $invest->status == 0) { $addionalData = ['status'=>'running','method'=>$method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','transaction was unsuccessful!'); } } } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','transaction was unsuccessful!'); } } } Checkout/InstamojoController.php 0000644 00000006726 15111407530 0013041 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use Illuminate\Support\Facades\Session; use App\Repositories\OrderRepository; use App\Http\Controllers\Controller; use App\Models\Generalsetting; use App\Models\PaymentGateway; use Illuminate\Http\Request; use Illuminate\Support\Str; use App\Classes\Instamojo; use App\Models\Currency; use App\Models\Invest; use App\Models\User; class InstamojoController extends Controller { public $orderRepositorty; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; } public function store(Request $request) { $data = PaymentGateway::whereKeyword('instamojo')->first(); $invest = Invest::findOrFail($request->invest_id); $user = User::findOrFail($invest->user_id); $gs = Generalsetting::first(); $total = $request->amount; $paydata = $data->convertAutoData(); if($request->currency_code != "INR") { return redirect()->back()->with('unsuccess',__('Please Select INR Currency For This Payment.')); } $order['item_name'] = $gs->title." Order"; $order['item_number'] = $invest->transaction_no; $order['item_amount'] = $total; $cancel_url = route('api.checkout.instamojo.cancel'); $notify_url = route('api.checkout.instamojo.notify'); if($paydata['sandbox_check'] == 1){ $api = new Instamojo($paydata['key'], $paydata['token'], 'https://test.instamojo.com/api/1.1/'); } else { $api = new Instamojo($paydata['key'], $paydata['token']); } try { $response = $api->paymentRequestCreate(array( "purpose" => $order['item_name'], "amount" => $order['item_amount'], "send_email" => true, "email" => $user->email, "redirect_url" => $notify_url )); $redirect_url = $response['longurl']; Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); Session::put('order_data',$order); Session::put('order_payment_id', $response['id']); return redirect($redirect_url); } catch (Exception $e) { return redirect($cancel_url)->with('unsuccess','Error: ' . $e->getMessage()); } } public function notify(Request $request) { $input_data = $request->all(); $payment_id = Session::get('order_payment_id'); $method = Session::get('method'); $invest_id = Session::get('invest_id'); $invest = Invest::findOrFail($invest_id); if($input_data['payment_status'] == 'Failed'){ return redirect()->route('api.user.invest.checkout',$invest->id)->with('error','Something went wrong!'); } if ($input_data['payment_request_id'] == $payment_id) { $addionalData = ['txnid' => $payment_id, 'status'=>'running','method'=>$method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); } return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning','Something went wrong!'); } public function cancel(){ return redirect()->route('user.invest.checkout')->with('warning','Something went wrong!'); } } Deposit/RazorpayController.php 0000644 00000015364 15111407530 0012545 0 ustar 00 <?php namespace App\Http\Controllers\Api\Deposit; use App\Classes\GeniusMailer; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Deposit; use App\Models\Generalsetting; use App\Models\PaymentGateway; use App\Models\Transaction; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; use Razorpay\Api\Api; class RazorpayController extends Controller { public function __construct() { $data = PaymentGateway::whereKeyword('razorpay')->first(); $paydata = $data->convertAutoData(); $this->keyId = $paydata['key']; $this->keySecret = $paydata['secret']; $this->displayCurrency = 'INR'; $this->api = new Api($this->keyId, $this->keySecret); } public function store(Request $request) { if($request->currency_code != "INR") { return redirect()->back()->with('warning','Please Select INR Currency For Rezorpay.'); } $gs = Generalsetting::findOrFail(1); $deposit = Deposit::findOrFail($request->deposit_id); $input = $request->all(); $item_name = $gs->title." Deposit"; $item_number = $deposit->deposit_number; $item_amount = $request->amount; $order['item_name'] = $item_name; $order['item_number'] = $item_number; $order['item_amount'] = round($item_amount,2); $cancel_url = route('api.deposit.razorpay.cancel'); $notify_url = route('api.deposit.razorpay.notify'); $orderData = [ 'receipt' => $order['item_number'], 'amount' => $order['item_amount'] * 100, // 2000 rupees in paise 'currency' => 'INR', 'payment_capture' => 1 // auto capture ]; $razorpayOrder = $this->api->order->create($orderData); // $input['user_id'] = auth()->user()->id; Session::put('input_data',$input); Session::put('order_data',$order); Session::put('order_payment_id', $razorpayOrder['id']); $displayAmount = $amount = $orderData['amount']; if ($this->displayCurrency !== 'INR') { $url = "https://api.fixer.io/latest?symbols=$this->displayCurrency&base=INR"; $exchange = json_decode(file_get_contents($url), true); $displayAmount = $exchange['rates'][$this->displayCurrency] * $amount / 100; } $checkout = 'automatic'; if (isset($_GET['checkout']) and in_array($_GET['checkout'], ['automatic', 'manual'], true)) { $checkout = $_GET['checkout']; } $data = [ "key" => $this->keyId, "amount" => $amount, "name" => $order['item_name'], "description" => $order['item_name'], "prefill" => [ "name" => $request->customer_name, "email" => $request->customer_email, "contact" => $request->customer_phone, ], "notes" => [ "address" => $request->customer_address, "merchant_order_id" => $order['item_number'], ], "theme" => [ "color" => "{{$gs->colors}}" ], "order_id" => $razorpayOrder['id'], ]; if ($this->displayCurrency !== 'INR') { $data['display_currency'] = $this->displayCurrency; $data['display_amount'] = $displayAmount; } $json = json_encode($data); $displayCurrency = $this->displayCurrency; Session::put('method',$request->method); Session::put('deposit_id',$request->deposit_id); return view( 'frontend.razorpay-checkout', compact( 'data','displayCurrency','json','notify_url' ) ); } public function notify(Request $request) { $input = Session::get('input_data'); $order_data = Session::get('order_data'); $input_data = $request->all(); $payment_id = Session::get('order_payment_id'); $method = Session::get('method'); $deposit_id = Session::get('deposit_id'); $deposit = Deposit::findOrFail($deposit_id); $success = true; if (empty($input_data['razorpay_payment_id']) === false) { try { $attributes = array( 'razorpay_order_id' => $payment_id, 'razorpay_payment_id' => $input_data['razorpay_payment_id'], 'razorpay_signature' => $input_data['razorpay_signature'] ); $this->api->utility->verifyPaymentSignature($attributes); } catch(SignatureVerificationError $e) { $success = false; } } if ($success === true){ $deposit['method'] = $method; $deposit['txnid'] = $payment_id; $deposit['status'] = "complete"; $deposit->update(); $gs = Generalsetting::findOrFail(1); $user = User::findOrFail($deposit->user_id); $user->balance += $deposit->amount; $user->save(); $trans = new Transaction(); $trans->email = $user->email; $trans->amount = $deposit->amount; $trans->type = "Deposit"; $trans->profit = "plus"; $trans->txnid = $deposit->deposit_number; $trans->user_id = $user->id; $trans->save(); if($gs->is_smtp == 1) { $data = [ 'to' => $user->email, 'type' => "Deposit", 'cname' => $user->name, 'oamount' => $input['amount'], 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $user->email; $subject = " You have deposited successfully."; $msg = "Hello ".$user->name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('success','Deposit amount '.$input['amount'].' ('.$input['currency_code'].') successfully!'); } return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('warning','Something Went wrong!'); } } Deposit/BlockIoController.php 0000644 00000012757 15111407530 0012263 0 ustar 00 <?php namespace App\Http\Controllers\Api\Deposit; use App\Classes\BlockIO; use App\Classes\GeniusMailer; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Deposit; use App\Models\Generalsetting; use App\Models\PaymentGateway; use App\Models\Transaction; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Str; class BlockIoController extends Controller { public function blockioInvest() { return view('user.deposit.blockio'); } public function blockiocallback(Request $request) { $notifyID = $request['notification_id']; $amountRec = $request['data']['amount_received']; $deposit = Deposit::where('notify_id',$notifyID)->where('status','pending')->first(); if ($deposit != NULL){ $data['txnid'] = $request['data']['txid']; $data['status'] = "complete"; $deposit->update($data); $user = auth()->user(); $gs = Generalsetting::findOrFail(1); if($gs->is_smtp == 1) { $data = [ 'to' => $user->email, 'type' => "Deposit", 'cname' => $user->name, 'oamount' => $deposit->amount, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $user->email; $subject = " You have deposited successfully."; $msg = "Hello ".$user->name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } $user->balance += $deposit->amount; $user->save(); $trans = new Transaction(); $trans->email = $user->email; $trans->amount = $deposit->amount; $trans->type = "Deposit"; $trans->profit = "plus"; $trans->txnid = $deposit->deposit_number; $trans->user_id = $user->id; $trans->save(); dd('SUCCESS'); } } function curlGetCall($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPGET, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $data = curl_exec ($ch); curl_close ($ch); return $data; } public function deposit(Request $request) { $deposit = Deposit::findOrFail($request->deposit_id); if($request->amount > 0){ $methods = $request->method; $version = 2; $coin = "BTC"; $my_api_key = ''; if($methods == "block.io.ltc"){ $blockinfo = PaymentGateway::whereKeyword('block.io.ltc')->first(); $blocksettings= $blockinfo->convertAutoData(); $coin = "Litecoin"; $my_api_key = $blocksettings['blockio_api_ltc']; }elseif($methods == "block.io.btc"){ $blockinfo = PaymentGateway::whereKeyword('block.io.btc')->first(); $blocksettings= $blockinfo->convertAutoData(); $coin = "Bitcoin"; $my_api_key = $blocksettings['blockio_api_btc']; }elseif ($methods == "block.io.dgc"){ $coin = "Dogecoin"; $blockinfo = PaymentGateway::whereKeyword('block.io.dgc')->first(); $blocksettings= $blockinfo->convertAutoData(); $my_api_key = $blocksettings['blockio_api_dgc']; } $acc = Auth::user()->id; $item_number = Str::random(4).time();; $item_amount = $request->amount; $currency_code = $request->currency_code; $secret = $blocksettings['secret_string']; $my_callback_url = route('deposit.blockio.notify'); $block_io = new BlockIO($my_api_key, $secret, $version); $biorate = 1; $coin_amount = round($item_amount / $biorate, 8); $root_url = 'https://block.io/api/v2/'; $addObject = $block_io->get_new_address(array()); $address = $addObject->data->address; $notifyObject = $block_io->create_notification(array('type' => 'address', 'address' => $address, 'url' => $my_callback_url)); $notifyID = $notifyObject->data->notification_id; $currency = Currency::where('id',$request->currency_id)->first(); $amountToAdd = $request->amount/$currency->value; $deposit->method = $request->method; $deposit->coin_amount = $coin_amount; $deposit->notify_id = $notifyID; $deposit->update(); $qrcode_url = "https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl=bitcoin:".$address."?amount=".$coin_amount."&choe=UTF-8"; return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('success',['address' => $address,'qrcode_url' => $qrcode_url,]); } return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('error','Please enter a valid amount.')->withInput(); } } Deposit/ManualController.php 0000644 00000016715 15111407530 0012154 0 ustar 00 <?php namespace App\Http\Controllers\Api\Deposit; use App\Classes\GeniusMailer; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Deposit; use Illuminate\Support\Str; use Illuminate\Http\Request; use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; use App\Models\Generalsetting; use App\Models\User; class ManualController extends Controller { public function store(Request $request){ $deposit = Deposit::findOrFail($request->deposit_id); $deposit->method = $request->method; $deposit->txnid = $request->txn_id4; $deposit->status = 'pending'; $deposit->update(); $gs = Generalsetting::findOrFail(1); $user = User::findOrFail($deposit->user_id); $to = $user->email; $subject = 'Deposit Form Received – Pending Confirmation'; //$msg = "Dear Customer,<br> Your deposit in process."; $msg = '<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Deposit Form Received – Pending Confirmation</title> <style> body { margin: 0; padding: 0; font-family: "Arial", sans-serif; background-color: #f7f7f7; } .email-wrapper { width: 100%; background-color: #f7f7f7; padding: 20px 0; } .email-content { width: 100%; max-width: 600px; background-color: #ffffff; border-radius: 8px; margin: 0 auto; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); } .email-header { background-color: #003366; padding: 20px; text-align: center; border-radius: 8px 8px 0 0; } .email-header img { max-width: 200px; } .email-header span { font-size: 18px; font-weight: 600; color: #00BFFF; display: block; margin-top: 10px; } .email-body { padding: 16px 30px; font-size: 16px; line-height: 1.5; color: #333; } .email-body h3 { color: #003366; margin-bottom: 15px; } .email-body p { margin-bottom: 20px; } .email-button { display: inline-block; background-color: #003366; color: #ffffff !important; padding: 6px 12px; font-size: 16px; border-radius: 5px; text-decoration: none; } .email-footer { background-color: #1f1f1f; color: #ffffff; text-align: center; padding: 12px; border-radius: 0 0 8px 8px; font-size: 14px; } .email-footer a { color: #00BFFF; text-decoration: none; } </style> </head> <body> <div class="email-wrapper"> <div class="email-content"> <div class="email-header"> <img src="https://fluxeassets.com/imgx/etemp.png" alt="Fluxe Assets Logo"> <span>Guiding You Toward Financial Growth</span> </div> <div class="email-body"> <p>Dear <strong>'.$user->name.'</strong>,</p> <p>Thank you for submitting your deposit form to <strong>Fluxe Assets</strong>.</p> <p>We have received your form and are currently awaiting confirmation of the actual deposit. Once verified, the funds will be held in your Fluxe Assets account until you select an investment PLAN.</p> <p>If you have already made the deposit, please allow some time for processing. For any questions or assistance, feel free to <a href="https://fluxeassets.com/contact" style="color: #0073e6; text-decoration: none;" target="_blank">contact us</a>.</p> <p style="margin-top: 30px;">Best regards,<br>The Fluxe Assets Team</p> </div> <div class="email-footer"> <p>Copyright © 2025 <a href="https://fluxeassets.com">Fluxe Assets</a>. All rights reserved.</p> </div> </div> </div> </body> </html>'; if($gs->is_smtp == 1) { /* $data = [ 'to' => $user->email, 'type' => "Depositk", 'cname' => $user->name, 'oamount' => $deposit->amount, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendPhpMailer($data); */ $mail = new PHPMailer(true); try { // SMTP settings $mail->isSMTP(); $mail->Host = $gs->smtp_host; $mail->SMTPAuth = true; $mail->Username = $gs->smtp_user; $mail->Password = $gs->smtp_pass; $mail->SMTPSecure = $gs->smtp_encryption; // 'tls' or 'ssl' $mail->Port = $gs->smtp_port; $mail->CharSet = 'UTF-8'; // Recipients $mail->setFrom($gs->from_email, $gs->from_name); $mail->addAddress($user->email, $user->name); // Content $mail->isHTML(true); $mail->Subject = $subject; $mail->Body = $msg; $mail->send(); } catch (Exception $e) { return response()->json('Email could not be sent. Error: ' . $mail->ErrorInfo); } } else { $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('success','Deposit amount '.$request->amount.' ('.$request->currency_code.') successfully!'); } } Deposit/MollieController.php 0000644 00000010345 15111407530 0012151 0 ustar 00 <?php namespace App\Http\Controllers\Api\Deposit; use App\Classes\GeniusMailer; use App\Http\Controllers\Controller; use App\Models\Currency; use Mollie\Laravel\Facades\Mollie; use App\Models\Generalsetting; use Illuminate\Http\Request; use App\Models\Deposit; use App\Models\Transaction; use Carbon\Carbon; use Session; use Auth; use Str; class MollieController extends Controller { public function store(Request $request){ $support = [ 'AED', 'AUD', 'BGN', 'BRL', 'CAD', 'CHF', 'CZK', 'DKK', 'EUR', 'GBP', 'HKD', 'HRK', 'HUF', 'ILS', 'ISK', 'JPY', 'MXN', 'MYR', 'NOK', 'NZD', 'PHP', 'PLN', 'RON', 'RUB', 'SEK', 'SGD', 'THB', 'TWD', 'USD', 'ZAR' ]; if(!in_array($request->currency_code,$support)){ return redirect()->back()->with('warning','Please Select USD Or EUR Currency For Paypal.'); } $deposit = Deposit::findOrFail($request->deposit_id); $input = $request->all(); $item_amount = $request->amount; $item_name = "Deposit via Molly Payment"; $payment = Mollie::api()->payments()->create([ 'amount' => [ 'currency' => 'USD', 'value' => ''.sprintf('%0.2f', $item_amount).'', ], 'description' => $item_name , 'redirectUrl' => route('api.deposit.molly.notify'), ]); Session::put('method',$request->method); Session::put('deposit_id',$request->deposit_id); Session::put('payment_id',$payment->id); $payment = Mollie::api()->payments()->get($payment->id); return redirect($payment->getCheckoutUrl(), 303); } public function notify(Request $request){ $method = Session::get('method'); $deposit_id = Session::get('deposit_id'); $deposit = Deposit::findOrFail($deposit_id); $user = User::findOrFail($deposit->user_id); $payment = Mollie::api()->payments()->get(Session::get('payment_id')); if($payment->status == 'paid'){ $deposit['method'] = $method; $deposit['status'] = "complete"; $deposit['txnid'] = $payment->id; $deposit->save(); $user->balance += $deposit->amount; $user->save(); $trans = new Transaction(); $trans->email = $user->email; $trans->amount = $deposit->amount; $trans->type = "Deposit"; $trans->profit = "plus"; $trans->txnid = $deposit->deposit_number; $trans->user_id = $user->id; $trans->save(); $gs = Generalsetting::findOrFail(1); if($gs->is_smtp == 1) { $data = [ 'to' => $user->email, 'type' => "Deposit", 'cname' => $user->name, 'oamount' => $deposit->amount, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $user->email; $subject = " You have deposited successfully."; $msg = "Hello ".$user->name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } Session::forget('method'); Session::forget('deposit_id'); return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('success','Deposit amount successfully!'); } else { return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('warning','Something Went wrong!'); } return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('warning','Something Went wrong!'); } } Deposit/PaypalController.php 0000644 00000014662 15111407530 0012164 0 ustar 00 <?php namespace App\Http\Controllers\Api\Deposit; use App\Http\Controllers\Controller; use Carbon\Carbon; use Illuminate\Support\Str; use Illuminate\Http\Request; use App\Classes\GeniusMailer; use App\Models\Currency; use App\Models\Deposit; use App\Models\Generalsetting; use App\Models\PaymentGateway; use App\Models\Transaction as AppTransaction; use Illuminate\Foundation\Auth\User; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Session; use Illuminate\Support\Facades\Redirect; use PayPal\{ Api\Item, Api\Payer, Api\Amount, Api\Payment, Api\ItemList, Rest\ApiContext, Api\Transaction, Api\RedirectUrls, Api\PaymentExecution, Auth\OAuthTokenCredential }; class PaypalController extends Controller { private $_api_context; public function __construct() { $data = PaymentGateway::whereKeyword('paypal')->first(); $paydata = $data->convertAutoData(); $paypal_conf = \Config::get('paypal'); $paypal_conf['client_id'] = $paydata['client_id']; $paypal_conf['secret'] = $paydata['client_secret']; $paypal_conf['settings']['mode'] = $paydata['sandbox_check'] == 1 ? 'sandbox' : 'live'; $this->_api_context = new ApiContext(new OAuthTokenCredential( $paypal_conf['client_id'], $paypal_conf['secret']) ); $this->_api_context->setConfig($paypal_conf['settings']); } public function store(Request $request){ $settings = Generalsetting::findOrFail(1); $deposit = Deposit::findOrFail($request->deposit_id); $cancel_url = route('api.deposit.paypal.cancel'); $notify_url = route('api.deposit.paypal.notify'); $item_name = $settings->title." Deposit"; $item_number = Str::random(12); $item_amount = $request->amount; $support = ['USD','EUR']; if(!in_array($request->currency_code,$support)){ return redirect()->back()->with('warning','Please Select USD Or EUR Currency For Paypal.'); } $payer = new Payer(); $payer->setPaymentMethod('paypal'); $item_1 = new Item(); $item_1->setName($item_name) ->setCurrency('USD') ->setQuantity(1) ->setPrice($item_amount); $item_list = new ItemList(); $item_list->setItems(array($item_1)); $amount = new Amount(); $amount->setCurrency('USD') ->setTotal($item_amount); $transaction = new Transaction(); $transaction->setAmount($amount) ->setItemList($item_list) ->setDescription($item_name.' Via Paypal'); $redirect_urls = new RedirectUrls(); $redirect_urls->setReturnUrl($notify_url) ->setCancelUrl($cancel_url); $payment = new Payment(); $payment->setIntent('Sale') ->setPayer($payer) ->setRedirectUrls($redirect_urls) ->setTransactions(array($transaction)); try { $payment->create($this->_api_context); } catch (\PayPal\Exception\PPConnectionException $ex) { return redirect()->back()->with('unsuccess',$ex->getMessage()); } foreach ($payment->getLinks() as $link) { if ($link->getRel() == 'approval_url') { $redirect_url = $link->getHref(); break; } } Session::put('method',$request->method); Session::put('deposit_id',$request->deposit_id); Session::put('paypal_payment_id', $payment->getId()); if (isset($redirect_url)) { return Redirect::away($redirect_url); } return redirect()->back()->with('unsuccess','Unknown error occurred'); if (isset($redirect_url)) { return Redirect::away($redirect_url); } return redirect()->back()->with('unsuccess','Unknown error occurred'); } public function notify(Request $request) { $payment_id = Session::get('paypal_payment_id'); if (empty( $request['PayerID']) || empty( $request['token'])) { return redirect()->back()->with('error', 'Payment Failed'); } $payment = Payment::get($payment_id, $this->_api_context); $execution = new PaymentExecution(); $execution->setPayerId($request['PayerID']); $method = Session::get('method'); $deposit_id = Session::get('deposit_id'); $result = $payment->execute($execution, $this->_api_context); if ($result->getState() == 'approved') { $resp = json_decode($payment, true); $deposit = Deposit::findOrFail($deposit_id); $data['txnid'] = $resp['transactions'][0]['related_resources'][0]['sale']['id']; $data['method'] = $method; $data['status'] = "complete"; $deposit->update($data); $gs = Generalsetting::findOrFail(1); $user =User::findOrFail($deposit->user_id); if($gs->is_smtp == 1) { $data = [ 'to' => $user->email, 'type' => "Deposit", 'cname' => $user->name, 'oamount' => $deposit->amount, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $user->email; $subject = " You have deposited successfully."; $msg = "Hello ".$user->name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } $user->balance += $deposit->amount; $user->save(); $trans = new AppTransaction(); $trans->email = $user->email; $trans->amount = $deposit->amount; $trans->type = "Deposit"; $trans->profit = "plus"; $trans->txnid = $deposit->deposit_number; $trans->user_id = $user->id; $trans->save(); Session::forget('deposit_id'); Session::forget('method'); Session::forget('paypal_payment_id'); return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('success','Deposit amount '.$deposit->amount.' (USD) successfully!'); } } } Deposit/AuthorizeController.php 0000644 00000013665 15111407530 0012712 0 ustar 00 <?php namespace App\Http\Controllers\Api\Deposit; use App\Http\Controllers\Controller; use App\Classes\GeniusMailer; use App\Models\Deposit; use App\Models\Generalsetting; use App\Models\PaymentGateway; use App\Models\Transaction; use App\Models\User; use Illuminate\Http\Request; use Carbon\Carbon; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; use net\authorize\api\contract\v1 as AnetAPI; use net\authorize\api\controller as AnetController; class AuthorizeController extends Controller { public function store(Request $request){ $deposit = Deposit::findOrFail($request->deposit_id); $gs = Generalsetting::findOrFail(1); $authorizeinfo = PaymentGateway::whereKeyword('authorize.net')->first(); $authorizesettings= $authorizeinfo->convertAutoData(); $item_name = $gs->title." Deposit"; $item_number = $deposit->deposit_number; $item_amount = $request->amount; $validator = Validator::make($request->all(),[ 'cardNumber' => 'required', 'cardCVC' => 'required', 'month' => 'required', 'year' => 'required', ]); if ($validator->passes()) { $merchantAuthentication = new AnetAPI\MerchantAuthenticationType(); $merchantAuthentication->setName($authorizesettings['login_id']); $merchantAuthentication->setTransactionKey($authorizesettings['txn_key']); $refId = 'ref' . time(); $creditCard = new AnetAPI\CreditCardType(); $creditCard->setCardNumber(str_replace(' ','',$request->cardNumber)); $year = $request->year; $month = $request->month; $creditCard->setExpirationDate($year.'-'.$month); $creditCard->setCardCode($request->cardCVC); $paymentOne = new AnetAPI\PaymentType(); $paymentOne->setCreditCard($creditCard); $orderr = new AnetAPI\OrderType(); $orderr->setInvoiceNumber($item_number); $orderr->setDescription($item_name); $transactionRequestType = new AnetAPI\TransactionRequestType(); $transactionRequestType->setTransactionType("authCaptureTransaction"); $transactionRequestType->setAmount($item_amount); $transactionRequestType->setOrder($orderr); $transactionRequestType->setPayment($paymentOne); $requestt = new AnetAPI\CreateTransactionRequest(); $requestt->setMerchantAuthentication($merchantAuthentication); $requestt->setRefId($refId); $requestt->setTransactionRequest($transactionRequestType); $controller = new AnetController\CreateTransactionController($requestt); if($authorizesettings['sandbox_check'] == 1){ $response = $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::SANDBOX); } else { $response = $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::PRODUCTION); } if ($response != null) { if ($response->getMessages()->getResultCode() == "Ok") { $tresponse = $response->getTransactionResponse(); if ($tresponse != null && $tresponse->getMessages() != null) { $deposit->method = $request->method; $deposit['status'] = "complete"; $deposit->update(); $user = User::findOrFail($deposit->user_id); $user->balance += $request->amount; $user->save(); $trans = new Transaction(); $trans->email = $user->email; $trans->amount = $request->amount; $trans->type = "Deposit"; $trans->profit = "plus"; $trans->txnid = $deposit->deposit_number; $trans->user_id = $user->id; $trans->save(); if($gs->is_smtp == 1) { $data = [ 'to' => $user->email, 'type' => "Deposit", 'cname' => $user->name, 'oamount' => $item_amount, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $user->email; $subject = " You have deposited successfully."; $msg = "Hello ".$user->name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('success','Deposit amount '.$request->amount.' ('.$request->currency_code.') successfully!'); } else { return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('unsuccess', 'Payment Failed.'); } } else { return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('unsuccess', 'Payment Failed.'); } } else { return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('unsuccess', 'Payment Failed.'); } } return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('unsuccess', 'Invalid Payment Details.'); } } Deposit/error_log 0000644 00000005302 15111407530 0010065 0 ustar 00 [25-Nov-2025 17:59:21 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Deposit/MollieController.php:18 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Deposit/MollieController.php on line 18 [25-Nov-2025 18:03:50 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Deposit/PaytmController.php:18 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Deposit/PaytmController.php on line 18 [25-Nov-2025 19:56:09 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Deposit/AuthorizeController.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Deposit/AuthorizeController.php on line 19 [25-Nov-2025 19:56:14 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Deposit/InstamojoController.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Deposit/InstamojoController.php on line 19 [25-Nov-2025 19:59:12 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Deposit/PayeerController.php:16 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Deposit/PayeerController.php on line 16 [25-Nov-2025 19:59:29 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Deposit/PerfectMoneyController.php:16 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Deposit/PerfectMoneyController.php on line 16 [25-Nov-2025 20:03:40 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Deposit/PaystackController.php:13 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Deposit/PaystackController.php on line 13 [25-Nov-2025 20:04:49 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Deposit/StripeController.php:26 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Deposit/StripeController.php on line 26 Deposit/SkrillController.php 0000644 00000005431 15111407530 0012170 0 ustar 00 <?php namespace App\Http\Controllers\Api\Deposit; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Deposit; use App\Models\Generalsetting; use App\Models\PaymentGateway; use App\Repositories\DepositRepository; use Illuminate\Http\Request; use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; class SkrillController extends Controller { public $orderRepositorty; public $allusers = []; public function __construct(DepositRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; $this->payment = PaymentGateway::whereKeyword('skrill')->first(); $this->paydata = $this->payment->convertAutoData(); } public function store(Request $request){ $deposit = Deposit::findOrFail($request->deposit_id); $gs = Generalsetting::findOrFail(1); $deposit_number = $deposit->deposit_number; Session::put('method',$request->method); Session::put('deposit_id',$request->deposit_id); $info['pay_to_email'] = trim($this->paydata['email']); $info['transaction_id'] = $deposit_number; $info['status_url'] = route('deposit.skrill.notify'); $info['language'] = 'EN'; $info['amount'] = round($deposit->amount,2); $info['currency'] = $request->currency_code; $info['detail1_description'] = $gs->title; $info['detail1_text'] = "Pay To ".$gs->title; $data['info'] = $info; $data['method'] = "POST"; $data['url'] = "https://pay.skrill.com"; return view('payment.redirect',compact('data')); } public function notify(Request $request){ $method = Session::get('method'); $deposit_id = Session::get('deposit_id'); $deposit = Deposit::findOrFail($deposit_id); $user = User::findOrFail($deposit->user_id); $concatFields = $request->merchant_id . $request->transaction_id . strtoupper(md5(trim($this->paydata['secret']))) . $request->mb_amount . $request->mb_currency . $request->status; if (strtoupper(md5($concatFields)) == $request->md5sig && $request->pay_to_email == trim($this->paydata['email']) && $deposit->status = 'pending') { $deposit->status = "complete"; $deposit->save(); $user->balance += $deposit->amount; $user->save(); $this->orderRepositorty->callAfterOrder($request,$deposit); return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('message','Deposit successfully complete.'); }else{ return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('unsuccess','Something went wrong!'); } } } Deposit/PaystackController.php 0000644 00000003345 15111407530 0012511 0 ustar 00 <?php namespace App\Http\Controllers\Api\Deposit; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Deposit; use App\Models\Generalsetting; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Support\Str; class PaystackController extends Controller { public function store(Request $request){ $gs = Generalsetting::findOrFail(1); if($request->currency_code != "NGN") { return redirect()->back()->with('unsuccess','Please Select NGN Currency For Paystack.'); } $deposit = Deposit::findOrFail($request->deposit_id); $deposit->method = $request->method; $deposit->txnid = $request->paystack_txn; $deposit['status'] = "complete"; $deposit->update(); $user = User::findOrFail($deposit->user_id); $user->income += $deposit->amount; $user->save(); if($gs->is_smtp == 1) { $data = [ 'to' => $user->email, 'type' => "Deposit", 'cname' => $user->name, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $user->email; $subject = " You have deposited successfully."; $msg = "Hello ".$user->name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('success','Deposit amount ('.$request->amount.') successfully!'); } } Deposit/StripeController.php 0000644 00000012007 15111407530 0012173 0 ustar 00 <?php namespace App\Http\Controllers\Api\Deposit; use App\Classes\GeniusMailer; use Cartalyst\Stripe\Laravel\Facades\Stripe; use Illuminate\Support\Facades\Session; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Deposit; use App\Models\Generalsetting; use App\Models\PaymentGateway; use App\Models\Transaction; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Str; use Stripe\Error\Card; use Carbon\Carbon; use Input; use Redirect; use URL; use Validator; use Config; class StripeController extends Controller { public function __construct() { $data = PaymentGateway::whereKeyword('Stripe')->first(); $paydata = $data->convertAutoData(); Config::set('services.stripe.key', $paydata['key']); Config::set('services.stripe.secret', $paydata['secret']); } public function store(Request $request){ $gs = Generalsetting::findOrFail(1); $item_name = $gs->title." Deposit"; $item_amount = $request->amount; $support = ['USD']; if(!in_array($request->currency_code,$support)){ return redirect()->back()->with('warning','Please Select USD Currency For Stripe.'); } $validator = Validator::make($request->all(),[ 'cardNumber' => 'required', 'cardCVC' => 'required', 'month' => 'required', 'year' => 'required', ]); if ($validator->passes()) { $stripe = Stripe::make(Config::get('services.stripe.secret')); try{ $token = $stripe->tokens()->create([ 'card' =>[ 'number' => $request->cardNumber, 'exp_month' => $request->month, 'exp_year' => $request->year, 'cvc' => $request->cardCVC, ], ]); if (!isset($token['id'])) { return back()->with('error','Token Problem With Your Token.'); } $charge = $stripe->charges()->create([ 'card' => $token['id'], 'currency' => $request->currency_code, 'amount' => $item_amount, 'description' => $item_name, ]); if ($charge['status'] == 'succeeded') { $deposit = Deposit::findOrFail($request->deposit_id); $deposit->method = $request->method; $deposit->txnid = $charge['balance_transaction']; $deposit->charge_id = $charge['id']; $deposit->status = 'complete'; $deposit->update(); $user = User::findOrFail($deposit->user_id); $user->balance += $deposit->amount; $user->save(); $trans = new Transaction(); $trans->email = $user->email; $trans->amount = $deposit->amount; $trans->type = "Deposit"; $trans->profit = "plus"; $trans->txnid = $deposit->deposit_number; $trans->user_id = $user->id; $trans->save(); if($gs->is_smtp == 1) { $data = [ 'to' => $user->email, 'type' => "Deposit", 'cname' => $user->name, 'oamount' => $item_amount, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $user->email; $subject = " You have deposited successfully."; $msg = "Hello ".$user->name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('success','Deposit amount '.$request->amount.' (USD) successfully!'); } }catch (Exception $e){ return back()->with('unsuccess', $e->getMessage()); }catch (\Cartalyst\Stripe\Exception\CardErrorException $e){ return back()->with('unsuccess', $e->getMessage()); }catch (\Cartalyst\Stripe\Exception\MissingParameterException $e){ return back()->with('unsuccess', $e->getMessage()); } } return back()->with('unsuccess', 'Please Enter Valid Credit Card Informations.'); } } Deposit/PaytmController.php 0000644 00000036040 15111407530 0012022 0 ustar 00 <?php namespace App\Http\Controllers\Api\Deposit; use App\Classes\GeniusMailer; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Deposit; use App\Models\Generalsetting; use App\Models\PaymentGateway; use App\Models\Transaction; use App\Models\User; use Carbon\Carbon; use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; class PaytmController extends Controller { public function store(Request $request){ if($request->currency_code != "INR") { return back()->with('warning','Please Select INR Currency For Paytm.'); } $gs = Generalsetting::findOrFail(1); $deposit = Deposit::findOrFail($request->deposit_id); $item_name = $gs->title." Deposit"; $item_number = $deposit->deposit_number; $item_amount = $request->amount; Session::put('method',$request->method); Session::put('deposit_id',$request->deposit_id); $data_for_request = $this->handlePaytmRequest( $item_number, round($item_amount,2) ); $paytm_txn_url = 'https://securegw-stage.paytm.in/theia/processTransaction'; $paramList = $data_for_request['paramList']; $checkSum = $data_for_request['checkSum']; return view( 'frontend.paytm-merchant-form', compact( 'paytm_txn_url', 'paramList', 'checkSum' ) ); } public function handlePaytmRequest( $transaction_id, $amount) { $gs = Generalsetting::first(); $data = PaymentGateway::whereKeyword('Paytm')->first(); $paydata = $data->convertAutoData(); $this->getAllEncdecFunc(); $checkSum = ""; $paramList = array(); $paramList["MID"] = $paydata['merchant']; $paramList["ORDER_ID"] = $transaction_id; $paramList["CUST_ID"] = $transaction_id; $paramList["INDUSTRY_TYPE_ID"] = $paydata['industry']; $paramList["CHANNEL_ID"] = 'WEB'; $paramList["TXN_AMOUNT"] = $amount; $paramList["WEBSITE"] = $paydata['website']; $paramList["CALLBACK_URL"] = route('api.deposit.paytm.notify'); $paytm_merchant_key = $paydata['secret']; $checkSum = getChecksumFromArray( $paramList, $paytm_merchant_key ); return array( 'checkSum' => $checkSum, 'paramList' => $paramList ); } function getAllEncdecFunc() { function encrypt_e($input, $ky) { $key = html_entity_decode($ky); $iv = "@@@@&&&&####$$$$"; $data = openssl_encrypt ( $input , "AES-128-CBC" , $key, 0, $iv ); return $data; } function decrypt_e($crypt, $ky) { $key = html_entity_decode($ky); $iv = "@@@@&&&&####$$$$"; $data = openssl_decrypt ( $crypt , "AES-128-CBC" , $key, 0, $iv ); return $data; } function pkcs5_pad_e($text, $blocksize) { $pad = $blocksize - (strlen($text) % $blocksize); return $text . str_repeat(chr($pad), $pad); } function pkcs5_unpad_e($text) { $pad = ord($text(strlen($text) - 1)); if ($pad > strlen($text)) return false; return substr($text, 0, -1 * $pad); } function generateSalt_e($length) { $random = ""; srand((double) microtime() * 1000000); $data = "AbcDE123IJKLMN67QRSTUVWXYZ"; $data .= "aBCdefghijklmn123opq45rs67tuv89wxyz"; $data .= "0FGH45OP89"; for ($i = 0; $i < $length; $i++) { $random .= substr($data, (rand() % (strlen($data))), 1); } return $random; } function checkString_e($value) { if ($value == 'null') $value = ''; return $value; } function getChecksumFromArray($arrayList, $key, $sort=1) { if ($sort != 0) { ksort($arrayList); } $str = getArray2Str($arrayList); $salt = generateSalt_e(4); $finalString = $str . "|" . $salt; $hash = hash("sha256", $finalString); $hashString = $hash . $salt; $checksum = encrypt_e($hashString, $key); return $checksum; } function getChecksumFromString($str, $key) { $salt = generateSalt_e(4); $finalString = $str . "|" . $salt; $hash = hash("sha256", $finalString); $hashString = $hash . $salt; $checksum = encrypt_e($hashString, $key); return $checksum; } function verifychecksum_e($arrayList, $key, $checksumvalue) { $arrayList = removeCheckSumParam($arrayList); ksort($arrayList); $str = getArray2StrForVerify($arrayList); $paytm_hash = decrypt_e($checksumvalue, $key); $salt = substr($paytm_hash, -4); $finalString = $str . "|" . $salt; $website_hash = hash("sha256", $finalString); $website_hash .= $salt; $validFlag = "FALSE"; if ($website_hash == $paytm_hash) { $validFlag = "TRUE"; } else { $validFlag = "FALSE"; } return $validFlag; } function verifychecksum_eFromStr($str, $key, $checksumvalue) { $paytm_hash = decrypt_e($checksumvalue, $key); $salt = substr($paytm_hash, -4); $finalString = $str . "|" . $salt; $website_hash = hash("sha256", $finalString); $website_hash .= $salt; $validFlag = "FALSE"; if ($website_hash == $paytm_hash) { $validFlag = "TRUE"; } else { $validFlag = "FALSE"; } return $validFlag; } function getArray2Str($arrayList) { $findme = 'REFUND'; $findmepipe = '|'; $paramStr = ""; $flag = 1; foreach ($arrayList as $key => $value) { $pos = strpos($value, $findme); $pospipe = strpos($value, $findmepipe); if ($pos !== false || $pospipe !== false) { continue; } if ($flag) { $paramStr .= checkString_e($value); $flag = 0; } else { $paramStr .= "|" . checkString_e($value); } } return $paramStr; } function getArray2StrForVerify($arrayList) { $paramStr = ""; $flag = 1; foreach ($arrayList as $key => $value) { if ($flag) { $paramStr .= checkString_e($value); $flag = 0; } else { $paramStr .= "|" . checkString_e($value); } } return $paramStr; } function redirect2PG($paramList, $key) { $hashString = getchecksumFromArray($paramList, $key); $checksum = encrypt_e($hashString, $key); } function removeCheckSumParam($arrayList) { if (isset($arrayList["CHECKSUMHASH"])) { unset($arrayList["CHECKSUMHASH"]); } return $arrayList; } function getTxnStatus($requestParamList) { return callAPI(PAYTM_STATUS_QUERY_URL, $requestParamList); } function getTxnStatusNew($requestParamList) { return callNewAPI(PAYTM_STATUS_QUERY_NEW_URL, $requestParamList); } function initiateTxnRefund($requestParamList) { $CHECKSUM = getRefundChecksumFromArray($requestParamList,PAYTM_MERCHANT_KEY,0); $requestParamList["CHECKSUM"] = $CHECKSUM; return callAPI(PAYTM_REFUND_URL, $requestParamList); } function callAPI($apiURL, $requestParamList) { $jsonResponse = ""; $responseParamList = array(); $JsonData =json_encode($requestParamList); $postData = 'JsonData='.urlencode($JsonData); $ch = curl_init($apiURL); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($postData)) ); $jsonResponse = curl_exec($ch); $responseParamList = json_decode($jsonResponse,true); return $responseParamList; } function callNewAPI($apiURL, $requestParamList) { $jsonResponse = ""; $responseParamList = array(); $JsonData =json_encode($requestParamList); $postData = 'JsonData='.urlencode($JsonData); $ch = curl_init($apiURL); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($postData)) ); $jsonResponse = curl_exec($ch); $responseParamList = json_decode($jsonResponse,true); return $responseParamList; } function getRefundChecksumFromArray($arrayList, $key, $sort=1) { if ($sort != 0) { ksort($arrayList); } $str = getRefundArray2Str($arrayList); $salt = generateSalt_e(4); $finalString = $str . "|" . $salt; $hash = hash("sha256", $finalString); $hashString = $hash . $salt; $checksum = encrypt_e($hashString, $key); return $checksum; } function getRefundArray2Str($arrayList) { $findmepipe = '|'; $paramStr = ""; $flag = 1; foreach ($arrayList as $key => $value) { $pospipe = strpos($value, $findmepipe); if ($pospipe !== false) { continue; } if ($flag) { $paramStr .= checkString_e($value); $flag = 0; } else { $paramStr .= "|" . checkString_e($value); } } return $paramStr; } function callRefundAPI($refundApiURL, $requestParamList) { $jsonResponse = ""; $responseParamList = array(); $JsonData =json_encode($requestParamList); $postData = 'JsonData='.urlencode($JsonData); $ch = curl_init($apiURL); curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_URL, $refundApiURL); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $headers = array(); $headers[] = 'Content-Type: application/json'; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $jsonResponse = curl_exec($ch); $responseParamList = json_decode($jsonResponse,true); return $responseParamList; } } function getConfigPaytmSettings() { $gs = Generalsetting::first(); $data = PaymentGateway::whereKeyword('Paytm')->first(); $paydata = $data->convertAutoData(); if ($paydata['sandbox_check'] == 1) { define('PAYTM_ENVIRONMENT', 'TEST'); } elseif ($paydata['sandbox_check'] == 0) { define('PAYTM_ENVIRONMENT', 'PROD'); } define('PAYTM_MERCHANT_KEY', $paydata['secret']); define('PAYTM_MERCHANT_MID', $paydata['merchant']); define('PAYTM_MERCHANT_WEBSITE', $paydata['website']); $PAYTM_STATUS_QUERY_NEW_URL='https://securegw-stage.paytm.in/merchant-status/getTxnStatus'; $PAYTM_TXN_URL='https://securegw-stage.paytm.in/theia/processTransaction'; if (PAYTM_ENVIRONMENT == 'PROD') { $PAYTM_STATUS_QUERY_NEW_URL='https://securegw.paytm.in/merchant-status/getTxnStatus'; $PAYTM_TXN_URL='https://securegw.paytm.in/theia/processTransaction'; } define('PAYTM_REFUND_URL', ''); define('PAYTM_STATUS_QUERY_URL', $PAYTM_STATUS_QUERY_NEW_URL); define('PAYTM_STATUS_QUERY_NEW_URL', $PAYTM_STATUS_QUERY_NEW_URL); define('PAYTM_TXN_URL', $PAYTM_TXN_URL); } public function paytmCallback( Request $request ) { $method = Session::get('method'); $deposit_id = Session::get('deposit_id'); $deposit = Deposit::findOrFail($deposit_id); $transaction_id = $request['ORDERID']; if ( 'TXN_SUCCESS' === $request['STATUS'] ) { $transaction_id = $request['TXNID']; $data['txnid'] = $transaction_id; $data['method'] = $method; $data['status'] = "complete"; $deposit->update($data); $gs = Generalsetting::findOrFail(1); $user = User::findOrFail($deposit->user_id); $user->balance += $deposit->amount; $user->save(); $trans = new Transaction(); $trans->email = $user->email; $trans->amount = $deposit->amount; $trans->type = "Deposit"; $trans->profit = "plus"; $trans->txnid = $deposit->deposit_number; $trans->user_id = $user->id; $trans->save(); if($gs->is_smtp == 1) { $data = [ 'to' => $user->email, 'type' => "Deposit", 'cname' => $user->name, 'oamount' => $deposit->amount, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $user->email; $subject = " You have deposited successfully."; $msg = "Hello ".$user->name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } Session::forget('method'); Session::forget('deposit_id'); return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('success','Deposit amount successfully!'); } else if( 'TXN_FAILURE' === $request['STATUS'] ){ return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('unsuccess', 'Payment Cancelled.'); } } } Deposit/FlutterwaveController.php 0000644 00000014227 15111407530 0013243 0 ustar 00 <?php namespace App\Http\Controllers\Api\Deposit; use App\Classes\GeniusMailer; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Deposit; use App\Models\Generalsetting; use App\Models\PaymentGateway; use App\Models\Transaction; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; class FlutterwaveController extends Controller { public $public_key; private $secret_key; public function __construct() { $data = PaymentGateway::whereKeyword('flutterwave')->first(); $paydata = $data->convertAutoData(); $this->public_key = $paydata['public_key']; $this->secret_key = $paydata['secret_key']; } public function store(Request $request) { $curl = curl_init(); $deposit = Deposit::findOrFail($request->deposit_id); $user = User::findOrFail($deposit->user_id); $customer_email = $user->email; $currency = $request->currency_code; $PBFPubKey = $this->public_key; $redirect_url = route('api.deposit.flutter.notify'); $payment_plan = ""; $settings = Generalsetting::first(); $item_name = $settings->title." Deposit"; $item_number = $deposit->deposit_number; $txref = $item_number; $item_amount = $request->amount; Session::put('method',$request->method); Session::put('deposit_id',$request->deposit_id); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.ravepay.co/flwv3-pug/getpaidx/api/v2/hosted/pay", CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'amount' => $item_amount, 'customer_email' => $customer_email, 'currency' => $currency, 'txref' => $txref, 'PBFPubKey' => $PBFPubKey, 'redirect_url' => $redirect_url, 'payment_plan' => $payment_plan ]), CURLOPT_HTTPHEADER => [ "content-type: application/json", "cache-control: no-cache" ], )); $response = curl_exec($curl); $err = curl_error($curl); if($err){ die('Curl returned error: ' . $err); } $transaction = json_decode($response); if(!$transaction->data && !$transaction->data->link){ print_r('API returned error: ' . $transaction->message); } return redirect($transaction->data->link); } public function notify(Request $request) { $input = $request->all(); $method = Session::get('method'); $deposit_id = Session::get('deposit_id'); $deposit = Deposit::findOrFail($deposit_id); $user = User::findOrFail($deposit->user_id); if($request->cancelled == "true"){ return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('success',__('Payment Cancelled!')); } if (isset($input['txref'])) { $ref = $input['txref']; $query = array( "SECKEY" => $this->secret_key, "txref" => $ref ); $data_string = json_encode($query); $ch = curl_init('https://api.ravepay.co/flwv3-pug/getpaidx/api/v2/verify'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); $response = curl_exec($ch); curl_close($ch); $resp = json_decode($response, true); if ($resp['status'] == "success") { $paymentStatus = $resp['data']['status']; $chargeResponsecode = $resp['data']['chargecode']; if (($chargeResponsecode == "00" || $chargeResponsecode == "0") && ($paymentStatus == "successful")) { $order['txnid'] = $resp['data']['txid']; $data['status'] = "complete"; $deposit->update($data); $gs = Generalsetting::findOrFail(1); $user->balance += $deposit->amount; $user->save(); $trans = new Transaction(); $trans->email = $user->email; $trans->amount = $deposit->amount; $trans->type = "Deposit"; $trans->profit = "plus"; $trans->txnid = $deposit->deposit_number; $trans->user_id = $user->id; $trans->save(); if($gs->is_smtp == 1) { $data = [ 'to' => $user->email, 'type' => "Deposit", 'cname' => $user->name, 'oamount' => $deposit->amount, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $user->email; $subject = " You have deposited successfully."; $msg = "Hello ".$user->name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('success','Deposit amount successfully!'); } else { return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('error','Something went wrong!'); } } } else { return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('error','Something went wrong!'); } } } Deposit/PerfectMoneyController.php 0000644 00000007716 15111407530 0013340 0 ustar 00 <?php namespace App\Http\Controllers\Api\Deposit; use App\Models\Deposit; use App\Models\Currency; use Illuminate\Support\Str; use Illuminate\Http\Request; use App\Models\Generalsetting; use App\Models\PaymentGateway; use App\Http\Controllers\Controller; use App\Models\User; use App\Repositories\DepositRepository; use Illuminate\Support\Facades\Session; class PerfectMoneyController extends Controller { public $orderRepositorty; public $allusers = []; public function __construct(DepositRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; $this->payment = PaymentGateway::whereKeyword('perfectmoney')->first(); $this->paydata = $this->payment->convertAutoData(); } public function store(Request $request){ $deposit = Deposit::findOrFail($request->deposit_id); $gs = Generalsetting::findOrFail(1); $deposit_name = $gs->title." Deposit"; $deposit_number = $deposit->deposit_number; $user = User::findOrFail($deposit->user_id); Session::put('method',$request->method); Session::put('deposit_id',$request->deposit_id); $info['PAYEE_ACCOUNT'] = trim($this->paydata['wallet_code']); $info['PAYEE_NAME'] = $deposit_name; $info['PAYMENT_ID'] = $deposit_number; $info['PAYMENT_AMOUNT'] = round($deposit->amount,2); $info['PAYMENT_UNITS'] = $request->currency_code; $info['STATUS_URL'] = route('api.deposit.perfectmoney.notify'); $info['PAYMENT_URL'] = route('api.user.deposit.confirm',$deposit->id); $info['PAYMENT_URL_METHOD'] = 'POST'; $info['NOPAYMENT_URL'] = route('api.user.deposit.confirm',$deposit->id); $info['NOPAYMENT_URL_METHOD'] = 'POST'; $info['SUGGESTED_MEMO'] = $user->name; $info['BAGGAGE_FIELDS'] = 'IDENT'; $data['info'] = $info; $data['method'] = 'post'; $data['url'] = 'https://perfectmoney.is/api/step1.asp'; return view('payment.redirect',compact('data')); } public function notify(Request $request){ $method = Session::get('method'); $deposit_id = Session::get('deposit_id'); $deposit = Deposit::findOrFail($deposit_id); $user = User::findOrFail($deposit->user_id); $alt_passphrase = strtoupper(md5($this->paydata['alternative_passphrase'])); define('ALTERNATE_PHRASE_HASH', $alt_passphrase); define('PATH_TO_LOG', '/somewhere/out/of/document_root/'); $string = $_POST['PAYMENT_ID'] . ':' . $_POST['PAYEE_ACCOUNT'] . ':' . $_POST['PAYMENT_AMOUNT'] . ':' . $_POST['PAYMENT_UNITS'] . ':' . $_POST['PAYMENT_BATCH_NUM'] . ':' . $_POST['PAYER_ACCOUNT'] . ':' . ALTERNATE_PHRASE_HASH . ':' . $_POST['TIMESTAMPGMT']; $hash = strtoupper(md5($string)); $hash2 = $_POST['V2_HASH']; if ($hash == $hash2) { foreach ($_POST as $key => $value) { $details[$key] = $value; } $pay_amount = $_POST['PAYMENT_AMOUNT']; $track = $_POST['PAYMENT_ID']; if ($_POST['PAYEE_ACCOUNT'] == $this->paydata['wallet_code'] && $pay_amount == round($deposit->amount,2) && $deposit->status == "pending") { $deposit->txnid = $details; $deposit->status = "complete"; $deposit->update(); $user->balance += $deposit->amount; $user->save(); Session::forget('method'); Session::forget('deposit_id'); return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('message','Deposit successfully complete.'); }else{ return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('unsuccess','Something went wrong!'); } }else{ return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('unsuccess','Something went wrong!'); } } } Deposit/MercadopagoController.php 0000644 00000004341 15111407530 0013150 0 ustar 00 <?php namespace App\Http\Controllers\Api\Deposit; use App\Classes\GeniusMailer; use App\Http\Controllers\Controller; use MercadoPago; use App\Models\Currency; use App\Models\Deposit; use App\Models\Generalsetting; use App\Models\PaymentGateway; use App\Models\Transaction; use App\Models\User; use App\Repositories\DepositRepository; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Str; class MercadopagoController extends Controller { public $orderRepositorty; public $allusers = []; public function __construct(DepositRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; $this->payment = PaymentGateway::whereKeyword('skrill')->first(); $this->paydata = $this->payment->convertAutoData(); } public function store(Request $request){ $deposit = Deposit::findOrFail($request->deposit_id); $gs = Generalsetting::findOrFail(1); $user = User::findOrFail($deposit->user_id); $item_name = $gs->title." Deposit"; $item_number = $deposit->deposit_number; $item_amount = $request->amount; $payment_amount = $item_amount; $data = PaymentGateway::whereKeyword('mercadopago')->first(); $paydata = $data->convertAutoData(); MercadoPago\SDK::setAccessToken($paydata['token']); $payment = new MercadoPago\Payment(); $payment->transaction_amount = $payment_amount; $payment->token = $request->token; $payment->description = 'Deposit '.$gs->title; $payment->installments = 1; $payment->payer = array( "email" => $user ? $user ->email : 'example@gmail.com' ); $payment->save(); if ($payment->status == 'approved') { $deposit->charge_id = $payment->payer->id; $deposit->status = 'complete'; $deposit->update(); $user->balance += $deposit->amount; $user->save(); return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('message','Deposit successfully complete.'); }else{ return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('unsuccess','Something Went wrong!'); } } } Deposit/PayeerController.php 0000644 00000007315 15111407530 0012160 0 ustar 00 <?php namespace App\Http\Controllers\Api\Deposit; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Deposit; use App\Models\Generalsetting; use App\Models\PaymentGateway; use App\Models\User; use App\Repositories\DepositRepository; use Illuminate\Http\Request; use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; class PayeerController extends Controller { public $orderRepositorty; public $allusers = []; public function __construct(DepositRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; $this->payment = PaymentGateway::whereKeyword('payeer')->first(); $this->paydata = $this->payment->convertAutoData(); } public function store(Request $request){ $deposit = Deposit::findOrFail($request->deposit_id); $gs = Generalsetting::findOrFail(1); $deposit_name = $gs->title." Deposit"; $deposit_number = $deposit->deposit_number; Session::put('method',$request->method); Session::put('deposit_id',$request->deposit_id); $arHash = [ trim($this->paydata['merchant_id']), $deposit_number, $request->amount, $request->currency_code, base64_encode("Pay To $gs->title"), trim($this->paydata['secret_key']) ]; $info['m_shop'] = trim($this->paydata['merchant_id']); $info['m_orderid'] = $deposit_number; $info['m_amount'] = $request->amount; $info['m_curr'] = $request->currency_code; $info['m_desc'] = base64_encode("Pay To $gs->title"); $info['m_sign'] = strtoupper(hash('sha256', implode(":", $arHash))); $info['lang'] = 'en'; $data['info'] = $info; $data['method'] = "GET"; $data['url'] = "https://payeer.com/merchant"; return view('payment.redirect',compact('data')); } public function notify(Request $request) { if (isset($request->m_operation_id) && isset($request->m_sign)) { $sign_hash = strtoupper(hash('sha256', implode(":", array( $request->m_operation_id, $request->m_operation_ps, $request->m_operation_date, $request->m_operation_pay_date, $request->m_shop, $request->m_orderid, $request->m_amount, $request->m_curr, $request->m_desc, $request->m_status, $this->paydata['secret_key'] )))); $method = Session::get('method'); $deposit_id = Session::get('deposit_id'); $deposit = Deposit::findOrFail($deposit_id); if ($request->m_sign != $sign_hash) { return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('unsuccess','digital signature not matched!'); } else { $user = User::findOrFail($deposit->user_id); if ($request->m_amount == round($deposit->amount,2) && $request->m_status == 'success' && $deposit->status == 'pending') { $deposit->status = "complete"; $deposit->update(); $user->balance += $deposit->amount; $user->save(); Session::forget('method'); Session::forget('deposit_id'); } else { return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('unsuccess','transaction was unsuccessful!'); } } } else { return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('unsuccess','transaction was unsuccessful!'); } } } Deposit/InstamojoController.php 0000644 00000011020 15111407530 0012662 0 ustar 00 <?php namespace App\Http\Controllers\Api\Deposit; use Illuminate\Support\Facades\Session; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Auth; use App\Models\PaymentGateway; use App\Models\Generalsetting; use App\Classes\GeniusMailer; use Illuminate\Http\Request; use Illuminate\Support\Str; use App\Classes\Instamojo; use App\Models\Currency; use App\Models\Deposit; use App\Models\Transaction; use App\Models\User; class InstamojoController extends Controller { public function store(Request $request) { $input = $request->all(); $gs = Generalsetting::first(); $data = PaymentGateway::whereKeyword('instamojo')->first(); $paydata = $data->convertAutoData(); $total = $request->amount; if($request->currency_code != "INR") { return redirect()->back()->with('warning',__('Please Select INR Currency For This Payment.')); } $deposit = Deposit::findOrFail($request->deposit_id); $user = User::findOrFail($deposit->user_id); $order['item_name'] = $gs->title." Deposit"; $order['item_number'] = $deposit->deposit_number; $order['item_amount'] = $total; $cancel_url = route('api.deposit.paypal.cancel'); $notify_url = route('api.deposit.instamojo.notify'); if($paydata['sandbox_check'] == 1){ $api = new Instamojo($paydata['key'], $paydata['token'], 'https://test.instamojo.com/api/1.1/'); } else { $api = new Instamojo($paydata['key'], $paydata['token']); } try { $response = $api->paymentRequestCreate(array( "purpose" => $order['item_name'], "amount" => $order['item_amount'], "send_email" => true, "email" => $user->email, "redirect_url" => $notify_url )); $redirect_url = $response['longurl']; Session::put('method',$request->method); Session::put('deposit_id',$request->deposit_id); Session::put('order_payment_id', $response['id']); return redirect($redirect_url); } catch (Exception $e) { return redirect($cancel_url)->with('unsuccess','Error: ' . $e->getMessage()); } } public function notify(Request $request) { $method = Session::get('method'); $deposit_id = Session::get('deposit_id'); $deposit = Deposit::findOrFail($deposit_id); $input_data = $request->all(); $user = User::findOrFail($deposit->user_id); $payment_id = Session::get('order_payment_id'); if($input_data['payment_status'] == 'Failed'){ return redirect()->back()->with('unsuccess','Something Went wrong!'); } if ($input_data['payment_request_id'] == $payment_id) { $deposit['method'] = $method; $deposit['txnid'] = $payment_id; $deposit['status'] = "complete"; $deposit->save(); $gs = Generalsetting::findOrFail(1); $user = auth()->user(); $user->balance += $deposit->amount; $user->save(); $trans = new Transaction(); $trans->email = $user->email; $trans->amount = $deposit->amount; $trans->type = "Deposit"; $trans->profit = "plus"; $trans->txnid = $deposit->deposit_number; $trans->user_id = $user->id; $trans->save(); if($gs->is_smtp == 1) { $data = [ 'to' => $user->email, 'type' => "Deposit", 'cname' => $user->name, 'oamount' => $deposit->amount, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $user->email; $subject = " You have deposited successfully."; $msg = "Hello ".$user->name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('success','Deposit amount successfully!'); } return redirect()->route('api.user.deposit.confirm',$deposit->id)->with('unsuccess','Something Went wrong!'); } } User/InvestController.php 0000644 00000035733 15111407530 0011517 0 ustar 00 <?php namespace App\Http\Controllers\Api\User; use App\Classes\GeniusMailer; use App\Http\Controllers\Controller; use App\Http\Resources\InvestCheckoutResource; use App\Http\Resources\InvestResource; use App\Models\Currency; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Models\Plan; use App\Models\Referral; use App\Models\ReferralBonus; use App\Models\Transaction; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; class InvestController extends Controller { public $gs; public $allusers = []; public $referral_ids = []; public function __construct() { $this->gs = Generalsetting::findOrFail(1); } public function plans(){ try{ $data = Plan::whereStatus(1) ->orderBy('id','desc') ->get(); return response()->json(['status' => true, 'data' => $data, 'error' => []]); }catch(\Exception $e){ return response()->json(['status' => false, 'data'=> [], 'error'=> $e->getMessage()]); } } public function mainWallet(Request $request){ try{ if($request->amount>0){ if($plan = Plan::whereId($request->invest_id)->first()){ if($plan->invest_type == 'range'){ if(rootPrice($plan->min_amount) > $request->amount ){ return response()->json(['status' => false, 'data'=> [], 'error'=> 'Amount Should be greater than this!']); } if($request->amount > rootPrice($plan->max_amount)){ return response()->json(['status' => false, 'data'=> [], 'error'=> 'Amount Should be less than this!']); } }else{ if(rootPrice($plan->fixed_amount) < $request->amount){ return response()->json(['status' => false, 'data'=> [], 'error'=> 'Amount Should be greater or equal to '.$plan->fixed_amount]); } } if($request->amount <= rootPrice(auth()->user()->balance)){ $currency = Currency::first(); $invest = new Invest(); $invest->transaction_no = Str::random(12); $invest->user_id = auth()->id(); $invest->plan_id = $plan->id; $invest->currency_id = $currency->id; $invest->method = 'Main Wallet'; $invest->amount = investCurrencyAmount($request->amount); $profitAmount = ($request->amount * $plan->profit_percentage)/100; $invest->profit_amount = investCurrencyAmount($profitAmount); if($plan->lifetime_return){ $invest->lifetime_return = 1; } if($plan->captial_return){ $invest->capital_back = 1; $invest->profit_repeat = 0; } $invest->status = 1; $invest->payment_status = "completed"; $invest->profit_time = Carbon::now()->addHours($plan->schedule_hour); $invest->save(); $user = auth()->user(); $user->balance = $user->balance - investCurrencyAmount($request->amount); $user->update(); $trans = new Transaction(); $trans->email = auth()->user()->email; $trans->amount = $invest->amount; $trans->type = "Invest"; $trans->txnid = $invest->transaction_no; $trans->user_id = $invest->user_id; $trans->save(); $this->refferalBonus($invest); return response()->json(['status' => true, 'data' => new InvestResource($invest), 'error'=>[]]); }else{ return response()->json(['status' => false, 'data'=> [], 'error'=> 'You don,t have sufficient balance.']); } return response()->json(['status' => false, 'data'=> [], 'error'=> 'No plan exists.']); } }else{ return response()->json(['status' => false, 'data'=> [], 'error'=> 'Amount should be greater then 0!']); } }catch(\Exception $e){ return response()->json(['status' => false, 'data'=> [], 'error'=> $e->getMessage()]); } } public function interestWallet(Request $request){ try{ if($request->amount>0){ if($plan = Plan::whereId($request->invest_id)->first()){ if($plan->invest_type == 'range'){ if(rootPrice($plan->min_amount) > $request->amount ){ return response()->json(['status' => false, 'data'=> [], 'error'=> 'Amount Should be greater than this!']); } if($request->amount > rootPrice($plan->max_amount)){ return response()->json(['status' => false, 'data'=> [], 'error'=> 'Amount Should be less than this!']); } }else{ if(rootPrice($plan->fixed_amount) < $request->amount){ return response()->json(['status' => false, 'data'=> [], 'error'=> 'Amount Should be greater or equal to '.$plan->fixed_amount]); } } if($request->amount < rootPrice(auth()->user()->interest_balance)){ $currency = Currency::first(); $invest = new Invest(); $invest->transaction_no = Str::random(12); $invest->user_id = auth()->id(); $invest->plan_id = $plan->id; $invest->currency_id = $currency->id; $invest->method = 'Interest Wallet'; $invest->amount = investCurrencyAmount($request->amount); $profitAmount = ($request->amount * $plan->profit_percentage)/100; $invest->profit_amount = investCurrencyAmount($profitAmount); if($plan->lifetime_return){ $invest->lifetime_return = 1; } if($plan->captial_return){ $invest->capital_back = 1; $invest->profit_repeat = 0; } $invest->status = 1; $invest->payment_status = "completed"; $invest->profit_time = Carbon::now()->addHours($plan->schedule_hour); $invest->save(); $user = auth()->user(); $user->interest_balance =$user->interest_balance - investCurrencyAmount($request->amount); $user->update(); $trans = new Transaction(); $trans->email = auth()->user()->email; $trans->amount = $invest->amount; $trans->type = "Invest"; $trans->txnid = $invest->transaction_no; $trans->user_id = $invest->user_id; $trans->save(); $this->refferalBonus($invest); return response()->json(['status' => true, 'data' => new InvestResource($invest), 'error'=>[]]); }else{ return response()->json(['status' => false, 'data'=> [], 'error'=> 'You don,t have sufficient balance.']); } return response()->json(['status' => false, 'data'=> [], 'error'=> 'No plan exists.']); } }else{ return response()->json(['status' => false, 'data'=> [], 'error'=> 'Amount should be greater then 0!']); } }catch(\Exception $e){ return response()->json(['status' => false, 'data'=> [], 'error'=> $e->getMessage()]); } } public function investAmount(Request $request){ if($request->amount>0){ if($plan = Plan::whereId($request->plan_id)->first()){ if($plan->invest_type == 'range'){ if(rootPrice($plan->min_amount) > $request->amount ){ return response()->json(['status' => false, 'data'=> [], 'error'=> 'Amount Should be greater than this!']); } if($request->amount > rootPrice($plan->max_amount)){ return response()->json(['status' => false, 'data'=> [], 'error'=> 'Amount Should be less than this!']); } }else{ if(rootPrice($plan->fixed_amount) > $request->amount){ return response()->json(['status' => false, 'data'=> [], 'error'=> 'Amount Should be greater or equal to '.$plan->fixed_amount]); } } $invest = new Invest(); $invest->transaction_no = Str::random(12); $invest->user_id = $request->user_id; $invest->plan_id = $request->plan_id; $invest->currency_id = $request->currency_id; $invest->amount = investCurrencyAmount($request->amount); $invest->profit_amount = investCurrencyAmount(($request->amount * $plan->profit_percentage)/100); if($plan->lifetime_return){ $invest->lifetime_return = 1; } if($plan->captial_return){ $invest->capital_back = 1; $invest->profit_repeat = 0; } $invest->status = 0; $invest->payment_status = "pending"; $invest->save(); $route = route('api.user.invest.checkout',$invest->id); return response()->json(['status' => true, 'data' => ['invest_data' => new InvestCheckoutResource($invest), 'checkout_route' => $route], 'error'=>[]]); } }else{ return response()->json(['status' => false, 'data'=> [], 'error'=> 'Amount should be greater then 0!']); } } public function checkout($id){ $data['invest'] = Invest::findOrFail($id); $data['invest_currency'] = Currency::findOrFail($data['invest']->currency_id); $data['gateways'] = PaymentGateway::where('status',1)->get(); return view('user.invest.api_checkout',$data); } public function refferalBonus($order){ if($this->gs->is_affilate == 1){ $referralUser = User::whereId($order->user_id)->first(); if(Session::has('affilate') || ($referralUser != NULL && $referralUser->referral_id != 0)){ if(Session::has('affilate')){ $this->referralUsers(Session::get('affilate')); }else{ if($referralUser->referral_id != 0){ $this->referralUsers($referralUser->referral_id); } } $referral_ids = $this->allReferralId(); if(count($this->allusers) >0){ $users = array_reverse($this->allusers); foreach($users as $key=>$data){ $user = User::findOrFail($data); if($referral = Referral::findOrFail($referral_ids[$key])){ $referralAmount = ($order->amount * $referral->percent)/100; $bonus = new ReferralBonus(); $bonus->from_user_id = auth()->id(); $bonus->to_user_id = $user->id; $bonus->percentage = $referral->percent; $bonus->level = $referral->level; $bonus->amount = $referralAmount; $bonus->type = 'invest'; $bonus->save(); $to_user = User::findOrFail($bonus->to_user_id); $trans = new Transaction(); $trans->email = $to_user->email; $trans->amount = $referralAmount; $trans->type = "Referral Bonus"; $trans->txnid = $order->transaction_no; $trans->user_id = $to_user->id; $trans->profit = 'plus'; $trans->save(); if($this->gs->is_smtp == 1) { $data = [ 'to' => $to_user->email, 'type' => "referral bonus", 'cname' => $to_user->name, 'oamount' => $referralAmount, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $to_user->email; $subject = "Referral Bonus"; $msg = "Hello ".$to_user->name."!\nYou got bonus from referral.\nThank you."; $headers = "From: ".$this->gs->from_name."<".$this->gs->from_email.">"; mail($to,$subject,$msg,$headers); } $user->increment('balance',$referralAmount); $referralAmount = 0; } } } } } } public function allReferralId(){ $referrals = Referral::where('commission_type','invest')->get(); if(count($referrals)>0){ foreach($referrals as $key=>$data){ $this->referral_ids[] = $data->id; } return $this->referral_ids; } } public function referralUsers($id) { $referral = Referral::where('commission_type','invest')->get(); for($i=1; $i<=count($referral); $i++){ $user = User::findOrFail($id); $this->allusers[] = $user->id; if($user->referral_id){ $id = $user->referral_id; }else{ return false; } } return $this->allusers; } } User/SupportController.php 0000644 00000007043 15111407530 0011714 0 ustar 00 <?php namespace App\Http\Controllers\Api\User; use App\Http\Controllers\Controller; use App\Http\Resources\SupportTicketResource; use App\Http\Resources\TicketReplyResource; use App\Models\AdminUserConversation; use App\Models\AdminUserMessage; use Illuminate\Http\Request; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; class SupportController extends Controller { public function allTickets(){ try{ $support_tickets = AdminUserConversation::whereUserId(auth()->id())->paginate(10); return response()->json(['status'=>true, 'data'=>SupportTicketResource::collection($support_tickets), 'error'=>[]]); }catch(\Exception $e){ return response()->json(['status'=>false, 'data'=>[], 'error'=>$e->getMessage()]); } } public function store(Request $request) { try{ $rules = [ 'subject' => 'required', 'message' => 'required', 'attachment' => 'required|mimes:png,jpeg,gif', ]; $validator = Validator::make($request->all(), $rules); if ($validator->fails()) { return response()->json(['status' => false, 'data' => [], 'error' => $validator->errors()]); } $ticket = new AdminUserConversation(); $input = $request->all(); $input['ticket_number'] = '#TKT'.random_int(100000, 999999); $input['user_id'] = auth()->id(); if ($file = $request->file('attachment')) { $name = Str::random(8).time().'.'.$file->getClientOriginalExtension(); $file->move('assets/images',$name); $input['attachment'] = $name; } $ticket->fill($input)->save(); $conversation = new AdminUserMessage(); $conversation->conversation_id = $ticket->id; $conversation->user_id = auth()->id(); $conversation->message = $request->message; $conversation->photo = $ticket->attachment; $conversation->save(); return response()->json(['status' => true, 'data' => new SupportTicketResource($ticket), 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => $e->getMessage()]); } } public function show($id){ try{ $data = AdminUserConversation::whereId($id)->first(); $replies = $data->messages; return response()->json(['status' => true, 'data' => TicketReplyResource::collection($replies), 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => $e->getMessage()]); } } public function reply(Request $request, $id){ try{ $data = new AdminUserMessage(); $data->conversation_id = $id; $data->user_id = auth()->id(); $data->message = $request->message; if ($file = $request->file('photo')) { $name = Str::random(8).time().'.'.$file->getClientOriginalExtension(); $file->move('assets/images',$name); $data->photo = $name; } $data->save(); return response()->json(['status' => true, 'data' => new TicketReplyResource($data), 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => $e->getMessage()]); } } } User/RequestController.php 0000644 00000012651 15111407530 0011671 0 ustar 00 <?php namespace App\Http\Controllers\Api\User; use App\Http\Controllers\Controller; use App\Http\Resources\MoneyRequestResource; use App\Models\Generalsetting; use App\Models\MoneyRequest; use App\Models\Transaction; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; class RequestController extends Controller { public function requestHistory(){ try{ $requests = MoneyRequest::orderby('id','desc')->whereUserId(auth()->id())->paginate(10); return response()->json(['status' => true, 'data' => MoneyRequestResource::collection($requests), 'error' => []]); }catch(\Exception $e){ return response()->json(['status'=>false, 'data'=>[], 'error'=>$e->getMessage()]); } } public function store(Request $request){ try{ $rules = [ 'email' => 'required', 'name' => 'required', 'amount' => 'required|gt:0', ]; $validator = Validator::make($request->all(), $rules); if ($validator->fails()) { return response()->json(['status' => false, 'data' => [], 'error' => $validator->errors()]); } $user = auth()->user(); $gs = Generalsetting::first(); if($request->email == $user->email){ return response()->json(['status' => false, 'data' => [], 'error' => 'You can not send money yourself!!']); } $user = User::where('email',$request->email)->first(); if($user === null){ return response()->json(['status' => false, 'data' => [], 'error' => 'No register user with this email!']); } $cost = $gs->fixed_request_charge + ($request->amount/100) * $gs->percentage_request_charge; $finalAmount = $request->amount + $cost; $receiver = User::where('email',$request->email)->first(); $txnid = Str::random(4).time(); $data = new MoneyRequest(); $data->user_id = auth()->user()->id; $data->receiver_id = $receiver->id; $data->receiver_name = $receiver->name; $data->transaction_no = $txnid; $data->cost = $cost; $data->amount = $request->amount; $data->status = 0; $data->details = $request->details; $data->save(); $trans = new Transaction(); $trans->email = $user->email; $trans->amount = $finalAmount; $trans->type = "Request Money"; $trans->profit = "plus"; $trans->txnid = $txnid; $trans->user_id = $user->id; $trans->save(); return response()->json(['status' => true, 'data' => 'Request Money Send Successfully', 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => $e->getMessage()]); } } public function receiveHistory(){ try{ $requests = MoneyRequest::orderby('id','desc')->whereReceiverId(auth()->id())->paginate(10); return response()->json(['status' => true, 'data' => MoneyRequestResource::collection($requests), 'error' => []]); }catch(\Exception $e){ return response()->json(['status'=>false, 'data'=>[], 'error'=>$e->getMessage()]); } } public function send($id){ try{ $data = MoneyRequest::findOrFail($id); $sender = User::whereId($data->receiver_id)->first(); $receiver = User::whereId($data->user_id)->first(); if($data->amount > $sender->balance){ return response()->json(['status' => false, 'data' => [], 'error' => 'You don,t have sufficient balance!']); } $finalAmount = $data->amount - $data->cost; $sender->decrement('balance',$data->amount); $receiver->increment('balance',$finalAmount); $data->update(['status'=>1]); $trans = new Transaction(); $trans->email = auth()->user()->email; $trans->amount = $data->amount; $trans->type = "Request Money"; $trans->profit = "minus"; $trans->txnid = $data->transaction_no; $trans->user_id = auth()->id(); $trans->save(); $trans = new Transaction(); $trans->email = $receiver->email; $trans->amount = $finalAmount; $trans->type = "Request Money"; $trans->profit = "plus"; $trans->txnid = $data->transaction_no; $trans->user_id = $receiver->id; $trans->save(); return response()->json(['status' => true, 'data' => 'Money Send Successfully', 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => $e->getMessage()]); } } public function details($id){ try{ $data = MoneyRequest::findOrFail($id); $from = User::whereId($data->user_id)->first(); $to = User::whereId($data->receiver_id)->first(); return response()->json(['status' => true, 'data' => new MoneyRequestResource($data), 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => $e->getMessage()]); } } } User/DepositController.php 0000644 00000004214 15111407530 0011644 0 ustar 00 <?php namespace App\Http\Controllers\Api\User; use App\Http\Controllers\Controller; use App\Http\Resources\DepositResource; use App\Models\Currency; use App\Models\Deposit; use App\Models\PaymentGateway; use Illuminate\Http\Request; use Illuminate\Support\Str; class DepositController extends Controller { public function history(){ try{ $deposits = Deposit::orderby('id','desc')->whereUserId(auth()->id())->paginate(10); return response()->json(['status' => true, 'data' => DepositResource::collection($deposits), 'error' => []]); }catch(\Exception $e){ return response()->json(['status'=>false, 'data'=>[], 'error'=>$e->getMessage()]); } } public function deposit(Request $request){ try{ $currency = Currency::where('id',$request->currency_id)->first(); $amountToAdd = $request->amount/$currency->value; $deposit = new Deposit(); $deposit['deposit_number'] = Str::random(12); $deposit['user_id'] = $request->user_id; $deposit['currency_id'] = $request->currency_id; $deposit['amount'] = $amountToAdd; $deposit['status'] = "pending"; $deposit->save(); $route = route('api.user.deposit.confirm',$deposit->id); return response()->json(['status' => true, 'data' => ['deposit_data' => new DepositResource($deposit), 'deposit_route' => $route], 'error' => []]); }catch(\Exception $e){ return response()->json(['status'=>false, 'data'=>[], 'error'=>$e->getMessage()]); } } public function confirm_deposit($id){ $data['deposit'] = Deposit::findOrFail($id); $data['deposit_currency'] = Currency::findOrFail($data['deposit']->currency_id); $data['availableGatways'] = ['block.io.btc','block.io.ltc','block.io.dgc','flutterwave','authorize.net','paystack','razorpay','mollie','paytm','instamojo','stripe','paypal','mercadopago','skrill','perfectmoney','payeer']; $data['gateways'] = PaymentGateway::OrderBy('id','desc')->whereStatus(1)->get(); return view('user.deposit.api_deposit',$data); } } User/TransferController.php 0000644 00000010310 15111407530 0012013 0 ustar 00 <?php namespace App\Http\Controllers\Api\User; use App\Http\Controllers\Controller; use App\Http\Resources\BalanceTransferResource; use App\Models\BalanceTransfer; use App\Models\Generalsetting; use App\Models\Transaction; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; class TransferController extends Controller { public function history(){ try{ $transfers = BalanceTransfer::whereUserId(auth()->id())->orderBy('id','desc')->paginate(10); return response()->json(['status' => true, 'data' => BalanceTransferResource::collection($transfers), 'error' => []]); }catch(\Exception $e){ return response()->json(['status'=>false, 'data'=>[], 'error'=>$e->getMessage()]); } } public function store(Request $request){ try{ $rules = [ 'email' => 'required', 'name' => 'required', 'amount' => 'required|gt:0', 'wallet' => 'required', 'password' => 'required' ]; $validator = Validator::make($request->all(), $rules); if ($validator->fails()) { return response()->json(['status' => false, 'data' => [], 'error' => $validator->errors()]); } $user = auth()->user(); if(!Hash::check($request->password,$user->password)){ return response()->json(['status' => false, 'data' => [], 'error' => 'Password does not match!']); } if($request->wallet == 'main_balance'){ if($request->amount > $user->balance){ return response()->json(['status' => false, 'data' => [], 'error' => 'Insufficient Main Account Balance.']); } }else{ if($request->amount > $user->interest_balance){ return response()->json(['status' => false, 'data' => [], 'error' => 'Insufficient Main Account Balance.']); } } $gs = Generalsetting::first(); if($request->email == $user->email){ return response()->json(['status' => false, 'data' => [], 'error' => 'You can not send money yourself!!']); } if($receiver = User::where('email',$request->email)->first()){ $txnid = Str::random(4).time(); $data = new BalanceTransfer(); $data->user_id = $user->id; $data->receiver_id = $receiver->id; $data->transaction_no = $txnid; $data->cost = 0; $data->amount = $request->amount; $data->status = 1; $data->save(); $receiver->increment('balance',$request->amount); if($request->wallet == 'main_balance'){ $user->decrement('balance',$request->amount); }else{ $user->decrement('interest_balance',$request->amount); } $trans = new Transaction(); $trans->email = $user->email; $trans->amount = $request->amount; $trans->type = "Send Money"; $trans->profit = "minus"; $trans->txnid = $txnid; $trans->user_id = $user->id; $trans->save(); $receivertrans = new Transaction(); $receivertrans->email = $receiver->email; $receivertrans->amount = $request->amount; $receivertrans->type = "Receive Money"; $receivertrans->profit = "plus"; $receivertrans->txnid = $txnid; $receivertrans->user_id = $receiver->id; $receivertrans->save(); return response()->json(['status' => true, 'data' => 'Money Send Successfully', 'error' => []]); }else{ return response()->json(['status' => false, 'data' => [], 'error' => 'Sender not found!']); } } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => $e->getMessage()]); } } } User/ReferralController.php 0000644 00000002214 15111407530 0011775 0 ustar 00 <?php namespace App\Http\Controllers\Api\User; use App\Http\Controllers\Controller; use App\Http\Resources\ReferralCommissionResource; use App\Http\Resources\ReferrarResource; use App\Models\ReferralBonus; use App\Models\User; use Illuminate\Http\Request; class ReferralController extends Controller { public function referred(){ try{ $referreds = User::where('referral_id',auth()->id())->orderBy('id','desc')->paginate(20); return response()->json(['status' => true, 'data' => ReferrarResource::collection($referreds), 'error' => []]); }catch(\Exception $e){ return response()->json(['status'=> false, 'data'=>[], 'error'=> $e->getMessage()]); } } public function commissions(){ try{ $commissions = ReferralBonus::where('to_user_id',auth()->id())->orderBy('id','desc')->paginate(20); return response()->json(['status' => true, 'data' => ReferralCommissionResource::collection($commissions), 'error' => []]); }catch(\Exception $e){ return response()->json(['status'=> false, 'data'=>[], 'error'=> $e->getMessage()]); } } } User/PayoutController.php 0000644 00000014744 15111407530 0011527 0 ustar 00 <?php namespace App\Http\Controllers\Api\User; use App\Classes\GeniusMailer; use App\Http\Controllers\Controller; use App\Http\Resources\WithdrawMethodResource; use App\Http\Resources\WithdrawResource; use App\Models\Currency; use App\Models\Generalsetting; use App\Models\Transaction; use App\Models\Withdraw; use App\Models\WithdrawMethod; use Illuminate\Http\Request; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; class PayoutController extends Controller { public function methods(){ try { $methods = WithdrawMethod::whereStatus(1)->orderBy('id','desc')->get(); $withdraws = Withdraw::whereUserId(auth()->id())->orderBy('id','desc')->limit(6)->get(); return response()->json(['status' => true, 'data' => ['withdraws'=>WithdrawResource::collection($withdraws),'methods'=>WithdrawMethodResource::collection($methods)], 'error' => []]); } catch (\Exception $e) { return response()->json(['status' => true, 'data' => [], 'error' => $e->getMessage()]); } } public function history(Request $request){ try{ $transaction_type = ['all','pending','completed','rejected']; $available_type = $withdraws = Withdraw::when($request->trx_no,function($query) use ($request){ return $query->where('txnid', $request->trx_no); }) ->when($request->type,function($query) use ($request){ if($request->type != 'all'){ return $query->where('status',$request->type); }else{ } }) ->whereUserId(auth()->id())->orderBy('id','desc')->paginate(10); return response()->json(['status' => true, 'data' => ['transaction_type'=>$transaction_type,'transactions'=> WithdrawResource::collection($withdraws)], 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => $e->getMessage()]); } } public function store(Request $request){ try{ $rules = [ 'amount' => 'required|gt:0' ]; $validator = Validator::make($request->all(), $rules); if ($validator->fails()) { return response()->json(['status' => false, 'data' => [], 'error' => $validator->errors()]); } $user = auth()->user(); $method = WithdrawMethod::whereId($request->method_id)->first(); if($method->min_amount > $request->amount){ return response()->json(['status' => false, 'data' => [], 'error' => 'Min Amount is '.$method->min_amount]); } if($request->amount > $method->max_amount){ return response()->json(['status' => false, 'data' => [], 'error' => 'Max Amount is '.$method->max_amount]); } $currency = Currency::whereId($method->currency_id)->first(); $amountToDeduct = $request->amount/$currency->value; $fee = (($method->percentage / 100) * $request->amount) + $method->fixed; $fee = $fee/$currency->value; $finalamount = $amountToDeduct + $fee; if($request->withdraw_wallet == 'main_wallet'){ if($finalamount > $user->balance){ return response()->json(['status' => false, 'data' => [], 'error' => 'Insufficient Balance.']); } }else{ if($finalamount > $user->interest_balance){ return response()->json(['status' => false, 'data' => [], 'error' => 'Insufficient Balance.']); } } $finalamount = number_format((float)$finalamount,2,'.',''); if($request->withdraw_wallet == 'main_wallet'){ $user->balance = $user->balance - $finalamount; }else{ $user->interest_balance = $user->interest_balance - $finalamount; } $user->update(); $txnid = Str::random(12); $newwithdraw = new Withdraw(); $newwithdraw['user_id'] = auth()->id(); $newwithdraw['currency_id'] = $method->currency_id; $newwithdraw['method'] = $method->name; $newwithdraw['txnid'] = $txnid; $newwithdraw['amount'] = $amountToDeduct; $newwithdraw['fee'] = $fee; $newwithdraw['details'] = $request->details; $newwithdraw->save(); $trans = new Transaction(); $trans->email = $user->email; $trans->amount = $finalamount; $trans->type = "Payout"; $trans->profit = "minus"; $trans->txnid = $txnid; $trans->user_id = $user->id; $trans->save(); $gs = Generalsetting::findOrFail(1); $to = $user->email; $subject = 'Withdraw'; $msg = "Dear Customer,<br> Your withdraw in process."; if($gs->is_smtp == 1) { $data = [ 'to' => $user->email, 'type' => "Withdraw", 'cname' => $user->name, 'oamount' => $newwithdraw->amount, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } return response()->json(['status' => true, 'data' => 'Withdraw Requesting Successfully', 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => $e->getMessage()]); } } public function details($id){ try { $withdraw = Withdraw::findOrFail($id); return response()->json(['status' => true, 'data' => WithdrawResource::collection($withdraw), 'error' => []]); } catch (\Exception $e) { return response()->json(['status' => true, 'data' => [], 'error' => $e->getMessage()]); } } } User/error_log 0000644 00000002510 15111407530 0007372 0 ustar 00 [25-Nov-2025 18:00:53 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/User/DashboardController.php:15 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/User/DashboardController.php on line 15 [25-Nov-2025 18:46:22 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/User/TransferController.php:16 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/User/TransferController.php on line 16 [25-Nov-2025 19:55:47 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/User/DepositController.php:13 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/User/DepositController.php on line 13 [25-Nov-2025 20:01:47 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/User/PayoutController.php:18 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/User/PayoutController.php on line 18 User/DashboardController.php 0000644 00000005512 15111407530 0012126 0 ustar 00 <?php namespace App\Http\Controllers\Api\User; use App\Http\Controllers\Controller; use App\Http\Resources\TransactionResource; use App\Models\Invest; use App\Models\Deposit; use App\Models\Withdraw; use App\Models\Transaction; use Illuminate\Http\Request; use App\Models\ReferralBonus; use App\Models\AdminUserConversation; class DashboardController extends Controller { public function dashboard(){ try{ $data['user'] = auth()->guard('api')->user(); $data['transactions'] = Transaction::whereUserId(auth()->id())->orderBy('id','desc')->limit(5)->get(); $data['total_deposits'] = showPrice(Deposit::whereUserId(auth()->id())->whereStatus('complete')->sum('amount')); $data['total_invests'] = showPrice(Invest::whereUserId(auth()->id())->whereStatus(1)->sum('amount')); $data['total_withdraws'] = showPrice(Withdraw::whereUserId(auth()->id())->whereStatus('completed')->sum('amount')); $data['total_transactions'] = showPrice(Transaction::whereUserId(auth()->id())->sum('amount')); $data['total_tickets'] = AdminUserConversation::whereUserId(auth()->id())->count(); $data['total_referral_bonus'] = showPrice(ReferralBonus::wheretoUserId(auth()->id())->sum('amount')); return response()->json(['status' => true, 'data' => $data, 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => $e->getMessage()]); } } public function transactions(Request $request){ try{ $transaction_type = ['all','Deposit','Payout','ReferralBonus','SendMoney','ReceiveMoney','Invest','InterestMoney','RequestMoney','PayoutRejected']; $transactions = Transaction::whereUserId(auth()->id()) ->when($request->trx_no,function($query) use ($request){ return $query->where('transaction_no', $request->trx_no); }) ->when($request->type,function($query) use ($request){ if($request->type != 'all'){ return $query->where('type',$request->type); }else{ } }) ->whereUserId(auth()->id())->orderBy('id','desc')->paginate(20); return response()->json(['status' => true, 'data' => ['transaction_type'=>$transaction_type,'transactions'=> TransactionResource::collection($transactions)], 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => $e->getMessage()]); } } } User/UserController.php 0000644 00000007263 15111407530 0011162 0 ustar 00 <?php namespace App\Http\Controllers\Api\User; use App\Classes\GeniusMailer; use App\Http\Controllers\Controller; use App\Http\Resources\UserResource; use App\Models\Generalsetting; use Illuminate\Http\Request; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Validator; class UserController extends Controller { public function update(Request $request) { try{ $rules = [ 'photo' => 'mimes:jpeg,jpg,png,svg', 'email' => 'unique:users,email,'.auth()->user()->id ]; $validator = Validator::make($request->all(), $rules); if ($validator->fails()) { return response()->json(['status' => false, 'data' => [], 'error' => $validator->errors()]); } $input = $request->all(); $user = auth()->user(); if ($file = $request->file('photo')) { $name = time().$file->getClientOriginalName(); $file->move('assets/images/',$name); @unlink('assets/images/'.$user->photo); $input['photo'] = $name; $input['is_provider'] = 0; } $user->update($input); $gs = Generalsetting::first(); if($gs->is_smtp == 1) { $data = [ 'to' => $user->email, 'type' => "profile update", 'cname' => $user->name, 'oamount' => "", 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $data->email; $subject = "Your profile has been update"; $msg = "Hello ".$data->name."!\nYour profile has been updated successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } return response()->json(['status' => true, 'data' => new UserResource($user), 'error' => []]); }catch(\Exception $e){ return response()->json(['status'=>false, 'data'=>[], 'error'=>$e->getMessage()]); } } public function updatePassword(Request $request) { $rules = [ 'current_password' => 'required', 'new_password' => 'required', 'renew_password' => 'required', ]; $validator = Validator::make($request->all(), $rules); if ($validator->fails()) { return response()->json(['status' => false, 'data' => [], 'error' => $validator->errors()]); } try{ $user = auth()->user(); if (Hash::check($request->current_password, $user->password)){ if ($request->new_password == $request->renew_password){ $input['password'] = Hash::make($request->new_password); }else{ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => 'Confirm password does not match.']]); } }else{ return response()->json(['status' => true, 'data' => [], 'error' => ['message' => 'Current password Does not match.']]); } $user->update($input); return response()->json(['status' => true, 'data' => ['message' => 'Successfully changed your password.'], 'error' => []]); } catch(\Exception $e){ return response()->json(['status' => true, 'data' => [], 'error' => $e->getMessage()]); } } }