Class: Twilio::REST::Pricing::V1::VoiceList::CountryPageMetadata
- Inherits:
-
Twilio::REST::PageMetadata
- Object
- Twilio::REST::PageMetadata
- Twilio::REST::Pricing::V1::VoiceList::CountryPageMetadata
- Defined in:
- lib/twilio-ruby/rest/pricing/v1/voice/country.rb
Constant Summary
Constants inherited from Twilio::REST::PageMetadata
Twilio::REST::PageMetadata::META_KEYS
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 Twilio::REST::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.
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/twilio-ruby/rest/pricing/v1/voice/country.rb', line 311 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.
309 310 311 |
# File 'lib/twilio-ruby/rest/pricing/v1/voice/country.rb', line 309 def country_page @country_page end |
Instance Method Details
#each ⇒ Object
327 328 329 330 331 |
# File 'lib/twilio-ruby/rest/pricing/v1/voice/country.rb', line 327 def each @country_page.each do |record| yield record end end |
#to_s ⇒ Object
333 334 335 |
# File 'lib/twilio-ruby/rest/pricing/v1/voice/country.rb', line 333 def to_s '<Twilio::REST::Pricing::V1PageMetadata>'; end |