Class: Twilio::REST::Microvisor::V1::AppContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Microvisor::V1::AppContext
- Defined in:
- lib/twilio-ruby/rest/microvisor/v1/app.rb
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the AppInstance.
-
#fetch ⇒ AppInstance
Fetch the AppInstance.
-
#initialize(version, sid) ⇒ AppContext
constructor
Initialize the AppContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid) ⇒ AppContext
Initialize the AppContext
154 155 156 157 158 159 160 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 154 def initialize(version, sid) super(version) # Path Solution @solution = {sid: sid, } @uri = "/Apps/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the AppInstance
174 175 176 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 174 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ AppInstance
Fetch the AppInstance
165 166 167 168 169 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 165 def fetch payload = @version.fetch('GET', @uri) AppInstance.new(@version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
187 188 189 190 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 187 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Microvisor.V1.AppContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
180 181 182 183 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 180 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Microvisor.V1.AppContext #{context}>" end |