Class: Twilio::REST::Conversations::V1::AddressConfigurationContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Conversations::V1::AddressConfigurationContext
- Defined in:
- lib/twilio-ruby/rest/conversations/v1/address_configuration.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the AddressConfigurationInstance.
-
#fetch ⇒ AddressConfigurationInstance
Fetch the AddressConfigurationInstance.
-
#initialize(version, sid) ⇒ AddressConfigurationContext
constructor
Initialize the AddressConfigurationContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(friendly_name: :unset, auto_creation_enabled: :unset, auto_creation_type: :unset, auto_creation_conversation_service_sid: :unset, auto_creation_webhook_url: :unset, auto_creation_webhook_method: :unset, auto_creation_webhook_filters: :unset, auto_creation_studio_flow_sid: :unset, auto_creation_studio_retry_count: :unset) ⇒ AddressConfigurationInstance
Update the AddressConfigurationInstance.
Constructor Details
#initialize(version, sid) ⇒ AddressConfigurationContext
Initialize the AddressConfigurationContext
200 201 202 203 204 205 206 207 208 |
# File 'lib/twilio-ruby/rest/conversations/v1/address_configuration.rb', line 200 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Configuration/Addresses/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the AddressConfigurationInstance
212 213 214 215 216 217 218 219 |
# File 'lib/twilio-ruby/rest/conversations/v1/address_configuration.rb', line 212 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#fetch ⇒ AddressConfigurationInstance
Fetch the AddressConfigurationInstance
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/twilio-ruby/rest/conversations/v1/address_configuration.rb', line 224 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) AddressConfigurationInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
300 301 302 303 |
# File 'lib/twilio-ruby/rest/conversations/v1/address_configuration.rb', line 300 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Conversations.V1.AddressConfigurationContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
293 294 295 296 |
# File 'lib/twilio-ruby/rest/conversations/v1/address_configuration.rb', line 293 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Conversations.V1.AddressConfigurationContext #{context}>" end |
#update(friendly_name: :unset, auto_creation_enabled: :unset, auto_creation_type: :unset, auto_creation_conversation_service_sid: :unset, auto_creation_webhook_url: :unset, auto_creation_webhook_method: :unset, auto_creation_webhook_filters: :unset, auto_creation_studio_flow_sid: :unset, auto_creation_studio_retry_count: :unset) ⇒ AddressConfigurationInstance
Update the AddressConfigurationInstance
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/twilio-ruby/rest/conversations/v1/address_configuration.rb', line 252 def update( friendly_name: :unset, auto_creation_enabled: :unset, auto_creation_type: :unset, auto_creation_conversation_service_sid: :unset, auto_creation_webhook_url: :unset, auto_creation_webhook_method: :unset, auto_creation_webhook_filters: :unset, auto_creation_studio_flow_sid: :unset, auto_creation_studio_retry_count: :unset ) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'AutoCreation.Enabled' => auto_creation_enabled, 'AutoCreation.Type' => auto_creation_type, 'AutoCreation.ConversationServiceSid' => auto_creation_conversation_service_sid, 'AutoCreation.WebhookUrl' => auto_creation_webhook_url, 'AutoCreation.WebhookMethod' => auto_creation_webhook_method, 'AutoCreation.WebhookFilters' => Twilio.serialize_list(auto_creation_webhook_filters) { |e| e }, 'AutoCreation.StudioFlowSid' => auto_creation_studio_flow_sid, 'AutoCreation.StudioRetryCount' => auto_creation_studio_retry_count, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.update('POST', @uri, data: data, headers: headers) AddressConfigurationInstance.new( @version, payload, sid: @solution[:sid], ) end |