Class: Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleContext::BundleCopyPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleContext::BundleCopyPageMetadata
- Defined in:
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#bundle_copy_page ⇒ Object
readonly
Returns the value of attribute bundle_copy_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ BundleCopyPageMetadata
constructor
A new instance of BundleCopyPageMetadata.
- #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) ⇒ BundleCopyPageMetadata
Returns a new instance of BundleCopyPageMetadata.
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb', line 254 def initialize(version, response, solution, limit) super(version, response) @bundle_copy_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @bundle_copy_page << BundleCopyListResponse.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_copy_page ⇒ Object (readonly)
Returns the value of attribute bundle_copy_page.
252 253 254 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb', line 252 def bundle_copy_page @bundle_copy_page end |
Instance Method Details
#each ⇒ Object
270 271 272 273 274 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb', line 270 def each @bundle_copy_page.each do |record| yield record end end |
#to_s ⇒ Object
276 277 278 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb', line 276 def to_s '<Twilio::REST::Numbers::V2PageMetadata>'; end |