Class: Twilio::REST::Api::V2010::AccountContext::SipList::IpAccessControlListContext::IpAddressInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::SipList::IpAccessControlListContext::IpAddressInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The account_sid.
-
#context ⇒ IpAddressContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date_created.
-
#date_updated ⇒ Time
The date_updated.
-
#delete ⇒ Boolean
Deletes the IpAddressInstance.
-
#fetch ⇒ IpAddressInstance
Fetch a IpAddressInstance.
-
#friendly_name ⇒ String
The friendly_name.
-
#initialize(version, payload, account_sid: nil, ip_access_control_list_sid: nil, sid: nil) ⇒ IpAddressInstance
constructor
Initialize the IpAddressInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#ip_access_control_list_sid ⇒ String
The ip_access_control_list_sid.
-
#ip_address ⇒ String
The ip_address.
-
#sid ⇒ String
The sid.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(ip_address: :unset, friendly_name: :unset) ⇒ IpAddressInstance
Update the IpAddressInstance.
-
#uri ⇒ String
The uri.
Constructor Details
#initialize(version, payload, account_sid: nil, ip_access_control_list_sid: nil, sid: nil) ⇒ IpAddressInstance
Initialize the IpAddressInstance
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 263 def initialize(version, payload, account_sid: nil, ip_access_control_list_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'friendly_name' => payload['friendly_name'], 'ip_address' => payload['ip_address'], 'ip_access_control_list_sid' => payload['ip_access_control_list_sid'], 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']), 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), 'uri' => payload['uri'], } # Context @instance_context = nil @params = { 'account_sid' => account_sid, 'ip_access_control_list_sid' => ip_access_control_list_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The account_sid.
311 312 313 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 311 def account_sid @properties['account_sid'] end |
#context ⇒ IpAddressContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 291 def context unless @instance_context @instance_context = IpAddressContext.new( @version, @params['account_sid'], @params['ip_access_control_list_sid'], @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The date_created.
335 336 337 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 335 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date_updated.
341 342 343 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 341 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the IpAddressInstance
370 371 372 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 370 def delete context.delete end |
#fetch ⇒ IpAddressInstance
Fetch a IpAddressInstance
354 355 356 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 354 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The friendly_name.
317 318 319 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 317 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
383 384 385 386 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 383 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.IpAddressInstance #{values}>" end |
#ip_access_control_list_sid ⇒ String
Returns The ip_access_control_list_sid.
329 330 331 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 329 def ip_access_control_list_sid @properties['ip_access_control_list_sid'] end |
#ip_address ⇒ String
Returns The ip_address.
323 324 325 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 323 def ip_address @properties['ip_address'] end |
#sid ⇒ String
Returns The sid.
305 306 307 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 305 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
376 377 378 379 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 376 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.IpAddressInstance #{values}>" end |
#update(ip_address: :unset, friendly_name: :unset) ⇒ IpAddressInstance
Update the IpAddressInstance
363 364 365 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 363 def update(ip_address: :unset, friendly_name: :unset) context.update(ip_address: ip_address, friendly_name: friendly_name, ) end |
#uri ⇒ String
Returns The uri.
347 348 349 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 347 def uri @properties['uri'] end |