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
590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 590 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.
588 589 590 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 588 def us_app_to_person_page @us_app_to_person_page end |
Instance Method Details
#each ⇒ Object
606 607 608 609 610 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 606 def each @us_app_to_person_page.each do |record| yield record end end |
#to_s ⇒ Object
612 613 614 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 612 def to_s '<Twilio::REST::Messaging::V1PageMetadata>'; end |