Class: Twilio::REST::Trusthub::V1::CustomerProfilesContext::CustomerProfilesEvaluationsPageMetadata

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

Returns a new instance of CustomerProfilesEvaluationsPageMetadata.



372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 372

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

#customer_profiles_evaluations_pageObject (readonly)

Returns the value of attribute customer_profiles_evaluations_page.



370
371
372
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 370

def customer_profiles_evaluations_page
  @customer_profiles_evaluations_page
end

Instance Method Details

#eachObject



388
389
390
391
392
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 388

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

#to_sObject



394
395
396
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 394

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