public function create($command, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'Command' => $command,
            'Sim' => $options['sim'],
            'CallbackMethod' => $options['callbackMethod'],
            'CallbackUrl' => $options['callbackUrl'],
            'CommandMode' => $options['commandMode'],
            'IncludeSid' => $options['includeSid'],
            'DeliveryReceiptRequested' => Serialize::booleanToString($options['deliveryReceiptRequested']),
        ));

        $payload = $this->version->create(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new CommandInstance($this->version, $payload);
    }
public function create($command, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'Command' => $command,
            'Sim' => $options['sim'],
            'CallbackMethod' => $options['callbackMethod'],
            'CallbackUrl' => $options['callbackUrl'],
            'CommandMode' => $options['commandMode'],
            'IncludeSid' => $options['includeSid'],
            'DeliveryReceiptRequested' => Serialize::booleanToString($options['deliveryReceiptRequested']),
        ));

        $payload = $this->version->create(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new CommandInstance($this->version, $payload);
    }
public function create ( $ command , $ options = array ( ) ) { $ options = new Values ( $ options ) ; $ data = Values :: of ( array ( 'Command' => $ command , 'Sim' => $ options [ 'sim' ] , 'CallbackMethod' => $ options [ 'callbackMethod' ] , 'CallbackUrl' => $ options [ 'callbackUrl' ] , 'CommandMode' => $ options [ 'commandMode' ] , 'IncludeSid' => $ options [ 'includeSid' ] , 'DeliveryReceiptRequested' => Serialize :: booleanToString ( $ options [ 'deliveryReceiptRequested' ] ) , ) ) ; $ payload = $ this -> version -> create ( 'POST' , $ this -> uri , array ( ) , $ data ) ; return new CommandInstance ( $ this -> version , $ payload ) ; }
Create a new CommandInstance

@param string $command The message body of the Command or a Base64 encoded
byte string in binary mode.
@param array|Options $options Optional Arguments
@return CommandInstance Newly created CommandInstance
@throws TwilioException When an HTTP error occurs.
Create a new CommandInstance