Class: Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::MachineToMachinePageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::MachineToMachinePageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/machine_to_machine.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#machine_to_machine_page ⇒ Object
readonly
Returns the value of attribute machine_to_machine_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ MachineToMachinePageMetadata
constructor
A new instance of MachineToMachinePageMetadata.
- #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) ⇒ MachineToMachinePageMetadata
Returns a new instance of MachineToMachinePageMetadata.
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/machine_to_machine.rb', line 340 def initialize(version, response, solution, limit) super(version, response) @machine_to_machine_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @machine_to_machine_page << MachineToMachineListResponse.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
#machine_to_machine_page ⇒ Object (readonly)
Returns the value of attribute machine_to_machine_page.
338 339 340 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/machine_to_machine.rb', line 338 def machine_to_machine_page @machine_to_machine_page end |
Instance Method Details
#each ⇒ Object
356 357 358 359 360 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/machine_to_machine.rb', line 356 def each @machine_to_machine_page.each do |record| yield record end end |
#to_s ⇒ Object
362 363 364 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/machine_to_machine.rb', line 362 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |