Class: Twilio::REST::Verify::V2::ServiceContext::RateLimitPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Verify::V2::ServiceContext::RateLimitPageMetadata
- Defined in:
- lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#rate_limit_page ⇒ Object
readonly
Returns the value of attribute rate_limit_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ RateLimitPageMetadata
constructor
A new instance of RateLimitPageMetadata.
- #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) ⇒ RateLimitPageMetadata
Returns a new instance of RateLimitPageMetadata.
490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 |
# File 'lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb', line 490 def initialize(version, response, solution, limit) super(version, response) @rate_limit_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @rate_limit_page << RateLimitListResponse.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
#rate_limit_page ⇒ Object (readonly)
Returns the value of attribute rate_limit_page.
488 489 490 |
# File 'lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb', line 488 def rate_limit_page @rate_limit_page end |
Instance Method Details
#each ⇒ Object
506 507 508 509 510 |
# File 'lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb', line 506 def each @rate_limit_page.each do |record| yield record end end |
#to_s ⇒ Object
512 513 514 |
# File 'lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb', line 512 def to_s '<Twilio::REST::Verify::V2PageMetadata>'; end |