Class: Twilio::REST::Supersim::V1::NetworkAccessProfilePageMetadata

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

Returns a new instance of NetworkAccessProfilePageMetadata.



449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb', line 449

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

Returns the value of attribute network_access_profile_page.



447
448
449
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb', line 447

def network_access_profile_page
  @network_access_profile_page
end

Instance Method Details

#eachObject



465
466
467
468
469
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb', line 465

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

#to_sObject



471
472
473
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb', line 471

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