Class: Twilio::REST::Content::V2::ContentAndApprovalsPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Content::V2::ContentAndApprovalsPageMetadata
- Defined in:
- lib/twilio-ruby/rest/content/v2/content_and_approvals.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#content_and_approvals_page ⇒ Object
readonly
Returns the value of attribute content_and_approvals_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ ContentAndApprovalsPageMetadata
constructor
A new instance of ContentAndApprovalsPageMetadata.
- #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) ⇒ ContentAndApprovalsPageMetadata
Returns a new instance of ContentAndApprovalsPageMetadata.
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/twilio-ruby/rest/content/v2/content_and_approvals.rb', line 271 def initialize(version, response, solution, limit) super(version, response) @content_and_approvals_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @content_and_approvals_page << ContentAndApprovalsListResponse.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
#content_and_approvals_page ⇒ Object (readonly)
Returns the value of attribute content_and_approvals_page.
269 270 271 |
# File 'lib/twilio-ruby/rest/content/v2/content_and_approvals.rb', line 269 def content_and_approvals_page @content_and_approvals_page end |
Instance Method Details
#each ⇒ Object
287 288 289 290 291 |
# File 'lib/twilio-ruby/rest/content/v2/content_and_approvals.rb', line 287 def each @content_and_approvals_page.each do |record| yield record end end |
#to_s ⇒ Object
293 294 295 |
# File 'lib/twilio-ruby/rest/content/v2/content_and_approvals.rb', line 293 def to_s '<Twilio::REST::Content::V2PageMetadata>'; end |