Class: Twilio::REST::Numbers::V1::PortingAllPortInPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Numbers::V1::PortingAllPortInPageMetadata
- Defined in:
- lib/twilio-ruby/rest/numbers/v1/porting_all_port_in.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#porting_all_port_in_page ⇒ Object
readonly
Returns the value of attribute porting_all_port_in_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ PortingAllPortInPageMetadata
constructor
A new instance of PortingAllPortInPageMetadata.
- #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) ⇒ PortingAllPortInPageMetadata
Returns a new instance of PortingAllPortInPageMetadata.
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_all_port_in.rb', line 233 def initialize(version, response, solution, limit) super(version, response) @porting_all_port_in_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @porting_all_port_in_page << PortingAllPortInListResponse.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
#porting_all_port_in_page ⇒ Object (readonly)
Returns the value of attribute porting_all_port_in_page.
231 232 233 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_all_port_in.rb', line 231 def porting_all_port_in_page @porting_all_port_in_page end |
Instance Method Details
#each ⇒ Object
249 250 251 252 253 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_all_port_in.rb', line 249 def each @porting_all_port_in_page.each do |record| yield record end end |
#to_s ⇒ Object
255 256 257 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_all_port_in.rb', line 255 def to_s '<Twilio::REST::Numbers::V1PageMetadata>'; end |