Class: Twilio::REST::Trunking::V1::TrunkPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Trunking::V1::TrunkPageMetadata
- Defined in:
- lib/twilio-ruby/rest/trunking/v1/trunk.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#trunk_page ⇒ Object
readonly
Returns the value of attribute trunk_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ TrunkPageMetadata
constructor
A new instance of TrunkPageMetadata.
- #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) ⇒ TrunkPageMetadata
Returns a new instance of TrunkPageMetadata.
630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 630 def initialize(version, response, solution, limit) super(version, response) @trunk_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @trunk_page << TrunkListResponse.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
#trunk_page ⇒ Object (readonly)
Returns the value of attribute trunk_page.
628 629 630 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 628 def trunk_page @trunk_page end |
Instance Method Details
#each ⇒ Object
646 647 648 649 650 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 646 def each @trunk_page.each do |record| yield record end end |
#to_s ⇒ Object
652 653 654 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 652 def to_s '<Twilio::REST::Trunking::V1PageMetadata>'; end |