Class: Twilio::REST::Numbers::V2::RegulatoryCompliancePageMetadata

Inherits:
PageMetadata
  • Object
show all
Defined in:
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.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) ⇒ RegulatoryCompliancePageMetadata

Returns a new instance of RegulatoryCompliancePageMetadata.



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb', line 160

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

#regulatory_compliance_pageObject (readonly)

Returns the value of attribute regulatory_compliance_page.



158
159
160
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb', line 158

def regulatory_compliance_page
  @regulatory_compliance_page
end

Instance Method Details

#eachObject



176
177
178
179
180
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb', line 176

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

#to_sObject



182
183
184
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb', line 182

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