Class: Twilio::REST::Wireless::V1::CommandPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Wireless::V1::CommandPageMetadata
- Defined in:
- lib/twilio-ruby/rest/wireless/v1/command.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#command_page ⇒ Object
readonly
Returns the value of attribute command_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ CommandPageMetadata
constructor
A new instance of CommandPageMetadata.
- #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) ⇒ CommandPageMetadata
Returns a new instance of CommandPageMetadata.
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 |
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 465 def initialize(version, response, solution, limit) super(version, response) @command_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @command_page << CommandListResponse.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
#command_page ⇒ Object (readonly)
Returns the value of attribute command_page.
463 464 465 |
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 463 def command_page @command_page end |
Instance Method Details
#each ⇒ Object
481 482 483 484 485 |
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 481 def each @command_page.each do |record| yield record end end |
#to_s ⇒ Object
487 488 489 |
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 487 def to_s '<Twilio::REST::Wireless::V1PageMetadata>'; end |