Class: Twilio::REST::Api::V2010::AccountContext::KeyListResponse

Inherits:
InstanceListResource show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account/key.rb,
lib/twilio-ruby/rest/api/v2010/account/key.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, key, limit = :unset) ⇒ KeyListResponse

Returns a new instance of KeyListResponse.

Parameters:

  • instance (Array<KeyInstance>)
  • headers (Hash{String => Object})
  • status_code (Integer)


360
361
362
363
364
365
366
# File 'lib/twilio-ruby/rest/api/v2010/account/key.rb', line 360

def initialize(version, payload, key)
   @key_instance = payload.body[key].map do |data|
    KeyInstance.new(version, data)
   end
   @headers = payload.headers
   @status_code = payload.status_code
end

Instance Method Details

#headersObject



453
454
455
# File 'lib/twilio-ruby/rest/api/v2010/account/key.rb', line 453

def headers
  @headers
end

#keyObject



449
450
451
# File 'lib/twilio-ruby/rest/api/v2010/account/key.rb', line 449

def key
    @key
end

#key_instanceObject



368
369
370
# File 'lib/twilio-ruby/rest/api/v2010/account/key.rb', line 368

def key_instance
    @instance
end

#status_codeObject



457
458
459
# File 'lib/twilio-ruby/rest/api/v2010/account/key.rb', line 457

def status_code
  @status_code
end