Class: Twilio::REST::Api::V2010::AccountContext::CallContext::PaymentPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::CallContext::PaymentPageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/call/payment.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#payment_page ⇒ Object
readonly
Returns the value of attribute payment_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ PaymentPageMetadata
constructor
A new instance of PaymentPageMetadata.
- #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) ⇒ PaymentPageMetadata
Returns a new instance of PaymentPageMetadata.
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/payment.rb', line 391 def initialize(version, response, solution, limit) super(version, response) @payment_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @payment_page << PaymentListResponse.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
#payment_page ⇒ Object (readonly)
Returns the value of attribute payment_page.
389 390 391 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/payment.rb', line 389 def payment_page @payment_page end |
Instance Method Details
#each ⇒ Object
407 408 409 410 411 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/payment.rb', line 407 def each @payment_page.each do |record| yield record end end |
#to_s ⇒ Object
413 414 415 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/payment.rb', line 413 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |