Class: Twilio::REST::Chat::V2::ServiceContext::ChannelContext::WebhookListResponse

Inherits:
InstanceListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb,
lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, key, limit = :unset) ⇒ WebhookListResponse

Returns a new instance of WebhookListResponse.

Parameters:

  • instance (Array<WebhookInstance>)
  • headers (Hash{String => Object})
  • status_code (Integer)


500
501
502
503
504
505
506
# File 'lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb', line 500

def initialize(version, payload, key)
   @webhook_instance = payload.body[key].map do |data|
    WebhookInstance.new(version, data)
   end
   @headers = payload.headers
   @status_code = payload.status_code
end

Instance Method Details

#headersObject



593
594
595
# File 'lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb', line 593

def headers
  @headers
end

#status_codeObject



597
598
599
# File 'lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb', line 597

def status_code
  @status_code
end

#webhookObject



589
590
591
# File 'lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb', line 589

def webhook
    @webhook
end

#webhook_instanceObject



508
509
510
# File 'lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb', line 508

def webhook_instance
    @instance
end