Class: Twilio::REST::Api::V2010::AccountContext::AddressContext::DependentPhoneNumberPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::AddressContext::DependentPhoneNumberPageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#dependent_phone_number_page ⇒ Object
readonly
Returns the value of attribute dependent_phone_number_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ DependentPhoneNumberPageMetadata
constructor
A new instance of DependentPhoneNumberPageMetadata.
- #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) ⇒ DependentPhoneNumberPageMetadata
Returns a new instance of DependentPhoneNumberPageMetadata.
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb', line 196 def initialize(version, response, solution, limit) super(version, response) @dependent_phone_number_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @dependent_phone_number_page << DependentPhoneNumberListResponse.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
#dependent_phone_number_page ⇒ Object (readonly)
Returns the value of attribute dependent_phone_number_page.
194 195 196 |
# File 'lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb', line 194 def dependent_phone_number_page @dependent_phone_number_page end |
Instance Method Details
#each ⇒ Object
212 213 214 215 216 |
# File 'lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb', line 212 def each @dependent_phone_number_page.each do |record| yield record end end |
#to_s ⇒ Object
218 219 220 |
# File 'lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb', line 218 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |