Class: Twilio::REST::Memory::V1::ConversationSummaryContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Memory::V1::ConversationSummaryContext
- Defined in:
- lib/twilio-ruby/rest/memory/v1/conversation_summary.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the ConversationSummaryInstance.
-
#delete_with_metadata ⇒ Boolean
Delete the ConversationSummaryInstanceMetadata.
-
#fetch ⇒ ConversationSummaryInstance
Fetch the ConversationSummaryInstance.
-
#fetch_with_metadata ⇒ ConversationSummaryInstance
Fetch the ConversationSummaryInstanceMetadata.
-
#initialize(version, store_id, profile_id, summary_id) ⇒ ConversationSummaryContext
constructor
Initialize the ConversationSummaryContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#patch(summary_core_patch: nil) ⇒ ConversationSummaryInstance
Patch the ConversationSummaryInstance.
-
#patch_with_metadata(summary_core_patch: nil) ⇒ ConversationSummaryInstance
Patch the ConversationSummaryInstanceMetadata.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, store_id, profile_id, summary_id) ⇒ ConversationSummaryContext
Initialize the ConversationSummaryContext
358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 358 def initialize(version, store_id, profile_id, summary_id) apiV1Version = ApiV1Version.new version.domain, version super(apiV1Version) # Path Solution @solution = { store_id: store_id, profile_id: profile_id, summary_id: summary_id, } @uri = "/Stores/#{@solution[:store_id]}/Profiles/#{@solution[:profile_id]}/ConversationSummaries/#{@solution[:summary_id]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the ConversationSummaryInstance
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 372 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('DELETE', @uri, headers: headers) ConversationSummaryInstance.new( @version, response.body, store_id: @solution[:store_id], profile_id: @solution[:profile_id], summary_id: @solution[:summary_id], ) end |
#delete_with_metadata ⇒ Boolean
Delete the ConversationSummaryInstanceMetadata
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 392 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('DELETE', @uri, headers: headers) conversationSummary_instance = ConversationSummaryInstance.new( @version, response.body, account_sid: @solution[:account_sid], sid: @solution[:sid], ) ConversationSummaryInstanceMetadata.new(@version, conversationSummary_instance, response.headers, response.status_code) end |
#fetch ⇒ ConversationSummaryInstance
Fetch the ConversationSummaryInstance
411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 411 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) ConversationSummaryInstance.new( @version, payload, store_id: @solution[:store_id], profile_id: @solution[:profile_id], summary_id: @solution[:summary_id], ) end |
#fetch_with_metadata ⇒ ConversationSummaryInstance
Fetch the ConversationSummaryInstanceMetadata
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 432 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) conversation_summary_instance = ConversationSummaryInstance.new( @version, response.body, store_id: @solution[:store_id], profile_id: @solution[:profile_id], summary_id: @solution[:summary_id], ) ConversationSummaryInstanceMetadata.new( @version, conversation_summary_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
518 519 520 521 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 518 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Memory.V1.ConversationSummaryContext #{context}>" end |
#patch(summary_core_patch: nil) ⇒ ConversationSummaryInstance
Patch the ConversationSummaryInstance
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 460 def patch(summary_core_patch: nil ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) headers['Content-Type'] = 'application/json' payload = @version.patch('PATCH', @uri, headers: headers, data: summary_core_patch.to_json) ConversationSummaryInstance.new( @version, payload, store_id: @solution[:store_id], profile_id: @solution[:profile_id], summary_id: @solution[:summary_id], ) end |
#patch_with_metadata(summary_core_patch: nil) ⇒ ConversationSummaryInstance
Patch the ConversationSummaryInstanceMetadata
483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 483 def (summary_core_patch: nil ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) headers['Content-Type'] = 'application/json' response = @version.('PATCH', @uri, headers: headers, data: summary_core_patch.to_json) conversation_summary_instance = ConversationSummaryInstance.new( @version, response.body, store_id: @solution[:store_id], profile_id: @solution[:profile_id], summary_id: @solution[:summary_id], ) ConversationSummaryInstanceMetadata.new( @version, conversation_summary_instance, response.headers, response.status_code ) end |
#to_s ⇒ Object
Provide a user friendly representation
511 512 513 514 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 511 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Memory.V1.ConversationSummaryContext #{context}>" end |