Class: Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberPageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#incoming_phone_number_page ⇒ Object
readonly
Returns the value of attribute incoming_phone_number_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ IncomingPhoneNumberPageMetadata
constructor
A new instance of IncomingPhoneNumberPageMetadata.
- #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) ⇒ IncomingPhoneNumberPageMetadata
Returns a new instance of IncomingPhoneNumberPageMetadata.
810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb', line 810 def initialize(version, response, solution, limit) super(version, response) @incoming_phone_number_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @incoming_phone_number_page << IncomingPhoneNumberListResponse.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
#incoming_phone_number_page ⇒ Object (readonly)
Returns the value of attribute incoming_phone_number_page.
808 809 810 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb', line 808 def incoming_phone_number_page @incoming_phone_number_page end |
Instance Method Details
#each ⇒ Object
826 827 828 829 830 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb', line 826 def each @incoming_phone_number_page.each do |record| yield record end end |
#to_s ⇒ Object
832 833 834 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb', line 832 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |