class Twilio::REST::Trunking::V1::TrunkContext::IpAccessControlListInstance

Public Class Methods

new(version, payload, trunk_sid: nil, sid: nil) click to toggle source

Initialize the IpAccessControlListInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] trunk_sid The SID of the Trunk the resource is associated with. @param [String] sid The unique string that we created to identify the

IpAccessControlList resource to fetch.

@return [IpAccessControlListInstance] IpAccessControlListInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb
220 def initialize(version, payload, trunk_sid: nil, sid: nil)
221   super(version)
222 
223   # Marshaled Properties
224   @properties = {
225       'account_sid' => payload['account_sid'],
226       'sid' => payload['sid'],
227       'trunk_sid' => payload['trunk_sid'],
228       'friendly_name' => payload['friendly_name'],
229       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
230       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
231       'url' => payload['url'],
232   }
233 
234   # Context
235   @instance_context = nil
236   @params = {'trunk_sid' => trunk_sid, 'sid' => sid || @properties['sid'], }
237 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb
252 def account_sid
253   @properties['account_sid']
254 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [IpAccessControlListContext] IpAccessControlListContext for this IpAccessControlListInstance

    # File lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb
243 def context
244   unless @instance_context
245     @instance_context = IpAccessControlListContext.new(@version, @params['trunk_sid'], @params['sid'], )
246   end
247   @instance_context
248 end
date_created() click to toggle source

@return [Time] The RFC 2822 date and time in GMT when the resource was created

    # File lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb
276 def date_created
277   @properties['date_created']
278 end
date_updated() click to toggle source

@return [Time] The RFC 2822 date and time in GMT when the resource was last updated

    # File lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb
282 def date_updated
283   @properties['date_updated']
284 end
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
302 def delete
303   context.delete
304 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
295 def fetch
296   context.fetch
297 end
friendly_name() click to toggle source

@return [String] The string that you assigned to describe the resource

    # File lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb
270 def friendly_name
271   @properties['friendly_name']
272 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
315 def inspect
316   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
317   "<Twilio.Trunking.V1.IpAccessControlListInstance #{values}>"
318 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb
258 def sid
259   @properties['sid']
260 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
308 def to_s
309   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
310   "<Twilio.Trunking.V1.IpAccessControlListInstance #{values}>"
311 end
trunk_sid() click to toggle source

@return [String] The SID of the Trunk the resource is associated with

    # File lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb
264 def trunk_sid
265   @properties['trunk_sid']
266 end
url() click to toggle source

@return [String] The absolute URL of the resource

    # File lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb
288 def url
289   @properties['url']
290 end