Class: Twilio::REST::IpMessaging::V1::ServiceContext::UserContext::UserChannelPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::IpMessaging::V1::ServiceContext::UserContext::UserChannelPageMetadata
- Defined in:
- lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#user_channel_page ⇒ Object
readonly
Returns the value of attribute user_channel_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ UserChannelPageMetadata
constructor
A new instance of UserChannelPageMetadata.
- #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) ⇒ UserChannelPageMetadata
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb', line 188 def initialize(version, response, solution, limit) super(version, response) @user_channel_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @user_channel_page << UserChannelListResponse.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
#user_channel_page ⇒ Object (readonly)
Returns the value of attribute user_channel_page.
186 187 188 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb', line 186 def user_channel_page @user_channel_page end |
Instance Method Details
#each ⇒ Object
204 205 206 207 208 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb', line 204 def each @user_channel_page.each do |record| yield record end end |
#to_s ⇒ Object
210 211 212 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb', line 210 def to_s '<Twilio::REST::IpMessaging::V1PageMetadata>'; end |