Class: Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberList::TollFreePageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberList::TollFreePageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#toll_free_page ⇒ Object
readonly
Returns the value of attribute toll_free_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ TollFreePageMetadata
constructor
A new instance of TollFreePageMetadata.
- #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) ⇒ TollFreePageMetadata
Returns a new instance of TollFreePageMetadata.
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb', line 410 def initialize(version, response, solution, limit) super(version, response) @toll_free_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @toll_free_page << TollFreeListResponse.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
#toll_free_page ⇒ Object (readonly)
Returns the value of attribute toll_free_page.
408 409 410 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb', line 408 def toll_free_page @toll_free_page end |
Instance Method Details
#each ⇒ Object
426 427 428 429 430 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb', line 426 def each @toll_free_page.each do |record| yield record end end |
#to_s ⇒ Object
432 433 434 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb', line 432 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |