Class: Twilio::REST::Trusthub::V1::TrustProductsPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Trusthub::V1::TrustProductsPageMetadata
- Defined in:
- lib/twilio-ruby/rest/trusthub/v1/trust_products.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#trust_products_page ⇒ Object
readonly
Returns the value of attribute trust_products_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ TrustProductsPageMetadata
constructor
A new instance of TrustProductsPageMetadata.
- #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) ⇒ TrustProductsPageMetadata
Returns a new instance of TrustProductsPageMetadata.
575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 575 def initialize(version, response, solution, limit) super(version, response) @trust_products_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @trust_products_page << TrustProductsListResponse.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_page ⇒ Object (readonly)
Returns the value of attribute trust_products_page.
573 574 575 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 573 def trust_products_page @trust_products_page end |
Instance Method Details
#each ⇒ Object
591 592 593 594 595 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 591 def each @trust_products_page.each do |record| yield record end end |
#to_s ⇒ Object
597 598 599 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 597 def to_s '<Twilio::REST::Trusthub::V1PageMetadata>'; end |