Class: Twilio::REST::Supersim::V1::NetworkAccessProfileContext::NetworkAccessProfileNetworkPageMetadata

Inherits:
PageMetadata
  • Object
show all
Defined in:
lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.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) ⇒ NetworkAccessProfileNetworkPageMetadata

Returns a new instance of NetworkAccessProfileNetworkPageMetadata.



404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb', line 404

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

#network_access_profile_network_pageObject (readonly)

Returns the value of attribute network_access_profile_network_page.



402
403
404
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb', line 402

def network_access_profile_network_page
  @network_access_profile_network_page
end

Instance Method Details

#eachObject



420
421
422
423
424
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb', line 420

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

#to_sObject



426
427
428
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb', line 426

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