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/address_configuration.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/configuration/webhook.rb,
lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.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_with_participants.rb,
lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb

Defined Under Namespace

Classes: AddressConfigurationContext, AddressConfigurationInstance, AddressConfigurationList, AddressConfigurationPage, ConfigurationContext, ConfigurationInstance, ConfigurationList, ConfigurationPage, ConversationContext, ConversationInstance, ConversationList, ConversationPage, ConversationWithParticipantsInstance, ConversationWithParticipantsList, ConversationWithParticipantsPage, 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



21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 21

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

Instance Method Details

#address_configurations(sid = :unset) ⇒ Twilio::REST::Conversations::V1::AddressConfigurationContext, Twilio::REST::Conversations::V1::AddressConfigurationList

Parameters:

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

    The SID of the Address Configuration resource. This value can be either the ‘sid` or the `address` of the configuration

Returns:



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

def address_configurations(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @address_configurations ||= AddressConfigurationList.new self
    else
        AddressConfigurationContext.new(self, sid)
    end
end

#configurationTwilio::REST::Conversations::V1::configurationContext

Returns:

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


51
52
53
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 51

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

#conversation_with_participantsTwilio::REST::Conversations::V1::ConversationWithParticipantsList



70
71
72
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 70

def conversation_with_participants
    @conversation_with_participants ||= ConversationWithParticipantsList.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:



58
59
60
61
62
63
64
65
66
67
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 58

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:



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

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::ParticipantConversationList



89
90
91
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 89

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:



96
97
98
99
100
101
102
103
104
105
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 96

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:



110
111
112
113
114
115
116
117
118
119
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 110

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



136
137
138
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 136

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:



124
125
126
127
128
129
130
131
132
133
# File 'lib/twilio-ruby/rest/conversations/v1.rb', line 124

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