Class: Twilio::REST::Messaging::V1::ServiceContext::UsAppToPersonPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Messaging::V1::ServiceContext::UsAppToPersonPageMetadata
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#us_app_to_person_page ⇒ Object
readonly
Returns the value of attribute us_app_to_person_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ UsAppToPersonPageMetadata
constructor
A new instance of UsAppToPersonPageMetadata.
- #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) ⇒ UsAppToPersonPageMetadata
Returns a new instance of UsAppToPersonPageMetadata.
644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 644 def initialize(version, response, solution, limit) super(version, response) @us_app_to_person_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @us_app_to_person_page << UsAppToPersonListResponse.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
#us_app_to_person_page ⇒ Object (readonly)
Returns the value of attribute us_app_to_person_page.
642 643 644 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 642 def us_app_to_person_page @us_app_to_person_page end |
Instance Method Details
#each ⇒ Object
660 661 662 663 664 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 660 def each @us_app_to_person_page.each do |record| yield record end end |
#to_s ⇒ Object
666 667 668 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 666 def to_s '<Twilio::REST::Messaging::V1PageMetadata>'; end |