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 id of the [Account](www.twilio.com/docs/iam/api/account) that owns this resource.
-
#context ⇒ IpAccessControlListContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date that this resource was created, given as GMT in [RFC 2822](www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format.
-
#date_updated ⇒ Time
The date that this resource was last updated, given as GMT in [RFC 2822](www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format.
-
#delete ⇒ Boolean
Delete the IpAccessControlListInstance.
-
#fetch ⇒ IpAccessControlListInstance
Fetch the IpAccessControlListInstance.
-
#friendly_name ⇒ String
A human readable descriptive text, up to 255 characters long.
-
#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 34 character string that uniquely identifies this resource.
-
#subresource_uris ⇒ Hash
A list of the IpAddress resources associated with this IP access control list resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(friendly_name: nil) ⇒ IpAccessControlListInstance
Update the IpAccessControlListInstance.
-
#uri ⇒ String
The URI for this resource, relative to ‘api.twilio.com`.
Constructor Details
#initialize(version, payload, account_sid: nil, sid: nil) ⇒ IpAccessControlListInstance
Initialize the IpAccessControlListInstance
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 287 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 id of the [Account](www.twilio.com/docs/iam/api/account) that owns this resource.
325 326 327 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 325 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
310 311 312 313 314 315 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 310 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 that this resource was created, given as GMT in [RFC 2822](www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format.
337 338 339 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 337 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date that this resource was last updated, given as GMT in [RFC 2822](www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format.
343 344 345 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 343 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the IpAccessControlListInstance
362 363 364 365 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 362 def delete context.delete end |
#fetch ⇒ IpAccessControlListInstance
Fetch the IpAccessControlListInstance
370 371 372 373 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 370 def fetch context.fetch end |
#friendly_name ⇒ String
Returns A human readable descriptive text, up to 255 characters long.
331 332 333 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 331 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
404 405 406 407 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 404 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.IpAccessControlListInstance #{values}>" end |
#ip_addresses ⇒ ip_addresses
Access the ip_addresses
391 392 393 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 391 def ip_addresses context.ip_addresses end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this resource.
319 320 321 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 319 def sid @properties['sid'] end |
#subresource_uris ⇒ Hash
Returns A list of the IpAddress resources associated with this IP access control list resource.
349 350 351 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 349 def subresource_uris @properties['subresource_uris'] end |
#to_s ⇒ Object
Provide a user friendly representation
397 398 399 400 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 397 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
379 380 381 382 383 384 385 386 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 379 def update( friendly_name: nil ) context.update( friendly_name: friendly_name, ) end |
#uri ⇒ String
Returns The URI for this resource, relative to ‘api.twilio.com`.
355 356 357 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb', line 355 def uri @properties['uri'] end |