Class: Twilio::REST::Verify::V2::SafelistPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Verify::V2::SafelistPageMetadata
- Defined in:
- lib/twilio-ruby/rest/verify/v2/safelist.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#safelist_page ⇒ Object
readonly
Returns the value of attribute safelist_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ SafelistPageMetadata
constructor
A new instance of SafelistPageMetadata.
- #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) ⇒ SafelistPageMetadata
Returns a new instance of SafelistPageMetadata.
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/twilio-ruby/rest/verify/v2/safelist.rb', line 288 def initialize(version, response, solution, limit) super(version, response) @safelist_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @safelist_page << SafelistListResponse.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
#safelist_page ⇒ Object (readonly)
Returns the value of attribute safelist_page.
286 287 288 |
# File 'lib/twilio-ruby/rest/verify/v2/safelist.rb', line 286 def safelist_page @safelist_page end |
Instance Method Details
#each ⇒ Object
304 305 306 307 308 |
# File 'lib/twilio-ruby/rest/verify/v2/safelist.rb', line 304 def each @safelist_page.each do |record| yield record end end |
#to_s ⇒ Object
310 311 312 |
# File 'lib/twilio-ruby/rest/verify/v2/safelist.rb', line 310 def to_s '<Twilio::REST::Verify::V2PageMetadata>'; end |