class Twilio::REST::Conversations::V1
Public Class Methods
Initialize the V1
version of Conversations
Twilio::REST::Version::new
# File lib/twilio-ruby/rest/conversations/v1.rb 15 def initialize(domain) 16 super 17 @version = 'v1' 18 @configuration = nil 19 @conversations = nil 20 @credentials = nil 21 @participant_conversations = nil 22 @roles = nil 23 @services = nil 24 @users = nil 25 end
Public Instance Methods
@return [Twilio::REST::Conversations::V1::ConfigurationContext]
# File lib/twilio-ruby/rest/conversations/v1.rb 29 def configuration 30 @configuration ||= ConfigurationContext.new self 31 end
@param [String] sid A 34 character string that uniquely identifies this
resource. Can also be the `unique_name` of the Conversation.
@return [Twilio::REST::Conversations::V1::ConversationContext] if sid was passed. @return [Twilio::REST::Conversations::V1::ConversationList]
# File lib/twilio-ruby/rest/conversations/v1.rb 38 def conversations(sid=:unset) 39 if sid.nil? 40 raise ArgumentError, 'sid cannot be nil' 41 end 42 if sid == :unset 43 @conversations ||= ConversationList.new self 44 else 45 ConversationContext.new(self, sid) 46 end 47 end
@param [String] sid A 34 character string that uniquely identifies this
resource.
@return [Twilio::REST::Conversations::V1::CredentialContext] if sid was passed. @return [Twilio::REST::Conversations::V1::CredentialList]
# File lib/twilio-ruby/rest/conversations/v1.rb 54 def credentials(sid=:unset) 55 if sid.nil? 56 raise ArgumentError, 'sid cannot be nil' 57 end 58 if sid == :unset 59 @credentials ||= CredentialList.new self 60 else 61 CredentialContext.new(self, sid) 62 end 63 end
@return [Twilio::REST::Conversations::V1::ParticipantConversationContext]
# File lib/twilio-ruby/rest/conversations/v1.rb 67 def participant_conversations 68 @participant_conversations ||= ParticipantConversationList.new self 69 end
@param [String] sid The SID of the Role resource to fetch. @return [Twilio::REST::Conversations::V1::RoleContext] if sid was passed. @return [Twilio::REST::Conversations::V1::RoleList]
# File lib/twilio-ruby/rest/conversations/v1.rb 75 def roles(sid=:unset) 76 if sid.nil? 77 raise ArgumentError, 'sid cannot be nil' 78 end 79 if sid == :unset 80 @roles ||= RoleList.new self 81 else 82 RoleContext.new(self, sid) 83 end 84 end
@param [String] sid A 34 character string that uniquely identifies this
resource.
@return [Twilio::REST::Conversations::V1::ServiceContext] if sid was passed. @return [Twilio::REST::Conversations::V1::ServiceList]
# File lib/twilio-ruby/rest/conversations/v1.rb 91 def services(sid=:unset) 92 if sid.nil? 93 raise ArgumentError, 'sid cannot be nil' 94 end 95 if sid == :unset 96 @services ||= ServiceList.new self 97 else 98 ServiceContext.new(self, sid) 99 end 100 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/conversations/v1.rb 120 def to_s 121 '<Twilio::REST::Conversations::V1>' 122 end
@param [String] sid The SID of the User resource to fetch. This value can be
either the `sid` or the `identity` of the User resource to fetch.
@return [Twilio::REST::Conversations::V1::UserContext] if sid was passed. @return [Twilio::REST::Conversations::V1::UserList]
# File lib/twilio-ruby/rest/conversations/v1.rb 107 def users(sid=:unset) 108 if sid.nil? 109 raise ArgumentError, 'sid cannot be nil' 110 end 111 if sid == :unset 112 @users ||= UserList.new self 113 else 114 UserContext.new(self, sid) 115 end 116 end