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

        $data = Values::of(array(
            'Type' => $type,
            'Configuration.Url' => $options['configurationUrl'],
            'Configuration.Method' => $options['configurationMethod'],
            'Configuration.Filters' => Serialize::map($options['configurationFilters'], function($e) { return $e; }),
            'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function($e) { return $e; }),
            'Configuration.FlowSid' => $options['configurationFlowSid'],
            'Configuration.RetryCount' => $options['configurationRetryCount'],
        ));

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

        return new WebhookInstance(
            $this->version,
            $payload,
            $this->solution['serviceSid'],
            $this->solution['channelSid']
        );
    }
public function create($type, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'Type' => $type,
            'Configuration.Url' => $options['configurationUrl'],
            'Configuration.Method' => $options['configurationMethod'],
            'Configuration.Filters' => Serialize::map($options['configurationFilters'], function($e) { return $e; }),
            'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function($e) { return $e; }),
            'Configuration.FlowSid' => $options['configurationFlowSid'],
            'Configuration.RetryCount' => $options['configurationRetryCount'],
        ));

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

        return new WebhookInstance(
            $this->version,
            $payload,
            $this->solution['serviceSid'],
            $this->solution['channelSid']
        );
    }
public function create ( $ type , $ options = array ( ) ) { $ options = new Values ( $ options ) ; $ data = Values :: of ( array ( 'Type' => $ type , 'Configuration.Url' => $ options [ 'configurationUrl' ] , 'Configuration.Method' => $ options [ 'configurationMethod' ] , 'Configuration.Filters' => Serialize :: map ( $ options [ 'configurationFilters' ] , function ( $ e ) { return $ e ; } ) , 'Configuration.Triggers' => Serialize :: map ( $ options [ 'configurationTriggers' ] , function ( $ e ) { return $ e ; } ) , 'Configuration.FlowSid' => $ options [ 'configurationFlowSid' ] , 'Configuration.RetryCount' => $ options [ 'configurationRetryCount' ] , ) ) ; $ payload = $ this -> version -> create ( 'POST' , $ this -> uri , array ( ) , $ data ) ; return new WebhookInstance ( $ this -> version , $ payload , $ this -> solution [ 'serviceSid' ] , $ this -> solution [ 'channelSid' ] ) ; }
Create a new WebhookInstance

@param string $type The type of webhook
@param array|Options $options Optional Arguments
@return WebhookInstance Newly created WebhookInstance
@throws TwilioException When an HTTP error occurs.
Create a new WebhookInstance