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
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 241 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 unique SID identifier of the Account.
280 281 282 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 280 def account_sid @properties['account_sid'] end |
#app_manifests ⇒ app_manifests
Access the app_manifests
339 340 341 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 339 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
265 266 267 268 269 270 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 265 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, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
298 299 300 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 298 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date that this App was last updated, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
304 305 306 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 304 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the AppInstance
323 324 325 326 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 323 def delete context.delete end |
#fetch ⇒ AppInstance
Fetch the AppInstance
331 332 333 334 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 331 def fetch context.fetch end |
#hash ⇒ String
Returns App manifest hash represented as ‘hash_algorithm:hash_value`.
286 287 288 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 286 def hash @properties['hash'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
352 353 354 355 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 352 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Microvisor.V1.AppInstance #{values}>" end |
#links ⇒ Hash
316 317 318 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 316 def links @properties['links'] end |
#sid ⇒ String
Returns A 34-character string that uniquely identifies this App.
274 275 276 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 274 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
345 346 347 348 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 345 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Microvisor.V1.AppInstance #{values}>" end |
#unique_name ⇒ String
Returns A developer-defined string that uniquely identifies the App. This value must be unique for all Apps on this Account. The ‘unique_name` value may be used as an alternative to the `sid` in the URL path to address the resource.
292 293 294 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 292 def unique_name @properties['unique_name'] end |
#url ⇒ String
Returns The URL of this resource.
310 311 312 |
# File 'lib/twilio-ruby/rest/microvisor/v1/app.rb', line 310 def url @properties['url'] end |