Class: Twilio::REST::Api::V2010::AccountContext::AddressPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::AddressPageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/address.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#address_page ⇒ Object
readonly
Returns the value of attribute address_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ AddressPageMetadata
constructor
A new instance of AddressPageMetadata.
- #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) ⇒ AddressPageMetadata
Returns a new instance of AddressPageMetadata.
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 |
# File 'lib/twilio-ruby/rest/api/v2010/account/address.rb', line 610 def initialize(version, response, solution, limit) super(version, response) @address_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @address_page << AddressListResponse.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
#address_page ⇒ Object (readonly)
Returns the value of attribute address_page.
608 609 610 |
# File 'lib/twilio-ruby/rest/api/v2010/account/address.rb', line 608 def address_page @address_page end |
Instance Method Details
#each ⇒ Object
626 627 628 629 630 |
# File 'lib/twilio-ruby/rest/api/v2010/account/address.rb', line 626 def each @address_page.each do |record| yield record end end |
#to_s ⇒ Object
632 633 634 |
# File 'lib/twilio-ruby/rest/api/v2010/account/address.rb', line 632 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |