Class: Twilio::REST::Studio::V2::FlowContext::FlowTestUserContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Studio::V2::FlowContext::FlowTestUserContext
- Defined in:
- lib/twilio-ruby/rest/studio/v2/flow/test_user.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#fetch ⇒ FlowTestUserInstance
Fetch a FlowTestUserInstance.
-
#initialize(version, sid) ⇒ FlowTestUserContext
constructor
Initialize the FlowTestUserContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(test_users: nil) ⇒ FlowTestUserInstance
Update the FlowTestUserInstance.
Constructor Details
#initialize(version, sid) ⇒ FlowTestUserContext
Initialize the FlowTestUserContext
75 76 77 78 79 80 81 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/test_user.rb', line 75 def initialize(version, sid) super(version) # Path Solution @solution = {sid: sid, } @uri = "/Flows/#{@solution[:sid]}/TestUsers" end |
Instance Method Details
#fetch ⇒ FlowTestUserInstance
Fetch a FlowTestUserInstance
86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/test_user.rb', line 86 def fetch params = Twilio::Values.of({}) payload = @version.fetch( 'GET', @uri, params, ) FlowTestUserInstance.new(@version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
123 124 125 126 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/test_user.rb', line 123 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Studio.V2.FlowTestUserContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
116 117 118 119 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/test_user.rb', line 116 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Studio.V2.FlowTestUserContext #{context}>" end |
#update(test_users: nil) ⇒ FlowTestUserInstance
Update the FlowTestUserInstance
102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/test_user.rb', line 102 def update(test_users: nil) data = Twilio::Values.of({'TestUsers' => Twilio.serialize_list(test_users) { |e| e }, }) payload = @version.update( 'POST', @uri, data: data, ) FlowTestUserInstance.new(@version, payload, sid: @solution[:sid], ) end |