Class: Twilio::REST::Verify::V2::ServiceContext::EntityContext::ChallengeContext::NotificationPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Verify::V2::ServiceContext::EntityContext::ChallengeContext::NotificationPageMetadata
- Defined in:
- lib/twilio-ruby/rest/verify/v2/service/entity/challenge/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.
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 142 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.
140 141 142 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 140 def notification_page @notification_page end |
Instance Method Details
#each ⇒ Object
158 159 160 161 162 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 158 def each @notification_page.each do |record| yield record end end |
#to_s ⇒ Object
164 165 166 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 164 def to_s '<Twilio::REST::Verify::V2PageMetadata>'; end |