Class: Twilio::REST::Supersim::V1::SmsCommandPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Supersim::V1::SmsCommandPageMetadata
- Defined in:
- lib/twilio-ruby/rest/supersim/v1/sms_command.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#sms_command_page ⇒ Object
readonly
Returns the value of attribute sms_command_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ SmsCommandPageMetadata
constructor
A new instance of SmsCommandPageMetadata.
- #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) ⇒ SmsCommandPageMetadata
Returns a new instance of SmsCommandPageMetadata.
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'lib/twilio-ruby/rest/supersim/v1/sms_command.rb', line 415 def initialize(version, response, solution, limit) super(version, response) @sms_command_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @sms_command_page << SmsCommandListResponse.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
#sms_command_page ⇒ Object (readonly)
Returns the value of attribute sms_command_page.
413 414 415 |
# File 'lib/twilio-ruby/rest/supersim/v1/sms_command.rb', line 413 def sms_command_page @sms_command_page end |
Instance Method Details
#each ⇒ Object
431 432 433 434 435 |
# File 'lib/twilio-ruby/rest/supersim/v1/sms_command.rb', line 431 def each @sms_command_page.each do |record| yield record end end |
#to_s ⇒ Object
437 438 439 |
# File 'lib/twilio-ruby/rest/supersim/v1/sms_command.rb', line 437 def to_s '<Twilio::REST::Supersim::V1PageMetadata>'; end |