Class: Twilio::REST::Verify::V2::ServiceContext::ApproveChallengePageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Verify::V2::ServiceContext::ApproveChallengePageMetadata
- Defined in:
- lib/twilio-ruby/rest/verify/v2/service/approve_challenge.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#approve_challenge_page ⇒ Object
readonly
Returns the value of attribute approve_challenge_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ ApproveChallengePageMetadata
constructor
A new instance of ApproveChallengePageMetadata.
- #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) ⇒ ApproveChallengePageMetadata
Returns a new instance of ApproveChallengePageMetadata.
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/twilio-ruby/rest/verify/v2/service/approve_challenge.rb', line 174 def initialize(version, response, solution, limit) super(version, response) @approve_challenge_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @approve_challenge_page << ApproveChallengeListResponse.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
#approve_challenge_page ⇒ Object (readonly)
Returns the value of attribute approve_challenge_page.
172 173 174 |
# File 'lib/twilio-ruby/rest/verify/v2/service/approve_challenge.rb', line 172 def approve_challenge_page @approve_challenge_page end |
Instance Method Details
#each ⇒ Object
190 191 192 193 194 |
# File 'lib/twilio-ruby/rest/verify/v2/service/approve_challenge.rb', line 190 def each @approve_challenge_page.each do |record| yield record end end |
#to_s ⇒ Object
196 197 198 |
# File 'lib/twilio-ruby/rest/verify/v2/service/approve_challenge.rb', line 196 def to_s '<Twilio::REST::Verify::V2PageMetadata>'; end |