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,
lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb
Defined Under Namespace
Classes: AppManifestContext, AppManifestInstance, AppManifestList, AppManifestPage
Instance Method Summary collapse
-
#app_manifests ⇒ AppManifestList, AppManifestContext
Access the app_manifests.
-
#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
136 137 138 139 140 141 142 143 144 145 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 136 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Apps/#{@solution[:sid]}" # Dependents @app_manifests = nil end |
Instance Method Details
#app_manifests ⇒ AppManifestList, AppManifestContext
Access the app_manifests
181 182 183 184 185 186 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 181 def app_manifests AppManifestContext.new( @version, @solution[:sid] ) end |
#delete ⇒ Boolean
Delete the AppInstance
149 150 151 152 153 154 155 156 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 149 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#fetch ⇒ AppInstance
Fetch the AppInstance
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 161 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) AppInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
197 198 199 200 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 197 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Microvisor.V1.AppContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
190 191 192 193 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 190 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Microvisor.V1.AppContext #{context}>" end |