Class: Twilio::REST::Events::V1::SchemaPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Events::V1::SchemaPageMetadata
- Defined in:
- lib/twilio-ruby/rest/events/v1/schema.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#schema_page ⇒ Object
readonly
Returns the value of attribute schema_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ SchemaPageMetadata
constructor
A new instance of SchemaPageMetadata.
- #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) ⇒ SchemaPageMetadata
Returns a new instance of SchemaPageMetadata.
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/twilio-ruby/rest/events/v1/schema.rb', line 220 def initialize(version, response, solution, limit) super(version, response) @schema_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @schema_page << SchemaListResponse.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
#schema_page ⇒ Object (readonly)
Returns the value of attribute schema_page.
218 219 220 |
# File 'lib/twilio-ruby/rest/events/v1/schema.rb', line 218 def schema_page @schema_page end |
Instance Method Details
#each ⇒ Object
236 237 238 239 240 |
# File 'lib/twilio-ruby/rest/events/v1/schema.rb', line 236 def each @schema_page.each do |record| yield record end end |
#to_s ⇒ Object
242 243 244 |
# File 'lib/twilio-ruby/rest/events/v1/schema.rb', line 242 def to_s '<Twilio::REST::Events::V1PageMetadata>'; end |