Class: Twilio::REST::FlexApi::V1::FlexFlowContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::FlexApi::V1::FlexFlowContext
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the FlexFlowInstance.
-
#delete_with_metadata ⇒ Boolean
Delete the FlexFlowInstanceMetadata.
-
#fetch ⇒ FlexFlowInstance
Fetch the FlexFlowInstance.
-
#fetch_with_metadata ⇒ FlexFlowInstance
Fetch the FlexFlowInstanceMetadata.
-
#initialize(version, sid) ⇒ FlexFlowContext
constructor
Initialize the FlexFlowContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset, janitor_enabled: :unset, integration_retry_count: :unset) ⇒ FlexFlowInstance
Update the FlexFlowInstance.
-
#update_with_metadata(friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset, janitor_enabled: :unset, integration_retry_count: :unset) ⇒ FlexFlowInstance
Update the FlexFlowInstanceMetadata.
Constructor Details
#initialize(version, sid) ⇒ FlexFlowContext
Initialize the FlexFlowContext
327 328 329 330 331 332 333 334 335 336 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 327 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/FlexFlows/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the FlexFlowInstance
340 341 342 343 344 345 346 347 348 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 340 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#delete_with_metadata ⇒ Boolean
Delete the FlexFlowInstanceMetadata
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 353 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('DELETE', @uri, headers: headers) flexFlow_instance = FlexFlowInstance.new( @version, response.body, account_sid: @solution[:account_sid], sid: @solution[:sid], ) FlexFlowInstanceMetadata.new(@version, flexFlow_instance, response.headers, response.status_code) end |
#fetch ⇒ FlexFlowInstance
Fetch the FlexFlowInstance
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 372 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) FlexFlowInstance.new( @version, payload, sid: @solution[:sid], ) end |
#fetch_with_metadata ⇒ FlexFlowInstance
Fetch the FlexFlowInstanceMetadata
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 391 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) flex_flow_instance = FlexFlowInstance.new( @version, response.body, sid: @solution[:sid], ) FlexFlowInstanceMetadata.new( @version, flex_flow_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
577 578 579 580 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 577 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.FlexFlowContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
570 571 572 573 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 570 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.FlexFlowContext #{context}>" end |
#update(friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset, janitor_enabled: :unset, integration_retry_count: :unset) ⇒ FlexFlowInstance
Update the FlexFlowInstance
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 433 def update( friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset, janitor_enabled: :unset, integration_retry_count: :unset ) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'ChatServiceSid' => chat_service_sid, 'ChannelType' => channel_type, 'ContactIdentity' => contact_identity, 'Enabled' => enabled, 'IntegrationType' => integration_type, 'Integration.FlowSid' => integration_flow_sid, 'Integration.Url' => integration_url, 'Integration.WorkspaceSid' => integration_workspace_sid, 'Integration.WorkflowSid' => integration_workflow_sid, 'Integration.Channel' => integration_channel, 'Integration.Timeout' => integration_timeout, 'Integration.Priority' => integration_priority, 'Integration.CreationOnMessage' => , 'LongLived' => long_lived, 'JanitorEnabled' => janitor_enabled, 'Integration.RetryCount' => integration_retry_count, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.update('POST', @uri, data: data, headers: headers) FlexFlowInstance.new( @version, payload, sid: @solution[:sid], ) end |
#update_with_metadata(friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset, janitor_enabled: :unset, integration_retry_count: :unset) ⇒ FlexFlowInstance
Update the FlexFlowInstanceMetadata
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 507 def ( friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset, janitor_enabled: :unset, integration_retry_count: :unset ) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'ChatServiceSid' => chat_service_sid, 'ChannelType' => channel_type, 'ContactIdentity' => contact_identity, 'Enabled' => enabled, 'IntegrationType' => integration_type, 'Integration.FlowSid' => integration_flow_sid, 'Integration.Url' => integration_url, 'Integration.WorkspaceSid' => integration_workspace_sid, 'Integration.WorkflowSid' => integration_workflow_sid, 'Integration.Channel' => integration_channel, 'Integration.Timeout' => integration_timeout, 'Integration.Priority' => integration_priority, 'Integration.CreationOnMessage' => , 'LongLived' => long_lived, 'JanitorEnabled' => janitor_enabled, 'Integration.RetryCount' => integration_retry_count, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('POST', @uri, data: data, headers: headers) flex_flow_instance = FlexFlowInstance.new( @version, response.body, sid: @solution[:sid], ) FlexFlowInstanceMetadata.new( @version, flex_flow_instance, response.headers, response.status_code ) end |