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

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

namespace TwilioRestPreviewTrustedComms;

use 
TwilioExceptionsTwilioException;
use 
TwilioListResource;
use 
TwilioOptions;
use 
TwilioValues;
use 
TwilioVersion;

/**
 * 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 BrandedCallList extends ListResource {
    
/**
     * Construct the BrandedCallList
     *
     * @param Version $version Version that contains the resource
     */
    
public function __construct(Version $version) {
        
parent::__construct($version);

        
// Path Solution
        
$this->solution = [];

        
$this->uri '/Business/BrandedCalls';
    }

    
/**
     * Create the BrandedCallInstance
     *
     * @param string $from Twilio number from which to brand the call
     * @param string $to The terminating Phone Number
     * @param string $reason The business reason for this phone call
     * @param array|Options $options Optional Arguments
     * @return BrandedCallInstance Created BrandedCallInstance
     * @throws TwilioException When an HTTP error occurs.
     */
    
public function create(string $fromstring $tostring $reason, array $options = []): BrandedCallInstance {
        
$options = new Values($options);

        
$data Values::of([
            
'From' => $from,
            
'To' => $to,
            
'Reason' => $reason,
            
'CallSid' => $options['callSid'],
        ]);

        
$payload $this->version->create('POST'$this->uri, [], $data);

        return new 
BrandedCallInstance($this->version$payload);
    }

    
/**
     * Provide a friendly representation
     *
     * @return string Machine friendly representation
     */
    
public function __toString(): string {
        return 
'[Twilio.Preview.TrustedComms.BrandedCallList]';
    }
}
Онлайн: 1
Реклама