Class: Twilio::REST::FlexApi::V1::InteractionPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::FlexApi::V1::InteractionPageMetadata
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/interaction.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#interaction_page ⇒ Object
readonly
Returns the value of attribute interaction_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ InteractionPageMetadata
constructor
A new instance of InteractionPageMetadata.
- #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) ⇒ InteractionPageMetadata
Returns a new instance of InteractionPageMetadata.
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction.rb', line 352 def initialize(version, response, solution, limit) super(version, response) @interaction_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @interaction_page << InteractionListResponse.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
#interaction_page ⇒ Object (readonly)
Returns the value of attribute interaction_page.
350 351 352 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction.rb', line 350 def interaction_page @interaction_page end |
Instance Method Details
#each ⇒ Object
368 369 370 371 372 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction.rb', line 368 def each @interaction_page.each do |record| yield record end end |
#to_s ⇒ Object
374 375 376 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction.rb', line 374 def to_s '<Twilio::REST::FlexApi::V1PageMetadata>'; end |