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.
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/twilio-ruby/rest/supersim/v1/sms_command.rb', line 407 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.
405 406 407 |
# File 'lib/twilio-ruby/rest/supersim/v1/sms_command.rb', line 405 def sms_command_page @sms_command_page end |
Instance Method Details
#each ⇒ Object
423 424 425 426 427 |
# File 'lib/twilio-ruby/rest/supersim/v1/sms_command.rb', line 423 def each @sms_command_page.each do |record| yield record end end |
#to_s ⇒ Object
429 430 431 |
# File 'lib/twilio-ruby/rest/supersim/v1/sms_command.rb', line 429 def to_s '<Twilio::REST::Supersim::V1PageMetadata>'; end |