Class: Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryPageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#available_phone_number_country_page ⇒ Object
readonly
Returns the value of attribute available_phone_number_country_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ AvailablePhoneNumberCountryPageMetadata
constructor
A new instance of AvailablePhoneNumberCountryPageMetadata.
- #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) ⇒ AvailablePhoneNumberCountryPageMetadata
Returns a new instance of AvailablePhoneNumberCountryPageMetadata.
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb', line 398 def initialize(version, response, solution, limit) super(version, response) @available_phone_number_country_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @available_phone_number_country_page << AvailablePhoneNumberCountryListResponse.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
#available_phone_number_country_page ⇒ Object (readonly)
Returns the value of attribute available_phone_number_country_page.
396 397 398 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb', line 396 def available_phone_number_country_page @available_phone_number_country_page end |
Instance Method Details
#each ⇒ Object
414 415 416 417 418 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb', line 414 def each @available_phone_number_country_page.each do |record| yield record end end |
#to_s ⇒ Object
420 421 422 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb', line 420 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |