Class: Twilio::REST::Conversations::V1::ConversationWithParticipantsPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Conversations::V1::ConversationWithParticipantsPageMetadata
- Defined in:
- lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#conversation_with_participants_page ⇒ Object
readonly
Returns the value of attribute conversation_with_participants_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ ConversationWithParticipantsPageMetadata
constructor
A new instance of ConversationWithParticipantsPageMetadata.
- #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) ⇒ ConversationWithParticipantsPageMetadata
Returns a new instance of ConversationWithParticipantsPageMetadata.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 202 def initialize(version, response, solution, limit) super(version, response) @conversation_with_participants_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @conversation_with_participants_page << ConversationWithParticipantsListResponse.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
#conversation_with_participants_page ⇒ Object (readonly)
Returns the value of attribute conversation_with_participants_page.
200 201 202 |
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 200 def conversation_with_participants_page @conversation_with_participants_page end |
Instance Method Details
#each ⇒ Object
218 219 220 221 222 |
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 218 def each @conversation_with_participants_page.each do |record| yield record end end |
#to_s ⇒ Object
224 225 226 |
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 224 def to_s '<Twilio::REST::Conversations::V1PageMetadata>'; end |