Class: Twilio::REST::Conversations::V1::ConfigurationInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Conversations::V1::ConfigurationInstance
- Defined in:
- lib/twilio-ruby/rest/conversations/v1/configuration.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account responsible for this configuration.
-
#context ⇒ ConfigurationContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#default_chat_service_sid ⇒ String
The SID of the default Chat Service that every new conversation is associated with.
-
#default_closed_timer ⇒ String
Default ISO8601 duration when conversation will be switched to
closedstate. -
#default_inactive_timer ⇒ String
Default ISO8601 duration when conversation will be switched to
inactivestate. -
#default_messaging_service_sid ⇒ String
The SID of the default Messaging Service that every new conversation is associated with.
-
#fetch ⇒ ConfigurationInstance
Fetch the ConfigurationInstance.
-
#initialize(version, payload) ⇒ ConfigurationInstance
constructor
Initialize the ConfigurationInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
The links.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(default_chat_service_sid: :unset, default_messaging_service_sid: :unset, default_inactive_timer: :unset, default_closed_timer: :unset) ⇒ ConfigurationInstance
Update the ConfigurationInstance.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload) ⇒ ConfigurationInstance
Initialize the ConfigurationInstance
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/twilio-ruby/rest/conversations/v1/configuration.rb', line 139 def initialize(version, payload) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'default_chat_service_sid' => payload['default_chat_service_sid'], 'default_messaging_service_sid' => payload['default_messaging_service_sid'], 'default_inactive_timer' => payload['default_inactive_timer'], 'default_closed_timer' => payload['default_closed_timer'], 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = {} end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account responsible for this configuration.
171 172 173 |
# File 'lib/twilio-ruby/rest/conversations/v1/configuration.rb', line 171 def account_sid @properties['account_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
162 163 164 165 166 167 |
# File 'lib/twilio-ruby/rest/conversations/v1/configuration.rb', line 162 def context unless @instance_context @instance_context = ConfigurationContext.new(@version, ) end @instance_context end |
#default_chat_service_sid ⇒ String
Returns The SID of the default Chat Service that every new conversation is associated with.
177 178 179 |
# File 'lib/twilio-ruby/rest/conversations/v1/configuration.rb', line 177 def default_chat_service_sid @properties['default_chat_service_sid'] end |
#default_closed_timer ⇒ String
Returns Default ISO8601 duration when conversation will be switched to closed state.
195 196 197 |
# File 'lib/twilio-ruby/rest/conversations/v1/configuration.rb', line 195 def default_closed_timer @properties['default_closed_timer'] end |
#default_inactive_timer ⇒ String
Returns Default ISO8601 duration when conversation will be switched to inactive state.
189 190 191 |
# File 'lib/twilio-ruby/rest/conversations/v1/configuration.rb', line 189 def default_inactive_timer @properties['default_inactive_timer'] end |
#default_messaging_service_sid ⇒ String
Returns The SID of the default Messaging Service that every new conversation is associated with.
183 184 185 |
# File 'lib/twilio-ruby/rest/conversations/v1/configuration.rb', line 183 def default_messaging_service_sid @properties['default_messaging_service_sid'] end |
#fetch ⇒ ConfigurationInstance
Fetch the ConfigurationInstance
214 215 216 |
# File 'lib/twilio-ruby/rest/conversations/v1/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/configuration.rb', line 250 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Conversations.V1.ConfigurationInstance #{values}>" end |
#links ⇒ String
Returns The links.
207 208 209 |
# File 'lib/twilio-ruby/rest/conversations/v1/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/configuration.rb', line 243 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Conversations.V1.ConfigurationInstance #{values}>" end |
#update(default_chat_service_sid: :unset, default_messaging_service_sid: :unset, default_inactive_timer: :unset, default_closed_timer: :unset) ⇒ ConfigurationInstance
Update the ConfigurationInstance
232 233 234 235 236 237 238 239 |
# File 'lib/twilio-ruby/rest/conversations/v1/configuration.rb', line 232 def update(default_chat_service_sid: :unset, default_messaging_service_sid: :unset, default_inactive_timer: :unset, default_closed_timer: :unset) context.update( default_chat_service_sid: default_chat_service_sid, default_messaging_service_sid: default_messaging_service_sid, default_inactive_timer: default_inactive_timer, default_closed_timer: default_closed_timer, ) end |
#url ⇒ String
Returns The url.
201 202 203 |
# File 'lib/twilio-ruby/rest/conversations/v1/configuration.rb', line 201 def url @properties['url'] end |