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
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
-
#context ⇒ AccountSecretContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_rotated ⇒ Time
The date_rotated.
-
#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.
-
#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
227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 227 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
246 247 248 249 250 251 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 246 def context unless @instance_context @instance_context = AccountSecretContext.new(@version, @params['key'], ) end @instance_context end |
#date_rotated ⇒ Time
Returns The date_rotated.
261 262 263 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 261 def date_rotated @properties['date_rotated'] end |
#delete ⇒ Boolean
Delete the AccountSecretInstance
289 290 291 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 289 def delete context.delete end |
#fetch ⇒ AccountSecretInstance
Fetch the AccountSecretInstance
274 275 276 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 274 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
302 303 304 305 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 302 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Microvisor.V1.AccountSecretInstance #{values}>" end |
#key ⇒ String
Returns The secret key.
255 256 257 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 255 def key @properties['key'] end |
#to_s ⇒ Object
Provide a user friendly representation
295 296 297 298 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 295 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Microvisor.V1.AccountSecretInstance #{values}>" end |
#update(value: nil) ⇒ AccountSecretInstance
Update the AccountSecretInstance
282 283 284 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 282 def update(value: nil) context.update(value: value, ) end |
#url ⇒ String
Returns The absolute URL of the Secret.
267 268 269 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 267 def url @properties['url'] end |