Class: Twilio::REST::Microvisor::V1::AccountSecretInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Microvisor::V1::AccountSecretInstance
- Defined in:
- lib/twilio-ruby/rest/microvisor/v1/account_secret.rb
Instance Method Summary collapse
-
#context ⇒ AccountSecretContext
Generate an instance context for the instance, the context is capable of performing various actions.
- #date_rotated ⇒ Time
-
#delete ⇒ Boolean
Delete the AccountSecretInstance.
-
#fetch ⇒ AccountSecretInstance
Fetch the AccountSecretInstance.
-
#initialize(version, payload, key: nil) ⇒ AccountSecretInstance
constructor
Initialize the AccountSecretInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#key ⇒ String
The secret key; up to 100 characters.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(value: nil) ⇒ AccountSecretInstance
Update the AccountSecretInstance.
-
#url ⇒ String
The absolute URL of the Secret.
Constructor Details
#initialize(version, payload, key: nil) ⇒ AccountSecretInstance
Initialize the AccountSecretInstance
261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 261 def initialize(version, payload , key: nil) super(version) # Marshaled Properties @properties = { 'key' => payload['key'], 'date_rotated' => Twilio.deserialize_iso8601_datetime(payload['date_rotated']), 'url' => payload['url'], } # Context @instance_context = nil @params = { 'key' => key || @properties['key'] , } end |
Instance Method Details
#context ⇒ AccountSecretContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
280 281 282 283 284 285 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 280 def context unless @instance_context @instance_context = AccountSecretContext.new(@version , @params['key']) end @instance_context end |
#date_rotated ⇒ Time
295 296 297 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 295 def date_rotated @properties['date_rotated'] end |
#delete ⇒ Boolean
Delete the AccountSecretInstance
308 309 310 311 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 308 def delete context.delete end |
#fetch ⇒ AccountSecretInstance
Fetch the AccountSecretInstance
316 317 318 319 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 316 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
343 344 345 346 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 343 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Microvisor.V1.AccountSecretInstance #{values}>" end |
#key ⇒ String
Returns The secret key; up to 100 characters.
289 290 291 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 289 def key @properties['key'] end |
#to_s ⇒ Object
Provide a user friendly representation
336 337 338 339 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 336 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Microvisor.V1.AccountSecretInstance #{values}>" end |
#update(value: nil) ⇒ AccountSecretInstance
Update the AccountSecretInstance
325 326 327 328 329 330 331 332 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 325 def update( value: nil ) context.update( value: value, ) end |
#url ⇒ String
Returns The absolute URL of the Secret.
301 302 303 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 301 def url @properties['url'] end |