Вход Регистрация
Файл: sngine-v2.8/Script/includes/libs/Twilio/Rest/Api/V2010/AccountInstance.php
Строк: 426
<?php

/**
 * This code was generated by
 *  / _    _  _|   _  _
 * | (_)/(_)(_|/| |(/_  v1.0.0
 * /       /
 */

namespace TwilioRestApiV2010;

use 
TwilioDeserialize;
use 
TwilioExceptionsTwilioException;
use 
TwilioInstanceResource;
use 
TwilioOptions;
use 
TwilioRestApiV2010AccountAddressList;
use 
TwilioRestApiV2010AccountApplicationList;
use 
TwilioRestApiV2010AccountAuthorizedConnectAppList;
use 
TwilioRestApiV2010AccountAvailablePhoneNumberCountryList;
use 
TwilioRestApiV2010AccountBalanceList;
use 
TwilioRestApiV2010AccountCallList;
use 
TwilioRestApiV2010AccountConferenceList;
use 
TwilioRestApiV2010AccountConnectAppList;
use 
TwilioRestApiV2010AccountIncomingPhoneNumberList;
use 
TwilioRestApiV2010AccountKeyList;
use 
TwilioRestApiV2010AccountMessageList;
use 
TwilioRestApiV2010AccountNewKeyList;
use 
TwilioRestApiV2010AccountNewSigningKeyList;
use 
TwilioRestApiV2010AccountNotificationList;
use 
TwilioRestApiV2010AccountOutgoingCallerIdList;
use 
TwilioRestApiV2010AccountQueueList;
use 
TwilioRestApiV2010AccountRecordingList;
use 
TwilioRestApiV2010AccountShortCodeList;
use 
TwilioRestApiV2010AccountSigningKeyList;
use 
TwilioRestApiV2010AccountSipList;
use 
TwilioRestApiV2010AccountTokenList;
use 
TwilioRestApiV2010AccountTranscriptionList;
use 
TwilioRestApiV2010AccountUsageList;
use 
TwilioRestApiV2010AccountValidationRequestList;
use 
TwilioValues;
use 
TwilioVersion;

/**
 * @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 $payloadstring $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) . ']';
    }
}
Онлайн: 0
Реклама