Class: Twilio::REST::Accounts::V1::SafelistPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Accounts::V1::SafelistPageMetadata
- Defined in:
- lib/twilio-ruby/rest/accounts/v1/safelist.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#safelist_page ⇒ Object
readonly
Returns the value of attribute safelist_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ SafelistPageMetadata
constructor
A new instance of SafelistPageMetadata.
- #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) ⇒ SafelistPageMetadata
Returns a new instance of SafelistPageMetadata.
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/twilio-ruby/rest/accounts/v1/safelist.rb', line 230 def initialize(version, response, solution, limit) super(version, response) @safelist_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @safelist_page << SafelistListResponse.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
#safelist_page ⇒ Object (readonly)
Returns the value of attribute safelist_page.
228 229 230 |
# File 'lib/twilio-ruby/rest/accounts/v1/safelist.rb', line 228 def safelist_page @safelist_page end |
Instance Method Details
#each ⇒ Object
246 247 248 249 250 |
# File 'lib/twilio-ruby/rest/accounts/v1/safelist.rb', line 246 def each @safelist_page.each do |record| yield record end end |
#to_s ⇒ Object
252 253 254 |
# File 'lib/twilio-ruby/rest/accounts/v1/safelist.rb', line 252 def to_s '<Twilio::REST::Accounts::V1PageMetadata>'; end |