class Twilio::REST::Api::V2010::AccountContext::SipList::IpAccessControlListInstance
Public Class Methods
Initialize the IpAccessControlListInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] account_sid
A 34 character string that uniquely identifies this
resource.
@param [String] sid A 34 character string that uniquely identifies the resource
to fetch.
@return [IpAccessControlListInstance] IpAccessControlListInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb 266 def initialize(version, payload, account_sid: nil, sid: nil) 267 super(version) 268 269 # Marshaled Properties 270 @properties = { 271 'sid' => payload['sid'], 272 'account_sid' => payload['account_sid'], 273 'friendly_name' => payload['friendly_name'], 274 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']), 275 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), 276 'subresource_uris' => payload['subresource_uris'], 277 'uri' => payload['uri'], 278 } 279 280 # Context 281 @instance_context = nil 282 @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'], } 283 end
Public Instance Methods
@return [String] The unique sid that identifies this account
# File lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb 304 def account_sid 305 @properties['account_sid'] 306 end
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/api/v2010/account/sip/ip_access_control_list.rb 289 def context 290 unless @instance_context 291 @instance_context = IpAccessControlListContext.new(@version, @params['account_sid'], @params['sid'], ) 292 end 293 @instance_context 294 end
@return [Time] The date this resource was created
# File lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb 316 def date_created 317 @properties['date_created'] 318 end
@return [Time] The date this resource was last updated
# File lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb 322 def date_updated 323 @properties['date_updated'] 324 end
Delete the IpAccessControlListInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb 357 def delete 358 context.delete 359 end
Fetch the IpAccessControlListInstance
@return [IpAccessControlListInstance] Fetched IpAccessControlListInstance
# File lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb 341 def fetch 342 context.fetch 343 end
@return [String] A human readable description of this resource
# File lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb 310 def friendly_name 311 @properties['friendly_name'] 312 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb 377 def inspect 378 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 379 "<Twilio.Api.V2010.IpAccessControlListInstance #{values}>" 380 end
Access the ip_addresses
@return [ip_addresses] ip_addresses
# File lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb 364 def ip_addresses 365 context.ip_addresses 366 end
@return [String] A string that uniquely identifies this resource
# File lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb 298 def sid 299 @properties['sid'] 300 end
@return [String] The IP addresses associated with this resource.
# File lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb 328 def subresource_uris 329 @properties['subresource_uris'] 330 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb 370 def to_s 371 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 372 "<Twilio.Api.V2010.IpAccessControlListInstance #{values}>" 373 end
Update the IpAccessControlListInstance
@param [String] friendly_name
A human readable descriptive text, up to 64
characters long.
@return [IpAccessControlListInstance] Updated IpAccessControlListInstance
# File lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb 350 def update(friendly_name: nil) 351 context.update(friendly_name: friendly_name, ) 352 end
@return [String] The URI for this resource
# File lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb 334 def uri 335 @properties['uri'] 336 end