public function create($callbackUrl, $triggerValue, $usageCategory, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'CallbackUrl' => $callbackUrl,
            'TriggerValue' => $triggerValue,
            'UsageCategory' => $usageCategory,
            'CallbackMethod' => $options['callbackMethod'],
            'FriendlyName' => $options['friendlyName'],
            'Recurring' => $options['recurring'],
            'TriggerBy' => $options['triggerBy'],
        ));

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

        return new TriggerInstance($this->version, $payload, $this->solution['accountSid']);
    }
public function create($callbackUrl, $triggerValue, $usageCategory, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'CallbackUrl' => $callbackUrl,
            'TriggerValue' => $triggerValue,
            'UsageCategory' => $usageCategory,
            'CallbackMethod' => $options['callbackMethod'],
            'FriendlyName' => $options['friendlyName'],
            'Recurring' => $options['recurring'],
            'TriggerBy' => $options['triggerBy'],
        ));

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

        return new TriggerInstance($this->version, $payload, $this->solution['accountSid']);
    }
public function create ( $ callbackUrl , $ triggerValue , $ usageCategory , $ options = array ( ) ) { $ options = new Values ( $ options ) ; $ data = Values :: of ( array ( 'CallbackUrl' => $ callbackUrl , 'TriggerValue' => $ triggerValue , 'UsageCategory' => $ usageCategory , 'CallbackMethod' => $ options [ 'callbackMethod' ] , 'FriendlyName' => $ options [ 'friendlyName' ] , 'Recurring' => $ options [ 'recurring' ] , 'TriggerBy' => $ options [ 'triggerBy' ] , ) ) ; $ payload = $ this -> version -> create ( 'POST' , $ this -> uri , array ( ) , $ data ) ; return new TriggerInstance ( $ this -> version , $ payload , $ this -> solution [ 'accountSid' ] ) ; }
Create a new TriggerInstance

@param string $callbackUrl The URL we call when the trigger fires
@param string $triggerValue The usage value at which the trigger should fire
@param string $usageCategory The usage category the trigger watches
@param array|Options $options Optional Arguments
@return TriggerInstance Newly created TriggerInstance
@throws TwilioException When an HTTP error occurs.
Create a new TriggerInstance