Class: Twilio::REST::Conversations::V1

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/conversations/v1.rb,
lib/twilio-ruby/rest/conversations/v1/webhook.rb,
lib/twilio-ruby/rest/conversations/v1/conversation.rb,
lib/twilio-ruby/rest/conversations/v1/conversation/message.rb,
lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb,
lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb

Defined Under Namespace

Classes: ConversationContext, ConversationInstance, ConversationList, ConversationPage, WebhookContext, WebhookInstance, WebhookList, WebhookPage

Instance Attribute Summary

Attributes inherited from Version

#domain

Instance Method Summary collapse

Methods inherited from Version

#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update

Constructor Details

#initialize(domain) ⇒ V1

Initialize the V1 version of Conversations



15
16
17
18
19
20
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 15

def initialize(domain)
  super
  @version = 'v1'
  @conversations = nil
  @webhooks = nil
end

Instance Method Details

#conversations(sid = :unset) ⇒ Twilio::REST::Conversations::V1::ConversationContext, Twilio::REST::Conversations::V1::ConversationList

Parameters:

  • sid (String) (defaults to: :unset)

    A 34 character string that uniquely identifies this resource.

Returns:



27
28
29
30
31
32
33
34
35
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 27

def conversations(sid=:unset)
  if sid.nil?
    raise ArgumentError, 'sid cannot be nil'
  elsif sid == :unset
    @conversations ||= ConversationList.new self
  else
    ConversationContext.new(self, sid)
  end
end

#to_sObject

Provide a user friendly representation



45
46
47
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 45

def to_s
  '<Twilio::REST::Conversations::V1>'
end

#webhooksTwilio::REST::Conversations::V1::WebhookContext



39
40
41
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 39

def webhooks
  @webhooks ||= WebhookContext.new self
end