Class: Twilio::REST::Supersim::V1::IpCommandPageMetadata

Inherits:
PageMetadata
  • Object
show all
Defined in:
lib/twilio-ruby/rest/supersim/v1/ip_command.rb

Constant Summary

Constants inherited from PageMetadata

PageMetadata::META_KEYS

Instance Attribute Summary collapse

Instance Method Summary collapse

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) ⇒ IpCommandPageMetadata

Returns a new instance of IpCommandPageMetadata.



427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 427

def initialize(version, response, solution, limit)
    super(version, response)
    @ip_command_page = []
    @limit = limit
    key = get_key(response.body)
    records = 0
    while( limit != :unset && records < limit )
        @ip_command_page << IpCommandListResponse.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

#ip_command_pageObject (readonly)

Returns the value of attribute ip_command_page.



425
426
427
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 425

def ip_command_page
  @ip_command_page
end

Instance Method Details

#eachObject



443
444
445
446
447
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 443

def each
    @ip_command_page.each do |record|
      yield record
    end
end

#to_sObject



449
450
451
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 449

def to_s
  '<Twilio::REST::Supersim::V1PageMetadata>';
end