Class: Twilio::REST::Trusthub::V1::TrustProductsContext::TrustProductsChannelEndpointAssignmentPageMetadata

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

Returns a new instance of TrustProductsChannelEndpointAssignmentPageMetadata.



426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb', line 426

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

Returns the value of attribute trust_products_channel_endpoint_assignment_page.



424
425
426
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb', line 424

def trust_products_channel_endpoint_assignment_page
  @trust_products_channel_endpoint_assignment_page
end

Instance Method Details

#eachObject



442
443
444
445
446
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb', line 442

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

#to_sObject



448
449
450
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb', line 448

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