Class: Twilio::REST::Api::V2010::AccountContext::SipList::IpAccessControlListContext::IpAddressPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::SipList::IpAccessControlListContext::IpAddressPageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#ip_address_page ⇒ Object
readonly
Returns the value of attribute ip_address_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ IpAddressPageMetadata
constructor
A new instance of IpAddressPageMetadata.
- #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) ⇒ IpAddressPageMetadata
Returns a new instance of IpAddressPageMetadata.
505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 505 def initialize(version, response, solution, limit) super(version, response) @ip_address_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @ip_address_page << IpAddressListResponse.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
#ip_address_page ⇒ Object (readonly)
Returns the value of attribute ip_address_page.
503 504 505 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 503 def ip_address_page @ip_address_page end |
Instance Method Details
#each ⇒ Object
521 522 523 524 525 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 521 def each @ip_address_page.each do |record| yield record end end |
#to_s ⇒ Object
527 528 529 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 527 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |