Class: Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::LocalPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::LocalPageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/local.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#local_page ⇒ Object
readonly
Returns the value of attribute local_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ LocalPageMetadata
constructor
A new instance of LocalPageMetadata.
- #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) ⇒ LocalPageMetadata
Returns a new instance of LocalPageMetadata.
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/local.rb', line 332 def initialize(version, response, solution, limit) super(version, response) @local_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @local_page << LocalListResponse.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
#local_page ⇒ Object (readonly)
Returns the value of attribute local_page.
330 331 332 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/local.rb', line 330 def local_page @local_page end |
Instance Method Details
#each ⇒ Object
348 349 350 351 352 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/local.rb', line 348 def each @local_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/local.rb', line 354 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |