class Twilio::REST::Trunking::V1::TrunkContext::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] 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
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
@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
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
@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
@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 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 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
@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
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
@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
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
@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
@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