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
366 367 368 369 370 371 372 373 374 375 376 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 366 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
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 380 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
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 400 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
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 419 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
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 440 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
526 527 528 529 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 526 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
468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 468 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
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 491 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
519 520 521 522 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 519 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Memory.V1.ConversationSummaryContext #{context}>" end |