Class: Twilio::REST::Studio::V2

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/studio/v2.rb,
lib/twilio-ruby/rest/studio/v2/flow.rb,
lib/twilio-ruby/rest/studio/v2/flow_validate.rb,
lib/twilio-ruby/rest/studio/v2/flow/execution.rb,
lib/twilio-ruby/rest/studio/v2/flow/test_user.rb,
lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb,
lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb,
lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb,
lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb

Defined Under Namespace

Classes: FlowContext, FlowInstance, FlowList, FlowPage, FlowValidateInstance, FlowValidateList, FlowValidatePage

Instance Attribute Summary

Attributes inherited from Version

#domain

Instance Method Summary collapse

Methods inherited from Version

#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update

Constructor Details

#initialize(domain) ⇒ V2

Initialize the V2 version of Studio


15
16
17
18
19
20
# File 'lib/twilio-ruby/rest/studio/v2.rb', line 15

def initialize(domain)
  super
  @version = 'v2'
  @flows = nil
  @flow_validate = nil
end

Instance Method Details

#flow_validateTwilio::REST::Studio::V2::FlowValidateContext

Returns:

  • (Twilio::REST::Studio::V2::FlowValidateContext)

39
40
41
# File 'lib/twilio-ruby/rest/studio/v2.rb', line 39

def flow_validate
  @flow_validate ||= FlowValidateList.new self
end

#flows(sid = :unset) ⇒ Twilio::REST::Studio::V2::FlowContext, Twilio::REST::Studio::V2::FlowList

Parameters:

  • sid (String) (defaults to: :unset)

    The SID of the Flow resource to fetch.

Returns:


26
27
28
29
30
31
32
33
34
35
# File 'lib/twilio-ruby/rest/studio/v2.rb', line 26

def flows(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @flows ||= FlowList.new self
  else
      FlowContext.new(self, sid)
  end
end

#to_sObject

Provide a user friendly representation


45
46
47
# File 'lib/twilio-ruby/rest/studio/v2.rb', line 45

def to_s
  '<Twilio::REST::Studio::V2>'
end