class Twilio::REST::Studio::V2::FlowContext::FlowTestUserInstance

Public Class Methods

new(version, payload, sid: nil) click to toggle source

Initialize the FlowTestUserInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid Unique identifier of the flow. @return [FlowTestUserInstance] FlowTestUserInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/studio/v2/flow/test_user.rb
121 def initialize(version, payload, sid: nil)
122   super(version)
123 
124   # Marshaled Properties
125   @properties = {
126       'sid' => payload['sid'],
127       'test_users' => payload['test_users'],
128       'url' => payload['url'],
129   }
130 
131   # Context
132   @instance_context = nil
133   @params = {'sid' => sid, }
134 end

Public Instance Methods

context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [FlowTestUserContext] FlowTestUserContext for this FlowTestUserInstance

    # File lib/twilio-ruby/rest/studio/v2/flow/test_user.rb
140 def context
141   unless @instance_context
142     @instance_context = FlowTestUserContext.new(@version, @params['sid'], )
143   end
144   @instance_context
145 end
fetch() click to toggle source

Fetch the FlowTestUserInstance @return [FlowTestUserInstance] Fetched FlowTestUserInstance

    # File lib/twilio-ruby/rest/studio/v2/flow/test_user.rb
168 def fetch
169   context.fetch
170 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/studio/v2/flow/test_user.rb
190 def inspect
191   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
192   "<Twilio.Studio.V2.FlowTestUserInstance #{values}>"
193 end
sid() click to toggle source

@return [String] Unique identifier of the flow.

    # File lib/twilio-ruby/rest/studio/v2/flow/test_user.rb
149 def sid
150   @properties['sid']
151 end
test_users() click to toggle source

@return [Array] List of test user identities that can test draft versions of the flow.

    # File lib/twilio-ruby/rest/studio/v2/flow/test_user.rb
155 def test_users
156   @properties['test_users']
157 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/studio/v2/flow/test_user.rb
183 def to_s
184   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
185   "<Twilio.Studio.V2.FlowTestUserInstance #{values}>"
186 end
update(test_users: nil) click to toggle source

Update the FlowTestUserInstance @param [Array] test_users List of test user identities that can test

draft versions of the flow.

@return [FlowTestUserInstance] Updated FlowTestUserInstance

    # File lib/twilio-ruby/rest/studio/v2/flow/test_user.rb
177 def update(test_users: nil)
178   context.update(test_users: test_users, )
179 end
url() click to toggle source

@return [String] The URL of this resource.

    # File lib/twilio-ruby/rest/studio/v2/flow/test_user.rb
161 def url
162   @properties['url']
163 end