Class: Twilio::REST::Serverless::V1::ServiceContext::EnvironmentPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Serverless::V1::ServiceContext::EnvironmentPageMetadata
- Defined in:
- lib/twilio-ruby/rest/serverless/v1/service/environment.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#environment_page ⇒ Object
readonly
Returns the value of attribute environment_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ EnvironmentPageMetadata
constructor
A new instance of EnvironmentPageMetadata.
- #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) ⇒ EnvironmentPageMetadata
Returns a new instance of EnvironmentPageMetadata.
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/environment.rb', line 470 def initialize(version, response, solution, limit) super(version, response) @environment_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @environment_page << EnvironmentListResponse.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
#environment_page ⇒ Object (readonly)
Returns the value of attribute environment_page.
468 469 470 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/environment.rb', line 468 def environment_page @environment_page end |
Instance Method Details
#each ⇒ Object
486 487 488 489 490 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/environment.rb', line 486 def each @environment_page.each do |record| yield record end end |
#to_s ⇒ Object
492 493 494 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/environment.rb', line 492 def to_s '<Twilio::REST::Serverless::V1PageMetadata>'; end |