class Twilio::REST::Trunking::V1::TrunkContext::IpAccessControlListContext
Public Class Methods
new(version, trunk_sid, sid)
click to toggle source
Initialize the IpAccessControlListContext
@param [Version] version Version
that contains the resource @param [String] trunk_sid The SID of the Trunk from which to fetch the IP Access
Control List.
@param [String] sid The unique string that we created to identify the
IpAccessControlList resource to fetch.
@return [IpAccessControlListContext] IpAccessControlListContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb 167 def initialize(version, trunk_sid, sid) 168 super(version) 169 170 # Path Solution 171 @solution = {trunk_sid: trunk_sid, sid: sid, } 172 @uri = "/Trunks/#{@solution[:trunk_sid]}/IpAccessControlLists/#{@solution[:sid]}" 173 end
Public Instance Methods
delete()
click to toggle source
Delete the IpAccessControlListInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb 192 def delete 193 @version.delete('DELETE', @uri) 194 end
fetch()
click to toggle source
Fetch the IpAccessControlListInstance
@return [IpAccessControlListInstance] Fetched IpAccessControlListInstance
# File lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb 178 def fetch 179 payload = @version.fetch('GET', @uri) 180 181 IpAccessControlListInstance.new( 182 @version, 183 payload, 184 trunk_sid: @solution[:trunk_sid], 185 sid: @solution[:sid], 186 ) 187 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb 205 def inspect 206 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 207 "#<Twilio.Trunking.V1.IpAccessControlListContext #{context}>" 208 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb 198 def to_s 199 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 200 "#<Twilio.Trunking.V1.IpAccessControlListContext #{context}>" 201 end