Class: Twilio::REST::Api::V2010::AccountContext::AddressContext::DependentPhoneNumberListResponse

Inherits:
InstanceListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of DependentPhoneNumberListResponse.

Parameters:



227
228
229
230
231
232
233
234
235
236
237
# File 'lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb', line 227

def initialize(version, payload, key, limit = :unset)
  data_list = payload.body[key]  || []
  if limit != :unset
    data_list = data_list[0, limit]
  end
  @dependent_phone_number = data_list.map do |data|
    DependentPhoneNumberInstance.new(version, data)
  end
  @headers = payload.headers
  @status_code = payload.status_code
end

Instance Method Details

#dependent_phone_numberObject



239
240
241
# File 'lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb', line 239

def dependent_phone_number
    @dependent_phone_number
end

#headersObject



243
244
245
# File 'lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb', line 243

def headers
  @headers
end

#status_codeObject



247
248
249
# File 'lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb', line 247

def status_code
  @status_code
end