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

        $data = Values::of(array(
            'FriendlyName' => $friendlyName,
            'Configuration' => $configuration,
            'AssignmentCallbackUrl' => $options['assignmentCallbackUrl'],
            'FallbackAssignmentCallbackUrl' => $options['fallbackAssignmentCallbackUrl'],
            'TaskReservationTimeout' => $options['taskReservationTimeout'],
        ));

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

        return new WorkflowInstance($this->version, $payload, $this->solution['workspaceSid']);
    }
public function create($friendlyName, $configuration, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'FriendlyName' => $friendlyName,
            'Configuration' => $configuration,
            'AssignmentCallbackUrl' => $options['assignmentCallbackUrl'],
            'FallbackAssignmentCallbackUrl' => $options['fallbackAssignmentCallbackUrl'],
            'TaskReservationTimeout' => $options['taskReservationTimeout'],
        ));

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

        return new WorkflowInstance($this->version, $payload, $this->solution['workspaceSid']);
    }
public function create ( $ friendlyName , $ configuration , $ options = array ( ) ) { $ options = new Values ( $ options ) ; $ data = Values :: of ( array ( 'FriendlyName' => $ friendlyName , 'Configuration' => $ configuration , 'AssignmentCallbackUrl' => $ options [ 'assignmentCallbackUrl' ] , 'FallbackAssignmentCallbackUrl' => $ options [ 'fallbackAssignmentCallbackUrl' ] , 'TaskReservationTimeout' => $ options [ 'taskReservationTimeout' ] , ) ) ; $ payload = $ this -> version -> create ( 'POST' , $ this -> uri , array ( ) , $ data ) ; return new WorkflowInstance ( $ this -> version , $ payload , $ this -> solution [ 'workspaceSid' ] ) ; }
Create a new WorkflowInstance

@param string $friendlyName A string representing a human readable name for
this Workflow.
@param string $configuration JSON document configuring the rules for this
Workflow.
@param array|Options $options Optional Arguments
@return WorkflowInstance Newly created WorkflowInstance
@throws TwilioException When an HTTP error occurs.
Create a new WorkflowInstance