Class: Twilio::REST::Lookups::V1::PhoneNumberPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Lookups::V1::PhoneNumberPageMetadata
- Defined in:
- lib/twilio-ruby/rest/lookups/v1/phone_number.rb
Constant Summary
Constants inherited from PageMetadata
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 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.
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/twilio-ruby/rest/lookups/v1/phone_number.rb', line 230 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.
228 229 230 |
# File 'lib/twilio-ruby/rest/lookups/v1/phone_number.rb', line 228 def phone_number_page @phone_number_page end |
Instance Method Details
#each ⇒ Object
246 247 248 249 250 |
# File 'lib/twilio-ruby/rest/lookups/v1/phone_number.rb', line 246 def each @phone_number_page.each do |record| yield record end end |
#to_s ⇒ Object
252 253 254 |
# File 'lib/twilio-ruby/rest/lookups/v1/phone_number.rb', line 252 def to_s '<Twilio::REST::Lookups::V1PageMetadata>'; end |