Class: Twilio::REST::Trunking::V1::TrunkContext::CredentialListContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Trunking::V1::TrunkContext::CredentialListContext
- Defined in:
- lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the CredentialListInstance.
-
#delete_with_metadata ⇒ Boolean
Delete the CredentialListInstanceMetadata.
-
#fetch ⇒ CredentialListInstance
Fetch the CredentialListInstance.
-
#fetch_with_metadata ⇒ CredentialListInstance
Fetch the CredentialListInstanceMetadata.
-
#initialize(version, trunk_sid, sid) ⇒ CredentialListContext
constructor
Initialize the CredentialListContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, trunk_sid, sid) ⇒ CredentialListContext
Initialize the CredentialListContext
220 221 222 223 224 225 226 227 228 229 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb', line 220 def initialize(version, trunk_sid, sid) super(version) # Path Solution @solution = { trunk_sid: trunk_sid, sid: sid, } @uri = "/Trunks/#{@solution[:trunk_sid]}/CredentialLists/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the CredentialListInstance
233 234 235 236 237 238 239 240 241 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb', line 233 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#delete_with_metadata ⇒ Boolean
Delete the CredentialListInstanceMetadata
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb', line 246 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('DELETE', @uri, headers: headers) credentialList_instance = CredentialListInstance.new( @version, response.body, account_sid: @solution[:account_sid], sid: @solution[:sid], ) CredentialListInstanceMetadata.new(@version, credentialList_instance, response.headers, response.status_code) end |
#fetch ⇒ CredentialListInstance
Fetch the CredentialListInstance
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb', line 265 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) CredentialListInstance.new( @version, payload, trunk_sid: @solution[:trunk_sid], sid: @solution[:sid], ) end |
#fetch_with_metadata ⇒ CredentialListInstance
Fetch the CredentialListInstanceMetadata
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb', line 285 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) credential_list_instance = CredentialListInstance.new( @version, response.body, trunk_sid: @solution[:trunk_sid], sid: @solution[:sid], ) CredentialListInstanceMetadata.new( @version, credential_list_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
318 319 320 321 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb', line 318 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trunking.V1.CredentialListContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
311 312 313 314 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb', line 311 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trunking.V1.CredentialListContext #{context}>" end |