Class: Twilio::REST::Studio::V2::FlowContext::FlowRevisionContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Studio::V2::FlowContext::FlowRevisionContext
- Defined in:
- lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
Instance Method Summary collapse
-
#fetch ⇒ FlowRevisionInstance
Fetch the FlowRevisionInstance.
-
#initialize(version, sid, revision) ⇒ FlowRevisionContext
constructor
Initialize the FlowRevisionContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid, revision) ⇒ FlowRevisionContext
Initialize the FlowRevisionContext
139 140 141 142 143 144 145 146 147 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 139 def initialize(version, sid, revision) super(version) # Path Solution @solution = { sid: sid, revision: revision, } @uri = "/Flows/#{@solution[:sid]}/Revisions/#{@solution[:revision]}" end |
Instance Method Details
#fetch ⇒ FlowRevisionInstance
Fetch the FlowRevisionInstance
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 151 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) FlowRevisionInstance.new( @version, payload, sid: @solution[:sid], revision: @solution[:revision], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
178 179 180 181 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 178 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Studio.V2.FlowRevisionContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
171 172 173 174 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 171 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Studio.V2.FlowRevisionContext #{context}>" end |