Class: Twilio::REST::Notify::V1::ServiceContext::NotificationPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Notify::V1::ServiceContext::NotificationPageMetadata
- Defined in:
- lib/twilio-ruby/rest/notify/v1/service/notification.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#notification_page ⇒ Object
readonly
Returns the value of attribute notification_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ NotificationPageMetadata
constructor
A new instance of NotificationPageMetadata.
- #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) ⇒ NotificationPageMetadata
Returns a new instance of NotificationPageMetadata.
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/twilio-ruby/rest/notify/v1/service/notification.rb', line 238 def initialize(version, response, solution, limit) super(version, response) @notification_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @notification_page << NotificationListResponse.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
#notification_page ⇒ Object (readonly)
Returns the value of attribute notification_page.
236 237 238 |
# File 'lib/twilio-ruby/rest/notify/v1/service/notification.rb', line 236 def notification_page @notification_page end |
Instance Method Details
#each ⇒ Object
254 255 256 257 258 |
# File 'lib/twilio-ruby/rest/notify/v1/service/notification.rb', line 254 def each @notification_page.each do |record| yield record end end |
#to_s ⇒ Object
260 261 262 |
# File 'lib/twilio-ruby/rest/notify/v1/service/notification.rb', line 260 def to_s '<Twilio::REST::Notify::V1PageMetadata>'; end |