Class: Twilio::REST::Serverless::V1::ServiceContext::FunctionPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Serverless::V1::ServiceContext::FunctionPageMetadata
- Defined in:
- lib/twilio-ruby/rest/serverless/v1/service/function.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#function_page ⇒ Object
readonly
Returns the value of attribute function_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ FunctionPageMetadata
constructor
A new instance of FunctionPageMetadata.
- #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) ⇒ FunctionPageMetadata
Returns a new instance of FunctionPageMetadata.
484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function.rb', line 484 def initialize(version, response, solution, limit) super(version, response) @function_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @function_page << FunctionListResponse.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
#function_page ⇒ Object (readonly)
Returns the value of attribute function_page.
482 483 484 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function.rb', line 482 def function_page @function_page end |
Instance Method Details
#each ⇒ Object
500 501 502 503 504 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function.rb', line 500 def each @function_page.each do |record| yield record end end |
#to_s ⇒ Object
506 507 508 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function.rb', line 506 def to_s '<Twilio::REST::Serverless::V1PageMetadata>'; end |