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
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID identifier of the Account.
-
#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, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date that this App was last updated, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#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 ⇒ Hash
-
#sid ⇒ String
A 34-character string that uniquely identifies this App.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
A 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
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 232 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
271 272 273 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 271 def account_sid @properties['account_sid'] end |
#app_manifests ⇒ app_manifests
Access the app_manifests
330 331 332 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 330 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
256 257 258 259 260 261 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 256 def context unless @instance_context @instance_context = AppContext.new(@version , @params['sid']) end @instance_context end |
#date_created ⇒ Time
289 290 291 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 289 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
295 296 297 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 295 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the AppInstance
314 315 316 317 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 314 def delete context.delete end |
#fetch ⇒ AppInstance
Fetch the AppInstance
322 323 324 325 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 322 def fetch context.fetch end |
#hash ⇒ String
277 278 279 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 277 def hash @properties['hash'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
343 344 345 346 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 343 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Microvisor.V1.AppInstance #{values}>" end |
#links ⇒ Hash
307 308 309 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 307 def links @properties['links'] end |
#sid ⇒ String
265 266 267 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 265 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
336 337 338 339 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 336 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Microvisor.V1.AppInstance #{values}>" end |
#unique_name ⇒ String
283 284 285 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 283 def unique_name @properties['unique_name'] end |
#url ⇒ String
301 302 303 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 301 def url @properties['url'] end |