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
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 326 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
346 347 348 349 350 351 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 346 def context unless @instance_context @instance_context = FlowTestUserContext.new(@version , @params['sid']) end @instance_context end |
#fetch ⇒ FlowTestUserInstance
Fetch the FlowTestUserInstance
374 375 376 377 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 374 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
401 402 403 404 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 401 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Studio.V2.FlowTestUserInstance #{values}>" end |
#sid ⇒ String
Returns Unique identifier of the flow.
355 356 357 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 355 def sid @properties['sid'] end |
#test_users ⇒ Array<String>
Returns List of test user identities that can test draft versions of the flow.
361 362 363 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 361 def test_users @properties['test_users'] end |
#to_s ⇒ Object
Provide a user friendly representation
394 395 396 397 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 394 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
383 384 385 386 387 388 389 390 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 383 def update( test_users: nil ) context.update( test_users: test_users, ) end |
#url ⇒ String
Returns The URL of this resource.
367 368 369 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb', line 367 def url @properties['url'] end |