Class: Twilio::REST::Conversations::V1::ServiceContext::ConfigurationInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Conversations::V1::ServiceContext::ConfigurationInstance
- Defined in:
- lib/twilio-ruby/rest/conversations/v1/service/configuration.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#chat_service_sid ⇒ String
The unique string that identifies the resource.
-
#context ⇒ ConfigurationContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#default_chat_service_role_sid ⇒ String
The service role assigned to users when they are added to the service.
-
#default_conversation_creator_role_sid ⇒ String
The role assigned to a conversation creator user when they join a new conversation.
-
#default_conversation_role_sid ⇒ String
The role assigned to users when they are added to a conversation.
-
#fetch ⇒ ConfigurationInstance
Fetch the ConfigurationInstance.
-
#initialize(version, payload, chat_service_sid: nil) ⇒ ConfigurationInstance
constructor
Initialize the ConfigurationInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
Absolute URL to access the Push Notifications configuration of this Service.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(default_conversation_creator_role_sid: :unset, default_conversation_role_sid: :unset, default_chat_service_role_sid: :unset) ⇒ ConfigurationInstance
Update the ConfigurationInstance.
-
#url ⇒ String
The absolute URL of the Service configuration resource.
Constructor Details
#initialize(version, payload, chat_service_sid: nil) ⇒ ConfigurationInstance
Initialize the ConfigurationInstance
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 146 def initialize(version, payload, chat_service_sid: nil) super(version) # Marshaled Properties @properties = { 'chat_service_sid' => payload['chat_service_sid'], 'default_conversation_creator_role_sid' => payload['default_conversation_creator_role_sid'], 'default_conversation_role_sid' => payload['default_conversation_role_sid'], 'default_chat_service_role_sid' => payload['default_chat_service_role_sid'], 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = {'chat_service_sid' => chat_service_sid, } end |
Instance Method Details
#chat_service_sid ⇒ String
Returns The unique string that identifies the resource.
177 178 179 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 177 def chat_service_sid @properties['chat_service_sid'] end |
#context ⇒ ConfigurationContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
168 169 170 171 172 173 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 168 def context unless @instance_context @instance_context = ConfigurationContext.new(@version, @params['chat_service_sid'], ) end @instance_context end |
#default_chat_service_role_sid ⇒ String
Returns The service role assigned to users when they are added to the service.
195 196 197 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 195 def default_chat_service_role_sid @properties['default_chat_service_role_sid'] end |
#default_conversation_creator_role_sid ⇒ String
Returns The role assigned to a conversation creator user when they join a new conversation.
183 184 185 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 183 def default_conversation_creator_role_sid @properties['default_conversation_creator_role_sid'] end |
#default_conversation_role_sid ⇒ String
Returns The role assigned to users when they are added to a conversation.
189 190 191 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 189 def default_conversation_role_sid @properties['default_conversation_role_sid'] end |
#fetch ⇒ ConfigurationInstance
Fetch the ConfigurationInstance
214 215 216 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 214 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
250 251 252 253 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 250 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Conversations.V1.ConfigurationInstance #{values}>" end |
#links ⇒ String
Returns Absolute URL to access the Push Notifications configuration of this Service.
207 208 209 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 207 def links @properties['links'] end |
#to_s ⇒ Object
Provide a user friendly representation
243 244 245 246 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 243 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Conversations.V1.ConfigurationInstance #{values}>" end |
#update(default_conversation_creator_role_sid: :unset, default_conversation_role_sid: :unset, default_chat_service_role_sid: :unset) ⇒ ConfigurationInstance
Update the ConfigurationInstance
233 234 235 236 237 238 239 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 233 def update(default_conversation_creator_role_sid: :unset, default_conversation_role_sid: :unset, default_chat_service_role_sid: :unset) context.update( default_conversation_creator_role_sid: default_conversation_creator_role_sid, default_conversation_role_sid: default_conversation_role_sid, default_chat_service_role_sid: default_chat_service_role_sid, ) end |
#url ⇒ String
Returns The absolute URL of the Service configuration resource.
201 202 203 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 201 def url @properties['url'] end |