Class: Twilio::REST::Studio::V2::FlowContext::FlowTestUserInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Studio::V2::FlowContext::FlowTestUserInstance
- Defined in:
- lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb
Instance Method Summary collapse
-
#context ⇒ FlowTestUserContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ FlowTestUserInstance
Fetch the FlowTestUserInstance.
-
#initialize(version, payload, sid: nil) ⇒ FlowTestUserInstance
constructor
Initialize the FlowTestUserInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#sid ⇒ String
Unique identifier of the flow.
-
#test_users ⇒ Array<String>
List of test user identities that can test draft versions of the flow.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(test_users: nil) ⇒ FlowTestUserInstance
Update the FlowTestUserInstance.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ FlowTestUserInstance
Initialize the FlowTestUserInstance
151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 151 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'test_users' => payload['test_users'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#context ⇒ FlowTestUserContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
170 171 172 173 174 175 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 170 def context unless @instance_context @instance_context = FlowTestUserContext.new(@version , @params['sid']) end @instance_context end |
#fetch ⇒ FlowTestUserInstance
Fetch the FlowTestUserInstance
198 199 200 201 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 198 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
225 226 227 228 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 225 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Studio.V2.FlowTestUserInstance #{values}>" end |
#sid ⇒ String
Returns Unique identifier of the flow.
179 180 181 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 179 def sid @properties['sid'] end |
#test_users ⇒ Array<String>
Returns List of test user identities that can test draft versions of the flow.
185 186 187 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 185 def test_users @properties['test_users'] end |
#to_s ⇒ Object
Provide a user friendly representation
218 219 220 221 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 218 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Studio.V2.FlowTestUserInstance #{values}>" end |
#update(test_users: nil) ⇒ FlowTestUserInstance
Update the FlowTestUserInstance
207 208 209 210 211 212 213 214 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 207 def update( test_users: nil ) context.update( test_users: test_users, ) end |
#url ⇒ String
Returns The URL of this resource.
191 192 193 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 191 def url @properties['url'] end |