Class: Twilio::REST::Notify::V1::ServiceContext::BindingPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Notify::V1::ServiceContext::BindingPageMetadata
- Defined in:
- lib/twilio-ruby/rest/notify/v1/service/binding.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#binding_page ⇒ Object
readonly
Returns the value of attribute binding_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ BindingPageMetadata
constructor
A new instance of BindingPageMetadata.
- #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) ⇒ BindingPageMetadata
Returns a new instance of BindingPageMetadata.
476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 |
# File 'lib/twilio-ruby/rest/notify/v1/service/binding.rb', line 476 def initialize(version, response, solution, limit) super(version, response) @binding_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @binding_page << BindingListResponse.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
#binding_page ⇒ Object (readonly)
Returns the value of attribute binding_page.
474 475 476 |
# File 'lib/twilio-ruby/rest/notify/v1/service/binding.rb', line 474 def binding_page @binding_page end |
Instance Method Details
#each ⇒ Object
492 493 494 495 496 |
# File 'lib/twilio-ruby/rest/notify/v1/service/binding.rb', line 492 def each @binding_page.each do |record| yield record end end |
#to_s ⇒ Object
498 499 500 |
# File 'lib/twilio-ruby/rest/notify/v1/service/binding.rb', line 498 def to_s '<Twilio::REST::Notify::V1PageMetadata>'; end |