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