Class: Twilio::REST::Voice::V1::ConnectionPolicyContext::ConnectionPolicyTargetPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Voice::V1::ConnectionPolicyContext::ConnectionPolicyTargetPageMetadata
- Defined in:
- lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#connection_policy_target_page ⇒ Object
readonly
Returns the value of attribute connection_policy_target_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ ConnectionPolicyTargetPageMetadata
constructor
A new instance of ConnectionPolicyTargetPageMetadata.
- #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) ⇒ ConnectionPolicyTargetPageMetadata
Returns a new instance of ConnectionPolicyTargetPageMetadata.
512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 |
# File 'lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb', line 512 def initialize(version, response, solution, limit) super(version, response) @connection_policy_target_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @connection_policy_target_page << ConnectionPolicyTargetListResponse.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
#connection_policy_target_page ⇒ Object (readonly)
Returns the value of attribute connection_policy_target_page.
510 511 512 |
# File 'lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb', line 510 def connection_policy_target_page @connection_policy_target_page end |
Instance Method Details
#each ⇒ Object
528 529 530 531 532 |
# File 'lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb', line 528 def each @connection_policy_target_page.each do |record| yield record end end |
#to_s ⇒ Object
534 535 536 |
# File 'lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb', line 534 def to_s '<Twilio::REST::Voice::V1PageMetadata>'; end |