Class: Twilio::REST::Trusthub::V1::TrustProductsContext::TrustProductsEvaluationsPageMetadata

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

Returns a new instance of TrustProductsEvaluationsPageMetadata.



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

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

#trust_products_evaluations_pageObject (readonly)

Returns the value of attribute trust_products_evaluations_page.



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

def trust_products_evaluations_page
  @trust_products_evaluations_page
end

Instance Method Details

#eachObject



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

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

#to_sObject



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

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