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

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

namespace TwilioRestApiV2010Account;

use 
TwilioDeserialize;
use 
TwilioExceptionsTwilioException;
use 
TwilioInstanceResource;
use 
TwilioValues;
use 
TwilioVersion;

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