class Twilio::REST::Trunking::V1::TrunkContext::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] trunk_sid
The SID of the Trunk the credential list in associated
with.
@param [String] sid The unique string that we created to identify the
CredentialList resource to fetch.
@return [CredentialListInstance] CredentialListInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb 223 def initialize(version, payload, trunk_sid: nil, sid: nil) 224 super(version) 225 226 # Marshaled Properties 227 @properties = { 228 'account_sid' => payload['account_sid'], 229 'sid' => payload['sid'], 230 'trunk_sid' => payload['trunk_sid'], 231 'friendly_name' => payload['friendly_name'], 232 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 233 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 234 'url' => payload['url'], 235 } 236 237 # Context 238 @instance_context = nil 239 @params = {'trunk_sid' => trunk_sid, 'sid' => sid || @properties['sid'], } 240 end
Public Instance Methods
@return [String] The SID of the Account that created the resource
# File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb 255 def account_sid 256 @properties['account_sid'] 257 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/trunking/v1/trunk/credential_list.rb 246 def context 247 unless @instance_context 248 @instance_context = CredentialListContext.new(@version, @params['trunk_sid'], @params['sid'], ) 249 end 250 @instance_context 251 end
@return [Time] The RFC 2822 date and time in GMT when the resource was created
# File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb 279 def date_created 280 @properties['date_created'] 281 end
@return [Time] The RFC 2822 date and time in GMT when the resource was last updated
# File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb 285 def date_updated 286 @properties['date_updated'] 287 end
Delete the CredentialListInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb 305 def delete 306 context.delete 307 end
Fetch the CredentialListInstance
@return [CredentialListInstance] Fetched CredentialListInstance
# File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb 298 def fetch 299 context.fetch 300 end
@return [String] The string that you assigned to describe the resource
# File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb 273 def friendly_name 274 @properties['friendly_name'] 275 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb 318 def inspect 319 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 320 "<Twilio.Trunking.V1.CredentialListInstance #{values}>" 321 end
@return [String] The unique string that identifies the resource
# File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb 261 def sid 262 @properties['sid'] 263 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb 311 def to_s 312 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 313 "<Twilio.Trunking.V1.CredentialListInstance #{values}>" 314 end
@return [String] The SID of the Trunk the credential list in associated with
# File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb 267 def trunk_sid 268 @properties['trunk_sid'] 269 end
@return [String] The absolute URL of the resource
# File lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb 291 def url 292 @properties['url'] 293 end