Class: Twilio::REST::Api::V2010::AccountContext::ShortCodePageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::ShortCodePageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/short_code.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#short_code_page ⇒ Object
readonly
Returns the value of attribute short_code_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ ShortCodePageMetadata
constructor
A new instance of ShortCodePageMetadata.
- #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) ⇒ ShortCodePageMetadata
Returns a new instance of ShortCodePageMetadata.
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 |
# File 'lib/twilio-ruby/rest/api/v2010/account/short_code.rb', line 420 def initialize(version, response, solution, limit) super(version, response) @short_code_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @short_code_page << ShortCodeListResponse.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
#short_code_page ⇒ Object (readonly)
Returns the value of attribute short_code_page.
418 419 420 |
# File 'lib/twilio-ruby/rest/api/v2010/account/short_code.rb', line 418 def short_code_page @short_code_page end |
Instance Method Details
#each ⇒ Object
436 437 438 439 440 |
# File 'lib/twilio-ruby/rest/api/v2010/account/short_code.rb', line 436 def each @short_code_page.each do |record| yield record end end |
#to_s ⇒ Object
442 443 444 |
# File 'lib/twilio-ruby/rest/api/v2010/account/short_code.rb', line 442 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |