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/role.rb,
lib/twilio-ruby/rest/conversations/v1/user.rb,
lib/twilio-ruby/rest/conversations/v1/service.rb,
lib/twilio-ruby/rest/conversations/v1/credential.rb,
lib/twilio-ruby/rest/conversations/v1/conversation.rb,
lib/twilio-ruby/rest/conversations/v1/service/role.rb,
lib/twilio-ruby/rest/conversations/v1/service/user.rb,
lib/twilio-ruby/rest/conversations/v1/configuration.rb,
lib/twilio-ruby/rest/conversations/v1/service/binding.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/service/conversation.rb,
lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb,
lib/twilio-ruby/rest/conversations/v1/service/configuration.rb,
lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb,
lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb,
lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb,
lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb,
lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb,
lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb,
lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb,
lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb,
lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb,
lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb,
lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb

Defined Under Namespace

Classes: ConfigurationContext, ConfigurationInstance, ConfigurationList, ConfigurationPage, ConversationContext, ConversationInstance, ConversationList, ConversationPage, CredentialContext, CredentialInstance, CredentialList, CredentialPage, ParticipantConversationInstance, ParticipantConversationList, ParticipantConversationPage, RoleContext, RoleInstance, RoleList, RolePage, ServiceContext, ServiceInstance, ServiceList, ServicePage, UserContext, UserInstance, UserList, UserPage

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
21
22
23
24
25
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 15

def initialize(domain)
  super
  @version = 'v1'
  @configuration = nil
  @conversations = nil
  @credentials = nil
  @participant_conversations = nil
  @roles = nil
  @services = nil
  @users = nil
end

Instance Method Details

#configurationTwilio::REST::Conversations::V1::ConfigurationContext


29
30
31
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 29

def configuration
  @configuration ||= ConfigurationContext.new self
end

#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. Can also be the `unique_name` of the Conversation.

Returns:


38
39
40
41
42
43
44
45
46
47
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 38

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

#credentials(sid = :unset) ⇒ Twilio::REST::Conversations::V1::CredentialContext, Twilio::REST::Conversations::V1::CredentialList

Parameters:

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

    A 34 character string that uniquely identifies this resource.

Returns:


54
55
56
57
58
59
60
61
62
63
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 54

def credentials(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @credentials ||= CredentialList.new self
  else
      CredentialContext.new(self, sid)
  end
end

#participant_conversationsTwilio::REST::Conversations::V1::ParticipantConversationContext

Returns:

  • (Twilio::REST::Conversations::V1::ParticipantConversationContext)

67
68
69
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 67

def participant_conversations
  @participant_conversations ||= ParticipantConversationList.new self
end

#roles(sid = :unset) ⇒ Twilio::REST::Conversations::V1::RoleContext, Twilio::REST::Conversations::V1::RoleList

Parameters:

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

    The SID of the Role resource to fetch.

Returns:


75
76
77
78
79
80
81
82
83
84
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 75

def roles(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @roles ||= RoleList.new self
  else
      RoleContext.new(self, sid)
  end
end

#services(sid = :unset) ⇒ Twilio::REST::Conversations::V1::ServiceContext, Twilio::REST::Conversations::V1::ServiceList

Parameters:

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

    A 34 character string that uniquely identifies this resource.

Returns:


91
92
93
94
95
96
97
98
99
100
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 91

def services(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @services ||= ServiceList.new self
  else
      ServiceContext.new(self, sid)
  end
end

#to_sObject

Provide a user friendly representation


120
121
122
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 120

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

#users(sid = :unset) ⇒ Twilio::REST::Conversations::V1::UserContext, Twilio::REST::Conversations::V1::UserList

Parameters:

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

    The SID of the User resource to fetch. This value can be either the `sid` or the `identity` of the User resource to fetch.

Returns:


107
108
109
110
111
112
113
114
115
116
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 107

def users(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @users ||= UserList.new self
  else
      UserContext.new(self, sid)
  end
end