Class: Twilio::REST::Api::V2010::AccountContext::SipList::IpAccessControlListInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::SipList::IpAccessControlListInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique sid that identifies this account.
-
#context ⇒ IpAccessControlListContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date this resource was created.
-
#date_updated ⇒ Time
The date this resource was last updated.
-
#delete ⇒ Boolean
Deletes the IpAccessControlListInstance.
-
#fetch ⇒ IpAccessControlListInstance
Fetch a IpAccessControlListInstance.
-
#friendly_name ⇒ String
A human readable description of this resource.
-
#initialize(version, payload, account_sid: nil, sid: nil) ⇒ IpAccessControlListInstance
constructor
Initialize the IpAccessControlListInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#ip_addresses ⇒ ip_addresses
Access the ip_addresses.
-
#sid ⇒ String
A string that uniquely identifies this resource.
-
#subresource_uris ⇒ String
The subresource_uris.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(friendly_name: nil) ⇒ IpAccessControlListInstance
Update the IpAccessControlListInstance.
-
#uri ⇒ String
The URI for this resource.
Constructor Details
#initialize(version, payload, account_sid: nil, sid: nil) ⇒ IpAccessControlListInstance
Initialize the IpAccessControlListInstance
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 274 def initialize(version, payload, account_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'friendly_name' => payload['friendly_name'], 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']), 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), 'subresource_uris' => payload['subresource_uris'], 'uri' => payload['uri'], } # Context @instance_context = nil @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique sid that identifies this account.
312 313 314 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 312 def account_sid @properties['account_sid'] end |
#context ⇒ IpAccessControlListContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
297 298 299 300 301 302 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 297 def context unless @instance_context @instance_context = IpAccessControlListContext.new(@version, @params['account_sid'], @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The date this resource was created.
324 325 326 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 324 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date this resource was last updated.
330 331 332 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 330 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the IpAccessControlListInstance
365 366 367 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 365 def delete context.delete end |
#fetch ⇒ IpAccessControlListInstance
Fetch a IpAccessControlListInstance
349 350 351 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 349 def fetch context.fetch end |
#friendly_name ⇒ String
Returns A human readable description of this resource.
318 319 320 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 318 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
385 386 387 388 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 385 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.IpAccessControlListInstance #{values}>" end |
#ip_addresses ⇒ ip_addresses
Access the ip_addresses
372 373 374 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 372 def ip_addresses context.ip_addresses end |
#sid ⇒ String
Returns A string that uniquely identifies this resource.
306 307 308 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 306 def sid @properties['sid'] end |
#subresource_uris ⇒ String
Returns The subresource_uris.
336 337 338 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 336 def subresource_uris @properties['subresource_uris'] end |
#to_s ⇒ Object
Provide a user friendly representation
378 379 380 381 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 378 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.IpAccessControlListInstance #{values}>" end |
#update(friendly_name: nil) ⇒ IpAccessControlListInstance
Update the IpAccessControlListInstance
358 359 360 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 358 def update(friendly_name: nil) context.update(friendly_name: friendly_name, ) end |
#uri ⇒ String
Returns The URI for this resource.
342 343 344 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 342 def uri @properties['uri'] end |