Class: Twilio::REST::Voice::V1::DialingPermissionsList::CountryPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Voice::V1::DialingPermissionsList::CountryPageMetadata
- Defined in:
- lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#country_page ⇒ Object
readonly
Returns the value of attribute country_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ CountryPageMetadata
constructor
A new instance of CountryPageMetadata.
- #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) ⇒ CountryPageMetadata
Returns a new instance of CountryPageMetadata.
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb', line 379 def initialize(version, response, solution, limit) super(version, response) @country_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @country_page << CountryListResponse.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
#country_page ⇒ Object (readonly)
Returns the value of attribute country_page.
377 378 379 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb', line 377 def country_page @country_page end |
Instance Method Details
#each ⇒ Object
395 396 397 398 399 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb', line 395 def each @country_page.each do |record| yield record end end |
#to_s ⇒ Object
401 402 403 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb', line 401 def to_s '<Twilio::REST::Voice::V1PageMetadata>'; end |