Class: Twilio::REST::Microvisor::V1::AppInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Microvisor::V1::AppInstance
- 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
-
#account_sid ⇒ String
The Account SID.
-
#app_manifests ⇒ app_manifests
Access the app_manifests.
-
#context ⇒ AppContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date that this App was created.
-
#date_updated ⇒ Time
The date that this App was last updated.
-
#delete ⇒ Boolean
Delete the AppInstance.
-
#fetch ⇒ AppInstance
Fetch the AppInstance.
-
#hash ⇒ String
App manifest hash represented as hash_algorithm:hash_value.
-
#initialize(version, payload, sid: nil) ⇒ AppInstance
constructor
Initialize the AppInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
The links.
-
#sid ⇒ String
A string that uniquely identifies this App.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
An developer-defined string that uniquely identifies the App.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ AppInstance
Initialize the AppInstance
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 213 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'hash' => payload['hash'], 'unique_name' => payload['unique_name'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = {'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The Account SID.
252 253 254 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 252 def account_sid @properties['account_sid'] end |
#app_manifests ⇒ app_manifests
Access the app_manifests
309 310 311 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 309 def app_manifests context.app_manifests end |
#context ⇒ AppContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
237 238 239 240 241 242 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 237 def context unless @instance_context @instance_context = AppContext.new(@version, @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The date that this App was created.
270 271 272 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 270 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date that this App was last updated.
276 277 278 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 276 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the AppInstance
302 303 304 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 302 def delete context.delete end |
#fetch ⇒ AppInstance
Fetch the AppInstance
295 296 297 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 295 def fetch context.fetch end |
#hash ⇒ String
Returns App manifest hash represented as hash_algorithm:hash_value.
258 259 260 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 258 def hash @properties['hash'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
322 323 324 325 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 322 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Microvisor.V1.AppInstance #{values}>" end |
#links ⇒ String
Returns The links.
288 289 290 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 288 def links @properties['links'] end |
#sid ⇒ String
Returns A string that uniquely identifies this App.
246 247 248 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 246 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
315 316 317 318 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 315 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Microvisor.V1.AppInstance #{values}>" end |
#unique_name ⇒ String
Returns An developer-defined string that uniquely identifies the App.
264 265 266 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 264 def unique_name @properties['unique_name'] end |
#url ⇒ String
Returns The URL of this resource.
282 283 284 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 282 def url @properties['url'] end |