class Twilio::REST::Trunking::V1::TrunkContext::CredentialListContext

Public Class Methods

new(version, trunk_sid, sid) click to toggle source

Initialize the CredentialListContext @param [Version] version Version that contains the resource @param [String] trunk_sid The SID of the Trunk from which to fetch the

credential list.

@param [String] sid The unique string that we created to identify the

CredentialList resource to fetch.

@return [CredentialListContext] CredentialListContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb
169 def initialize(version, trunk_sid, sid)
170   super(version)
171 
172   # Path Solution
173   @solution = {trunk_sid: trunk_sid, sid: sid, }
174   @uri = "/Trunks/#{@solution[:trunk_sid]}/CredentialLists/#{@solution[:sid]}"
175 end

Public Instance Methods

delete() click to toggle source

Delete the CredentialListInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb
194 def delete
195    @version.delete('DELETE', @uri)
196 end
fetch() click to toggle source

Fetch the CredentialListInstance @return [CredentialListInstance] Fetched CredentialListInstance

    # File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb
180 def fetch
181   payload = @version.fetch('GET', @uri)
182 
183   CredentialListInstance.new(
184       @version,
185       payload,
186       trunk_sid: @solution[:trunk_sid],
187       sid: @solution[:sid],
188   )
189 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb
207 def inspect
208   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
209   "#<Twilio.Trunking.V1.CredentialListContext #{context}>"
210 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb
200 def to_s
201   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
202   "#<Twilio.Trunking.V1.CredentialListContext #{context}>"
203 end