Class: Twilio::REST::Assistants::V1::AssistantContext::FeedbackPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Assistants::V1::AssistantContext::FeedbackPageMetadata
- Defined in:
- lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#feedback_page ⇒ Object
readonly
Returns the value of attribute feedback_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ FeedbackPageMetadata
constructor
A new instance of FeedbackPageMetadata.
- #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) ⇒ FeedbackPageMetadata
Returns a new instance of FeedbackPageMetadata.
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 258 def initialize(version, response, solution, limit) super(version, response) @feedback_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @feedback_page << FeedbackListResponse.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
#feedback_page ⇒ Object (readonly)
Returns the value of attribute feedback_page.
256 257 258 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 256 def feedback_page @feedback_page end |
Instance Method Details
#each ⇒ Object
274 275 276 277 278 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 274 def each @feedback_page.each do |record| yield record end end |
#to_s ⇒ Object
280 281 282 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 280 def to_s '<Twilio::REST::Assistants::V1PageMetadata>'; end |