Class: Twilio::REST::Content::V1::LegacyContentPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Content::V1::LegacyContentPageMetadata
- Defined in:
- lib/twilio-ruby/rest/content/v1/legacy_content.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#legacy_content_page ⇒ Object
readonly
Returns the value of attribute legacy_content_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ LegacyContentPageMetadata
constructor
A new instance of LegacyContentPageMetadata.
- #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) ⇒ LegacyContentPageMetadata
Returns a new instance of LegacyContentPageMetadata.
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 185 def initialize(version, response, solution, limit) super(version, response) @legacy_content_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @legacy_content_page << LegacyContentListResponse.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
#legacy_content_page ⇒ Object (readonly)
Returns the value of attribute legacy_content_page.
183 184 185 |
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 183 def legacy_content_page @legacy_content_page end |
Instance Method Details
#each ⇒ Object
201 202 203 204 205 |
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 201 def each @legacy_content_page.each do |record| yield record end end |
#to_s ⇒ Object
207 208 209 |
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 207 def to_s '<Twilio::REST::Content::V1PageMetadata>'; end |