Class: Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::VoipPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::VoipPageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/voip.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#voip_page ⇒ Object
readonly
Returns the value of attribute voip_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ VoipPageMetadata
constructor
A new instance of VoipPageMetadata.
- #to_s ⇒ Object
Methods inherited from PageMetadata
#get_key, #next_page, #next_page_url, #previous_page, #previous_page_url, #process_response
Constructor Details
#initialize(version, response, solution, limit) ⇒ VoipPageMetadata
Returns a new instance of VoipPageMetadata.
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/voip.rb', line 332 def initialize(version, response, solution, limit) super(version, response) @voip_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @voip_page << VoipListResponse.new(version, @payload, key, limit - records) @payload = self.next_page break unless @payload records += @payload.body[key].size end # Path Solution @solution = solution end |
Instance Attribute Details
#voip_page ⇒ Object (readonly)
Returns the value of attribute voip_page.
330 331 332 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/voip.rb', line 330 def voip_page @voip_page end |
Instance Method Details
#each ⇒ Object
348 349 350 351 352 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/voip.rb', line 348 def each @voip_page.each do |record| yield record end end |
#to_s ⇒ Object
354 355 356 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/voip.rb', line 354 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |