Class: Twilio::REST::Content::V1::ContentPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Content::V1::ContentPageMetadata
- Defined in:
- lib/twilio-ruby/rest/content/v1/content.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#content_page ⇒ Object
readonly
Returns the value of attribute content_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ ContentPageMetadata
constructor
A new instance of ContentPageMetadata.
- #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) ⇒ ContentPageMetadata
Returns a new instance of ContentPageMetadata.
1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 1702 def initialize(version, response, solution, limit) super(version, response) @content_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @content_page << ContentListResponse.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_page ⇒ Object (readonly)
Returns the value of attribute content_page.
1700 1701 1702 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 1700 def content_page @content_page end |
Instance Method Details
#each ⇒ Object
1718 1719 1720 1721 1722 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 1718 def each @content_page.each do |record| yield record end end |
#to_s ⇒ Object
1724 1725 1726 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 1724 def to_s '<Twilio::REST::Content::V1PageMetadata>'; end |