Class: Twilio::REST::Api::V2010::AccountContext::ShortCodeListResponse

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ShortCodeListResponse.

Parameters:

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


374
375
376
377
378
379
380
# File 'lib/twilio-ruby/rest/api/v2010/account/short_code.rb', line 374

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

Instance Method Details

#headersObject



467
468
469
# File 'lib/twilio-ruby/rest/api/v2010/account/short_code.rb', line 467

def headers
  @headers
end

#short_codeObject



463
464
465
# File 'lib/twilio-ruby/rest/api/v2010/account/short_code.rb', line 463

def short_code
    @short_code
end

#short_code_instanceObject



382
383
384
# File 'lib/twilio-ruby/rest/api/v2010/account/short_code.rb', line 382

def short_code_instance
    @instance
end

#status_codeObject



471
472
473
# File 'lib/twilio-ruby/rest/api/v2010/account/short_code.rb', line 471

def status_code
  @status_code
end