Class: Twilio::REST::Conversations::V1::ConversationContext::WebhookListResponse

Inherits:
InstanceListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb,
lib/twilio-ruby/rest/conversations/v1/conversation/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)


478
479
480
481
482
483
484
# File 'lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb', line 478

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



571
572
573
# File 'lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb', line 571

def headers
  @headers
end

#status_codeObject



575
576
577
# File 'lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb', line 575

def status_code
  @status_code
end

#webhookObject



567
568
569
# File 'lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb', line 567

def webhook
    @webhook
end

#webhook_instanceObject



486
487
488
# File 'lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb', line 486

def webhook_instance
    @instance
end