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