Class: Twilio::REST::Accounts::V1::AuthTokenPromotionPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Accounts::V1::AuthTokenPromotionPageMetadata
- Defined in:
- lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#auth_token_promotion_page ⇒ Object
readonly
Returns the value of attribute auth_token_promotion_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ AuthTokenPromotionPageMetadata
constructor
A new instance of AuthTokenPromotionPageMetadata.
- #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) ⇒ AuthTokenPromotionPageMetadata
Returns a new instance of AuthTokenPromotionPageMetadata.
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 197 def initialize(version, response, solution, limit) super(version, response) @auth_token_promotion_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @auth_token_promotion_page << AuthTokenPromotionListResponse.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
#auth_token_promotion_page ⇒ Object (readonly)
Returns the value of attribute auth_token_promotion_page.
195 196 197 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 195 def auth_token_promotion_page @auth_token_promotion_page end |
Instance Method Details
#each ⇒ Object
213 214 215 216 217 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 213 def each @auth_token_promotion_page.each do |record| yield record end end |
#to_s ⇒ Object
219 220 221 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 219 def to_s '<Twilio::REST::Accounts::V1PageMetadata>'; end |