Class: Twilio::REST::Events::V1::SchemaContext::SchemaVersionPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Events::V1::SchemaContext::SchemaVersionPageMetadata
- Defined in:
- lib/twilio-ruby/rest/events/v1/schema/schema_version.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#schema_version_page ⇒ Object
readonly
Returns the value of attribute schema_version_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ SchemaVersionPageMetadata
constructor
A new instance of SchemaVersionPageMetadata.
- #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) ⇒ SchemaVersionPageMetadata
Returns a new instance of SchemaVersionPageMetadata.
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
# File 'lib/twilio-ruby/rest/events/v1/schema/schema_version.rb', line 314 def initialize(version, response, solution, limit) super(version, response) @schema_version_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @schema_version_page << SchemaVersionListResponse.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_version_page ⇒ Object (readonly)
Returns the value of attribute schema_version_page.
312 313 314 |
# File 'lib/twilio-ruby/rest/events/v1/schema/schema_version.rb', line 312 def schema_version_page @schema_version_page end |
Instance Method Details
#each ⇒ Object
330 331 332 333 334 |
# File 'lib/twilio-ruby/rest/events/v1/schema/schema_version.rb', line 330 def each @schema_version_page.each do |record| yield record end end |
#to_s ⇒ Object
336 337 338 |
# File 'lib/twilio-ruby/rest/events/v1/schema/schema_version.rb', line 336 def to_s '<Twilio::REST::Events::V1PageMetadata>'; end |