Method: Twilio::REST::Studio::V2::FlowContext::ExecutionList#create
- Defined in:
- lib/twilio-ruby/rest/studio/v2/flow/execution.rb
#create(to: nil, from: nil, parameters: :unset) ⇒ ExecutionInstance
Create the ExecutionInstance
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution.rb', line 42 def create( to: nil, from: nil, parameters: :unset ) data = Twilio::Values.of({ 'To' => to, 'From' => from, 'Parameters' => Twilio.serialize_object(parameters), }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.create('POST', @uri, data: data, headers: headers) ExecutionInstance.new( @version, payload, flow_sid: @solution[:flow_sid], ) end |