Class: Twilio::REST::Trusthub::V1::TrustProductsContext::TrustProductsEntityAssignmentsPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Trusthub::V1::TrustProductsContext::TrustProductsEntityAssignmentsPageMetadata
- Defined in:
- lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#trust_products_entity_assignments_page ⇒ Object
readonly
Returns the value of attribute trust_products_entity_assignments_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ TrustProductsEntityAssignmentsPageMetadata
constructor
A new instance of TrustProductsEntityAssignmentsPageMetadata.
- #to_s ⇒ Object
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) ⇒ TrustProductsEntityAssignmentsPageMetadata
Returns a new instance of TrustProductsEntityAssignmentsPageMetadata.
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 420 def initialize(version, response, solution, limit) super(version, response) @trust_products_entity_assignments_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @trust_products_entity_assignments_page << TrustProductsEntityAssignmentsListResponse.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_entity_assignments_page ⇒ Object (readonly)
Returns the value of attribute trust_products_entity_assignments_page.
418 419 420 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 418 def trust_products_entity_assignments_page @trust_products_entity_assignments_page end |
Instance Method Details
#each ⇒ Object
436 437 438 439 440 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 436 def each @trust_products_entity_assignments_page.each do |record| yield record end end |
#to_s ⇒ Object
442 443 444 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 442 def to_s '<Twilio::REST::Trusthub::V1PageMetadata>'; end |