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.
818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb', line 818 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.
816 817 818 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb', line 816 def incoming_phone_number_page @incoming_phone_number_page end |
Instance Method Details
#each ⇒ Object
834 835 836 837 838 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb', line 834 def each @incoming_phone_number_page.each do |record| yield record end end |
#to_s ⇒ Object
840 841 842 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb', line 840 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |