Class: Twilio::REST::Proxy::V1::ServiceContext::PhoneNumberPageMetadata
- Inherits:
-
Twilio::REST::PageMetadata
- Object
- Twilio::REST::PageMetadata
- Twilio::REST::Proxy::V1::ServiceContext::PhoneNumberPageMetadata
- Defined in:
- lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb
Constant Summary
Constants inherited from Twilio::REST::PageMetadata
Twilio::REST::PageMetadata::META_KEYS
Instance Attribute Summary collapse
-
#phone_number_page ⇒ Object
readonly
Returns the value of attribute phone_number_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ PhoneNumberPageMetadata
constructor
A new instance of PhoneNumberPageMetadata.
- #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) ⇒ PhoneNumberPageMetadata
Returns a new instance of PhoneNumberPageMetadata.
476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb', line 476 def initialize(version, response, solution, limit) super(version, response) @phone_number_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @phone_number_page << PhoneNumberListResponse.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
#phone_number_page ⇒ Object (readonly)
Returns the value of attribute phone_number_page.
474 475 476 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb', line 474 def phone_number_page @phone_number_page end |
Instance Method Details
#each ⇒ Object
492 493 494 495 496 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb', line 492 def each @phone_number_page.each do |record| yield record end end |
#to_s ⇒ Object
498 499 500 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb', line 498 def to_s '<Twilio::REST::Proxy::V1PageMetadata>'; end |