Class: Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundlePageMetadata

Inherits:
PageMetadata
  • Object
show all
Defined in:
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb

Constant Summary

Constants inherited from PageMetadata

PageMetadata::META_KEYS

Instance Attribute Summary collapse

Instance Method Summary collapse

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) ⇒ BundlePageMetadata

Returns a new instance of BundlePageMetadata.



669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 669

def initialize(version, response, solution, limit)
    super(version, response)
    @bundle_page = []
    @limit = limit
    key = get_key(response.body)
    records = 0
    while( limit != :unset && records < limit )
        @bundle_page << BundleListResponse.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

#bundle_pageObject (readonly)

Returns the value of attribute bundle_page.



667
668
669
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 667

def bundle_page
  @bundle_page
end

Instance Method Details

#eachObject



685
686
687
688
689
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 685

def each
    @bundle_page.each do |record|
      yield record
    end
end

#to_sObject



691
692
693
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 691

def to_s
  '<Twilio::REST::Numbers::V2PageMetadata>';
end