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)


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

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



461
462
463
# File 'lib/twilio-ruby/rest/api/v2010/account/key.rb', line 461

def headers
  @headers
end

#keyObject



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

def key
    @key
end

#key_instanceObject



376
377
378
# File 'lib/twilio-ruby/rest/api/v2010/account/key.rb', line 376

def key_instance
    @instance
end

#status_codeObject



465
466
467
# File 'lib/twilio-ruby/rest/api/v2010/account/key.rb', line 465

def status_code
  @status_code
end