Class: Twilio::REST::Api::V2010::AccountContext::SipList::CredentialListInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::SipList::CredentialListInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique sid that identifies this account.
-
#context ⇒ CredentialListContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#credentials ⇒ credentials
Access the credentials.
-
#date_created ⇒ Time
The date this resource was created.
-
#date_updated ⇒ Time
The date this resource was last updated.
-
#delete ⇒ Boolean
Delete the CredentialListInstance.
-
#fetch ⇒ CredentialListInstance
Fetch the CredentialListInstance.
-
#friendly_name ⇒ String
Human readable descriptive text.
-
#initialize(version, payload, account_sid: nil, sid: nil) ⇒ CredentialListInstance
constructor
Initialize the CredentialListInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#sid ⇒ String
A string that uniquely identifies this credential.
-
#subresource_uris ⇒ String
The list of credentials associated with this credential list.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(friendly_name: nil) ⇒ CredentialListInstance
Update the CredentialListInstance.
-
#uri ⇒ String
The URI for this resource.
Constructor Details
#initialize(version, payload, account_sid: nil, sid: nil) ⇒ CredentialListInstance
Initialize the CredentialListInstance
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 265 def initialize(version, payload, account_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']), 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), 'friendly_name' => payload['friendly_name'], 'sid' => payload['sid'], '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.
297 298 299 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 297 def account_sid @properties['account_sid'] end |
#context ⇒ CredentialListContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
288 289 290 291 292 293 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 288 def context unless @instance_context @instance_context = CredentialListContext.new(@version, @params['account_sid'], @params['sid'], ) end @instance_context end |
#credentials ⇒ credentials
Access the credentials
363 364 365 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 363 def credentials context.credentials end |
#date_created ⇒ Time
Returns The date this resource was created.
303 304 305 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 303 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date this resource was last updated.
309 310 311 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 309 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the CredentialListInstance
356 357 358 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 356 def delete context.delete end |
#fetch ⇒ CredentialListInstance
Fetch the CredentialListInstance
340 341 342 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 340 def fetch context.fetch end |
#friendly_name ⇒ String
Returns Human readable descriptive text.
315 316 317 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 315 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
376 377 378 379 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 376 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.CredentialListInstance #{values}>" end |
#sid ⇒ String
Returns A string that uniquely identifies this credential.
321 322 323 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 321 def sid @properties['sid'] end |
#subresource_uris ⇒ String
Returns The list of credentials associated with this credential list.
327 328 329 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 327 def subresource_uris @properties['subresource_uris'] end |
#to_s ⇒ Object
Provide a user friendly representation
369 370 371 372 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 369 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.CredentialListInstance #{values}>" end |
#update(friendly_name: nil) ⇒ CredentialListInstance
Update the CredentialListInstance
349 350 351 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 349 def update(friendly_name: nil) context.update(friendly_name: friendly_name, ) end |
#uri ⇒ String
Returns The URI for this resource.
333 334 335 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 333 def uri @properties['uri'] end |