Class: Twilio::REST::Trusthub::V1::EndUserPageMetadata

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

Returns a new instance of EndUserPageMetadata.



473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user.rb', line 473

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

#end_user_pageObject (readonly)

Returns the value of attribute end_user_page.



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

def end_user_page
  @end_user_page
end

Instance Method Details

#eachObject



489
490
491
492
493
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user.rb', line 489

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

#to_sObject



495
496
497
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user.rb', line 495

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