Class: Twilio::REST::IpMessaging::V1::ServiceContext::ChannelPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::IpMessaging::V1::ServiceContext::ChannelPageMetadata
- Defined in:
- lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#channel_page ⇒ Object
readonly
Returns the value of attribute channel_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ ChannelPageMetadata
constructor
A new instance of ChannelPageMetadata.
- #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) ⇒ ChannelPageMetadata
Returns a new instance of ChannelPageMetadata.
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb', line 564 def initialize(version, response, solution, limit) super(version, response) @channel_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @channel_page << ChannelListResponse.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
#channel_page ⇒ Object (readonly)
Returns the value of attribute channel_page.
562 563 564 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb', line 562 def channel_page @channel_page end |
Instance Method Details
#each ⇒ Object
580 581 582 583 584 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb', line 580 def each @channel_page.each do |record| yield record end end |
#to_s ⇒ Object
586 587 588 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb', line 586 def to_s '<Twilio::REST::IpMessaging::V1PageMetadata>'; end |