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.
497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 497 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.
495 496 497 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 495 def ip_address_page @ip_address_page end |
Instance Method Details
#each ⇒ Object
513 514 515 516 517 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 513 def each @ip_address_page.each do |record| yield record end end |
#to_s ⇒ Object
519 520 521 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb', line 519 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |