Class: Twilio::REST::Microvisor::V1::AccountSecretContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Microvisor::V1::AccountSecretContext
- 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
-
#delete ⇒ Boolean
Delete the AccountSecretInstance.
-
#fetch ⇒ AccountSecretInstance
Fetch the AccountSecretInstance.
-
#initialize(version, key) ⇒ AccountSecretContext
constructor
Initialize the AccountSecretContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(value: nil) ⇒ AccountSecretInstance
Update the AccountSecretInstance.
Constructor Details
#initialize(version, key) ⇒ AccountSecretContext
Initialize the AccountSecretContext
157 158 159 160 161 162 163 164 165 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 157 def initialize(version, key) super(version) # Path Solution @solution = { key: key, } @uri = "/Secrets/#{@solution[:key]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the AccountSecretInstance
169 170 171 172 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 169 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ AccountSecretInstance
Fetch the AccountSecretInstance
177 178 179 180 181 182 183 184 185 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 177 def fetch payload = @version.fetch('GET', @uri) AccountSecretInstance.new( @version, payload, key: @solution[:key], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
217 218 219 220 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 217 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Microvisor.V1.AccountSecretContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
210 211 212 213 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 210 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Microvisor.V1.AccountSecretContext #{context}>" end |
#update(value: nil) ⇒ AccountSecretInstance
Update the AccountSecretInstance
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/twilio-ruby/rest/microvisor/v1/account_secret.rb', line 191 def update( value: nil ) data = Twilio::Values.of({ 'Value' => value, }) payload = @version.update('POST', @uri, data: data) AccountSecretInstance.new( @version, payload, key: @solution[:key], ) end |