Class: Twilio::REST::Chat::V2::ServiceContext::ChannelContext::WebhookPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Chat::V2::ServiceContext::ChannelContext::WebhookPageMetadata
- Defined in:
- lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#webhook_page ⇒ Object
readonly
Returns the value of attribute webhook_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ WebhookPageMetadata
constructor
A new instance of WebhookPageMetadata.
- #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) ⇒ WebhookPageMetadata
Returns a new instance of WebhookPageMetadata.
538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 |
# File 'lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb', line 538 def initialize(version, response, solution, limit) super(version, response) @webhook_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @webhook_page << WebhookListResponse.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
#webhook_page ⇒ Object (readonly)
Returns the value of attribute webhook_page.
536 537 538 |
# File 'lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb', line 536 def webhook_page @webhook_page end |
Instance Method Details
#each ⇒ Object
554 555 556 557 558 |
# File 'lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb', line 554 def each @webhook_page.each do |record| yield record end end |
#to_s ⇒ Object
560 561 562 |
# File 'lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb', line 560 def to_s '<Twilio::REST::Chat::V2PageMetadata>'; end |