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 id of the [Account](www.twilio.com/docs/iam/api/account) that owns this resource.
-
#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 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 CredentialListInstance.
-
#fetch ⇒ CredentialListInstance
Fetch the CredentialListInstance.
-
#friendly_name ⇒ String
A human readable descriptive text that describes the CredentialList, up to 64 characters long.
-
#initialize(version, payload, account_sid: nil, sid: nil) ⇒ CredentialListInstance
constructor
Initialize the CredentialListInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#sid ⇒ String
A 34 character string that uniquely identifies this resource.
-
#subresource_uris ⇒ Hash
A 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, relative to ‘api.twilio.com`.
Constructor Details
#initialize(version, payload, account_sid: nil, sid: nil) ⇒ CredentialListInstance
Initialize the CredentialListInstance
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 308 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 id of the [Account](www.twilio.com/docs/iam/api/account) that owns this resource.
340 341 342 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 340 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
331 332 333 334 335 336 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 331 def context unless @instance_context @instance_context = CredentialListContext.new(@version , @params['account_sid'], @params['sid']) end @instance_context end |
#credentials ⇒ credentials
Access the credentials
412 413 414 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 412 def credentials context.credentials 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.
346 347 348 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 346 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.
352 353 354 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 352 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the CredentialListInstance
383 384 385 386 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 383 def delete context.delete end |
#fetch ⇒ CredentialListInstance
Fetch the CredentialListInstance
391 392 393 394 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 391 def fetch context.fetch end |
#friendly_name ⇒ String
Returns A human readable descriptive text that describes the CredentialList, up to 64 characters long.
358 359 360 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 358 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
425 426 427 428 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 425 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.CredentialListInstance #{values}>" end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this resource.
364 365 366 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 364 def sid @properties['sid'] end |
#subresource_uris ⇒ Hash
Returns A list of credentials associated with this credential list.
370 371 372 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 370 def subresource_uris @properties['subresource_uris'] end |
#to_s ⇒ Object
Provide a user friendly representation
418 419 420 421 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 418 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
400 401 402 403 404 405 406 407 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 400 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`.
376 377 378 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 376 def uri @properties['uri'] end |