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
Instance Method Summary collapse
-
#chat_service_sid ⇒ String
The unique string that we created to identify the Service configuration 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-level role assigned to users when they are added to the service.
-
#default_conversation_creator_role_sid ⇒ String
The conversation-level role assigned to a conversation creator when they join a new conversation.
-
#default_conversation_role_sid ⇒ String
The conversation-level 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 ⇒ Hash
Contains an absolute API resource URL to access the push notifications configuration of this service.
-
#notifications ⇒ notifications
Access the notifications.
-
#reachability_enabled ⇒ Boolean
Whether the [Reachability Indicator](www.twilio.com/docs/conversations/reachability) is enabled for this Conversations 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, reachability_enabled: :unset) ⇒ ConfigurationInstance
Update the ConfigurationInstance.
-
#url ⇒ String
An absolute API resource URL for this service configuration.
-
#webhooks ⇒ webhooks
Access the webhooks.
Constructor Details
#initialize(version, payload, chat_service_sid: nil) ⇒ ConfigurationInstance
Initialize the ConfigurationInstance
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 366 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'], 'reachability_enabled' => payload['reachability_enabled'], } # Context @instance_context = nil @params = { 'chat_service_sid' => chat_service_sid || @properties['chat_service_sid'] , } end |
Instance Method Details
#chat_service_sid ⇒ String
Returns The unique string that we created to identify the Service configuration resource.
399 400 401 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 399 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
390 391 392 393 394 395 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 390 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-level role assigned to users when they are added to the service. See [Conversation Role](www.twilio.com/docs/conversations/api/role-resource) for more info about roles.
417 418 419 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 417 def default_chat_service_role_sid @properties['default_chat_service_role_sid'] end |
#default_conversation_creator_role_sid ⇒ String
Returns The conversation-level role assigned to a conversation creator when they join a new conversation. See [Conversation Role](www.twilio.com/docs/conversations/api/role-resource) for more info about roles.
405 406 407 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 405 def default_conversation_creator_role_sid @properties['default_conversation_creator_role_sid'] end |
#default_conversation_role_sid ⇒ String
Returns The conversation-level role assigned to users when they are added to a conversation. See [Conversation Role](www.twilio.com/docs/conversations/api/role-resource) for more info about roles.
411 412 413 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 411 def default_conversation_role_sid @properties['default_conversation_role_sid'] end |
#fetch ⇒ ConfigurationInstance
Fetch the ConfigurationInstance
442 443 444 445 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 442 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
492 493 494 495 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 492 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Conversations.V1.ConfigurationInstance #{values}>" end |
#links ⇒ Hash
Returns Contains an absolute API resource URL to access the push notifications configuration of this service.
429 430 431 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 429 def links @properties['links'] end |
#notifications ⇒ notifications
Access the notifications
479 480 481 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 479 def notifications context.notifications end |
#reachability_enabled ⇒ Boolean
Returns Whether the [Reachability Indicator](www.twilio.com/docs/conversations/reachability) is enabled for this Conversations Service. The default is false.
435 436 437 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 435 def reachability_enabled @properties['reachability_enabled'] end |
#to_s ⇒ Object
Provide a user friendly representation
485 486 487 488 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 485 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, reachability_enabled: :unset) ⇒ ConfigurationInstance
Update the ConfigurationInstance
454 455 456 457 458 459 460 461 462 463 464 465 466 467 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 454 def update( default_conversation_creator_role_sid: :unset, default_conversation_role_sid: :unset, default_chat_service_role_sid: :unset, reachability_enabled: :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, reachability_enabled: reachability_enabled, ) end |
#url ⇒ String
Returns An absolute API resource URL for this service configuration.
423 424 425 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 423 def url @properties['url'] end |
#webhooks ⇒ webhooks
Access the webhooks
472 473 474 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/configuration.rb', line 472 def webhooks context.webhooks end |