twilio-api-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +213 -0
- data/bin/console +15 -0
- data/lib/twilio_ap_is/api_helper.rb +10 -0
- data/lib/twilio_ap_is/apis/accounts_v1_auth_token_promotion_api.rb +27 -0
- data/lib/twilio_ap_is/apis/accounts_v1_aws_api.rb +137 -0
- data/lib/twilio_ap_is/apis/accounts_v1_bulk_consents_api.rb +41 -0
- data/lib/twilio_ap_is/apis/accounts_v1_bulk_contacts_api.rb +36 -0
- data/lib/twilio_ap_is/apis/accounts_v1_messaging_geopermissions_api.rb +54 -0
- data/lib/twilio_ap_is/apis/accounts_v1_public_key_api.rb +136 -0
- data/lib/twilio_ap_is/apis/accounts_v1_safelist_api.rb +69 -0
- data/lib/twilio_ap_is/apis/accounts_v1_secondary_auth_token_api.rb +39 -0
- data/lib/twilio_ap_is/apis/base_api.rb +67 -0
- data/lib/twilio_ap_is/apis/chat_v3_channel_api.rb +51 -0
- data/lib/twilio_ap_is/apis/conversations_v1_address_configuration_api.rb +218 -0
- data/lib/twilio_ap_is/apis/conversations_v1_binding_api.rb +116 -0
- data/lib/twilio_ap_is/apis/conversations_v1_configuration_api.rb +133 -0
- data/lib/twilio_ap_is/apis/conversations_v1_conversation_api.rb +550 -0
- data/lib/twilio_ap_is/apis/conversations_v1_conversation_with_participants_api.rb +182 -0
- data/lib/twilio_ap_is/apis/conversations_v1_credential_api.rb +189 -0
- data/lib/twilio_ap_is/apis/conversations_v1_delivery_receipt_api.rb +183 -0
- data/lib/twilio_ap_is/apis/conversations_v1_message_api.rb +497 -0
- data/lib/twilio_ap_is/apis/conversations_v1_notification_api.rb +124 -0
- data/lib/twilio_ap_is/apis/conversations_v1_participant_api.rb +546 -0
- data/lib/twilio_ap_is/apis/conversations_v1_participant_conversation_api.rb +99 -0
- data/lib/twilio_ap_is/apis/conversations_v1_role_api.rb +325 -0
- data/lib/twilio_ap_is/apis/conversations_v1_service_api.rb +98 -0
- data/lib/twilio_ap_is/apis/conversations_v1_user_api.rb +364 -0
- data/lib/twilio_ap_is/apis/conversations_v1_user_conversation_api.rb +335 -0
- data/lib/twilio_ap_is/apis/conversations_v1_webhook_api.rb +561 -0
- data/lib/twilio_ap_is/apis/notify_v1_binding_api.rb +186 -0
- data/lib/twilio_ap_is/apis/notify_v1_credential_api.rb +183 -0
- data/lib/twilio_ap_is/apis/notify_v1_notification_api.rb +174 -0
- data/lib/twilio_ap_is/apis/notify_v1_service_api.rb +262 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_activity_api.rb +177 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_event_api.rb +125 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_api.rb +310 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_channel_api.rb +173 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_api.rb +232 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_bulk_real_time_statistics_api.rb +36 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_cumulative_statistics_api.rb +63 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_real_time_statistics_api.rb +41 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_statistics_api.rb +63 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queues_statistics_api.rb +72 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_reservation_api.rb +396 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_worker_api.rb +232 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_worker_channel_api.rb +126 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_worker_reservation_api.rb +385 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_worker_statistics_api.rb +57 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workers_cumulative_statistics_api.rb +51 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workers_real_time_statistics_api.rb +35 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workers_statistics_api.rb +63 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_api.rb +213 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_cumulative_statistics_api.rb +68 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_real_time_statistics_api.rb +41 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_statistics_api.rb +67 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_api.rb +225 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_cumulative_statistics_api.rb +62 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_real_time_statistics_api.rb +35 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_statistics_api.rb +61 -0
- data/lib/twilio_ap_is/apis/verify_v2_service_api.rb +178 -0
- data/lib/twilio_ap_is/apis/verify_v2_verification_api.rb +143 -0
- data/lib/twilio_ap_is/apis/verify_v2_verification_check_api.rb +61 -0
- data/lib/twilio_ap_is/client.rb +417 -0
- data/lib/twilio_ap_is/configuration.rb +187 -0
- data/lib/twilio_ap_is/exceptions/api_exception.rb +21 -0
- data/lib/twilio_ap_is/exceptions/v2_services_verifications429_error_exception.rb +63 -0
- data/lib/twilio_ap_is/http/api_response.rb +19 -0
- data/lib/twilio_ap_is/http/auth/basic_auth.rb +62 -0
- data/lib/twilio_ap_is/http/http_call_back.rb +10 -0
- data/lib/twilio_ap_is/http/http_method_enum.rb +10 -0
- data/lib/twilio_ap_is/http/http_request.rb +10 -0
- data/lib/twilio_ap_is/http/http_response.rb +10 -0
- data/lib/twilio_ap_is/http/proxy_settings.rb +22 -0
- data/lib/twilio_ap_is/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/twilio_ap_is/logging/sdk_logger.rb +17 -0
- data/lib/twilio_ap_is/models/access_token.rb +188 -0
- data/lib/twilio_ap_is/models/access_token_enum_factor_types.rb +26 -0
- data/lib/twilio_ap_is/models/activity.rb +189 -0
- data/lib/twilio_ap_is/models/auth_token_promotion.rb +142 -0
- data/lib/twilio_ap_is/models/base_model.rb +110 -0
- data/lib/twilio_ap_is/models/binding.rb +269 -0
- data/lib/twilio_ap_is/models/binding_binding_type.rb +53 -0
- data/lib/twilio_ap_is/models/bucket.rb +186 -0
- data/lib/twilio_ap_is/models/bulk_consents.rb +83 -0
- data/lib/twilio_ap_is/models/bulk_contacts.rb +83 -0
- data/lib/twilio_ap_is/models/challenge.rb +317 -0
- data/lib/twilio_ap_is/models/challenge_enum_challenge_reasons.rb +41 -0
- data/lib/twilio_ap_is/models/challenge_enum_challenge_statuses.rb +45 -0
- data/lib/twilio_ap_is/models/challenge_enum_factor_types.rb +41 -0
- data/lib/twilio_ap_is/models/channel.rb +249 -0
- data/lib/twilio_ap_is/models/channel_channel_type.rb +36 -0
- data/lib/twilio_ap_is/models/channel_webhook_enabled_type.rb +36 -0
- data/lib/twilio_ap_is/models/configuration.rb +164 -0
- data/lib/twilio_ap_is/models/configuration_address.rb +199 -0
- data/lib/twilio_ap_is/models/configuration_address_auto_creation_type.rb +40 -0
- data/lib/twilio_ap_is/models/configuration_address_method.rb +36 -0
- data/lib/twilio_ap_is/models/configuration_address_type.rb +60 -0
- data/lib/twilio_ap_is/models/configuration_webhook.rb +154 -0
- data/lib/twilio_ap_is/models/configuration_webhook_method.rb +46 -0
- data/lib/twilio_ap_is/models/configuration_webhook_target.rb +37 -0
- data/lib/twilio_ap_is/models/conversation.rb +264 -0
- data/lib/twilio_ap_is/models/conversation_message.rb +268 -0
- data/lib/twilio_ap_is/models/conversation_message_order_type.rb +36 -0
- data/lib/twilio_ap_is/models/conversation_message_receipt.rb +219 -0
- data/lib/twilio_ap_is/models/conversation_message_receipt_delivery_status.rb +49 -0
- data/lib/twilio_ap_is/models/conversation_participant.rb +240 -0
- data/lib/twilio_ap_is/models/conversation_scoped_webhook.rb +178 -0
- data/lib/twilio_ap_is/models/conversation_scoped_webhook_method.rb +36 -0
- data/lib/twilio_ap_is/models/conversation_scoped_webhook_target.rb +40 -0
- data/lib/twilio_ap_is/models/conversation_state.rb +45 -0
- data/lib/twilio_ap_is/models/conversation_webhook_method.rb +36 -0
- data/lib/twilio_ap_is/models/conversation_webhook_target.rb +37 -0
- data/lib/twilio_ap_is/models/conversation_with_participants.rb +264 -0
- data/lib/twilio_ap_is/models/conversation_with_participants_state.rb +45 -0
- data/lib/twilio_ap_is/models/credential.rb +175 -0
- data/lib/twilio_ap_is/models/credential1.rb +174 -0
- data/lib/twilio_ap_is/models/credential_aws.rb +153 -0
- data/lib/twilio_ap_is/models/credential_public_key.rb +153 -0
- data/lib/twilio_ap_is/models/credential_push_type.rb +41 -0
- data/lib/twilio_ap_is/models/entity.rb +177 -0
- data/lib/twilio_ap_is/models/event.rb +270 -0
- data/lib/twilio_ap_is/models/factor.rb +235 -0
- data/lib/twilio_ap_is/models/factor_enum_factor_statuses.rb +36 -0
- data/lib/twilio_ap_is/models/factor_enum_factor_type.rb +40 -0
- data/lib/twilio_ap_is/models/factor_enum_notification_platforms.rb +40 -0
- data/lib/twilio_ap_is/models/factor_enum_totp_algorithms.rb +40 -0
- data/lib/twilio_ap_is/models/form_enum_form_types.rb +26 -0
- data/lib/twilio_ap_is/models/list_activity_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_binding_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_configuration_address_response.rb +95 -0
- data/lib/twilio_ap_is/models/list_conversation_message_receipt_response.rb +95 -0
- data/lib/twilio_ap_is/models/list_conversation_message_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_conversation_participant_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_conversation_scoped_webhook_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_credential_aws_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_credential_public_key_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_credential_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_event_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_participant_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_role_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_binding_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_conversation_message_receipt_response.rb +95 -0
- data/lib/twilio_ap_is/models/list_service_conversation_message_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_conversation_participant_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_conversation_scoped_webhook_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_participant_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_role_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_user_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_user_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_task_channel_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_task_queue_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_task_queues_statistics_response.rb +95 -0
- data/lib/twilio_ap_is/models/list_task_reservation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_task_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_user_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_user_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_worker_channel_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_worker_reservation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_worker_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_workflow_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_workspace_response.rb +94 -0
- data/lib/twilio_ap_is/models/messaging_configuration.rb +170 -0
- data/lib/twilio_ap_is/models/meta.rb +140 -0
- data/lib/twilio_ap_is/models/msg_geopermissions.rb +86 -0
- data/lib/twilio_ap_is/models/new_factor.rb +277 -0
- data/lib/twilio_ap_is/models/new_factor_enum_factor_statuses.rb +36 -0
- data/lib/twilio_ap_is/models/new_factor_enum_factor_types.rb +40 -0
- data/lib/twilio_ap_is/models/new_factor_enum_notification_platforms.rb +40 -0
- data/lib/twilio_ap_is/models/new_factor_enum_totp_algorithms.rb +40 -0
- data/lib/twilio_ap_is/models/notif_priority.rb +43 -0
- data/lib/twilio_ap_is/models/notification.rb +363 -0
- data/lib/twilio_ap_is/models/notification1.rb +181 -0
- data/lib/twilio_ap_is/models/participant_conversation.rb +325 -0
- data/lib/twilio_ap_is/models/participant_conversation_state.rb +41 -0
- data/lib/twilio_ap_is/models/rate_limit.rb +189 -0
- data/lib/twilio_ap_is/models/role.rb +192 -0
- data/lib/twilio_ap_is/models/role_role_type.rb +40 -0
- data/lib/twilio_ap_is/models/safelist.rb +88 -0
- data/lib/twilio_ap_is/models/safelist1.rb +99 -0
- data/lib/twilio_ap_is/models/secondary_auth_token.rb +145 -0
- data/lib/twilio_ap_is/models/service.rb +164 -0
- data/lib/twilio_ap_is/models/service1.rb +380 -0
- data/lib/twilio_ap_is/models/service2.rb +350 -0
- data/lib/twilio_ap_is/models/service_binding.rb +226 -0
- data/lib/twilio_ap_is/models/service_binding_binding_type.rb +47 -0
- data/lib/twilio_ap_is/models/service_configuration.rb +180 -0
- data/lib/twilio_ap_is/models/service_conversation.rb +264 -0
- data/lib/twilio_ap_is/models/service_conversation_message.rb +282 -0
- data/lib/twilio_ap_is/models/service_conversation_message_order_type.rb +36 -0
- data/lib/twilio_ap_is/models/service_conversation_message_receipt.rb +233 -0
- data/lib/twilio_ap_is/models/service_conversation_message_receipt_delivery_status.rb +49 -0
- data/lib/twilio_ap_is/models/service_conversation_participant.rb +256 -0
- data/lib/twilio_ap_is/models/service_conversation_scoped_webhook.rb +191 -0
- data/lib/twilio_ap_is/models/service_conversation_scoped_webhook_method.rb +36 -0
- data/lib/twilio_ap_is/models/service_conversation_scoped_webhook_target.rb +40 -0
- data/lib/twilio_ap_is/models/service_conversation_state.rb +45 -0
- data/lib/twilio_ap_is/models/service_conversation_with_participants.rb +264 -0
- data/lib/twilio_ap_is/models/service_conversation_with_participants_state.rb +45 -0
- data/lib/twilio_ap_is/models/service_notification.rb +155 -0
- data/lib/twilio_ap_is/models/service_participant_conversation.rb +325 -0
- data/lib/twilio_ap_is/models/service_participant_conversation_state.rb +41 -0
- data/lib/twilio_ap_is/models/service_role.rb +192 -0
- data/lib/twilio_ap_is/models/service_role_role_type.rb +40 -0
- data/lib/twilio_ap_is/models/service_stats_conversations_rate_limiting_errors_source.rb +36 -0
- data/lib/twilio_ap_is/models/service_user.rb +250 -0
- data/lib/twilio_ap_is/models/service_user_conversation.rb +317 -0
- data/lib/twilio_ap_is/models/service_user_conversation_notification_level.rb +37 -0
- data/lib/twilio_ap_is/models/service_user_conversation_state.rb +41 -0
- data/lib/twilio_ap_is/models/service_webhook_configuration.rb +160 -0
- data/lib/twilio_ap_is/models/service_webhook_configuration_method.rb +37 -0
- data/lib/twilio_ap_is/models/stats_twilsock_rate_limiting_errors_source.rb +26 -0
- data/lib/twilio_ap_is/models/task_channel.rb +204 -0
- data/lib/twilio_ap_is/models/task_queue.rb +278 -0
- data/lib/twilio_ap_is/models/task_queue_bulk_real_time_statistics.rb +141 -0
- data/lib/twilio_ap_is/models/task_queue_cumulative.rb +356 -0
- data/lib/twilio_ap_is/models/task_queue_real_time_statistics.rb +250 -0
- data/lib/twilio_ap_is/models/task_queue_statistics.rb +135 -0
- data/lib/twilio_ap_is/models/task_queue_task_order.rb +40 -0
- data/lib/twilio_ap_is/models/task_queues_stats.rb +124 -0
- data/lib/twilio_ap_is/models/task_reservation.rb +210 -0
- data/lib/twilio_ap_is/models/task_reservation_call_status.rb +44 -0
- data/lib/twilio_ap_is/models/task_reservation_conference_event.rb +56 -0
- data/lib/twilio_ap_is/models/task_reservation_status.rb +61 -0
- data/lib/twilio_ap_is/models/task_reservation_supervisor_mode.rb +40 -0
- data/lib/twilio_ap_is/models/task_router_task.rb +394 -0
- data/lib/twilio_ap_is/models/task_status.rb +53 -0
- data/lib/twilio_ap_is/models/user.rb +250 -0
- data/lib/twilio_ap_is/models/user_binding_binding_type.rb +52 -0
- data/lib/twilio_ap_is/models/user_conversation.rb +317 -0
- data/lib/twilio_ap_is/models/user_conversation_notification_level.rb +37 -0
- data/lib/twilio_ap_is/models/user_conversation_state.rb +41 -0
- data/lib/twilio_ap_is/models/v2_form.rb +112 -0
- data/lib/twilio_ap_is/models/verification.rb +262 -0
- data/lib/twilio_ap_is/models/verification_attempt.rb +219 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_attempt_status.rb +40 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_call_status.rb +60 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_channels.rb +49 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_conversion_status.rb +38 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_message_status.rb +80 -0
- data/lib/twilio_ap_is/models/verification_attempts.rb +129 -0
- data/lib/twilio_ap_is/models/verification_attempts_summary_enum_channels.rb +48 -0
- data/lib/twilio_ap_is/models/verification_check.rb +231 -0
- data/lib/twilio_ap_is/models/verification_check_enum_channel.rb +50 -0
- data/lib/twilio_ap_is/models/verification_enum_channel.rb +50 -0
- data/lib/twilio_ap_is/models/verification_enum_risk_check.rb +39 -0
- data/lib/twilio_ap_is/models/verification_enum_status.rb +37 -0
- data/lib/twilio_ap_is/models/verification_template.rb +126 -0
- data/lib/twilio_ap_is/models/webhook.rb +222 -0
- data/lib/twilio_ap_is/models/webhook_enum_status.rb +37 -0
- data/lib/twilio_ap_is/models/webhook_enum_version.rb +37 -0
- data/lib/twilio_ap_is/models/worker.rb +247 -0
- data/lib/twilio_ap_is/models/worker_channel.rb +244 -0
- data/lib/twilio_ap_is/models/worker_instance_statistics.rb +122 -0
- data/lib/twilio_ap_is/models/worker_reservation.rb +210 -0
- data/lib/twilio_ap_is/models/worker_reservation_call_status.rb +44 -0
- data/lib/twilio_ap_is/models/worker_reservation_conference_event.rb +56 -0
- data/lib/twilio_ap_is/models/worker_reservation_status.rb +61 -0
- data/lib/twilio_ap_is/models/worker_statistics.rb +122 -0
- data/lib/twilio_ap_is/models/workers_cumulative_statistics.rb +221 -0
- data/lib/twilio_ap_is/models/workers_real_time_statistics.rb +124 -0
- data/lib/twilio_ap_is/models/workflow.rb +247 -0
- data/lib/twilio_ap_is/models/workflow_cumulative_statistics.rb +347 -0
- data/lib/twilio_ap_is/models/workflow_real_time_statistics.rb +173 -0
- data/lib/twilio_ap_is/models/workflow_statistics.rb +135 -0
- data/lib/twilio_ap_is/models/workspace.rb +285 -0
- data/lib/twilio_ap_is/models/workspace_cumulative_statistics.rb +334 -0
- data/lib/twilio_ap_is/models/workspace_queue_order.rb +40 -0
- data/lib/twilio_ap_is/models/workspace_real_time_statistics.rb +185 -0
- data/lib/twilio_ap_is/models/workspace_statistics.rb +122 -0
- data/lib/twilio_ap_is/utilities/date_time_helper.rb +11 -0
- data/lib/twilio_ap_is/utilities/file_wrapper.rb +28 -0
- data/lib/twilio_ap_is.rb +326 -0
- metadata +361 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# TaskrouterV1TaskApi
|
|
8
|
+
class TaskrouterV1TaskApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# with the Task to fetch.
|
|
12
|
+
# @param [String] sid Required parameter: The SID of the Task resource to
|
|
13
|
+
# fetch.
|
|
14
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
15
|
+
def fetch_task(workspace_sid,
|
|
16
|
+
sid)
|
|
17
|
+
@api_call
|
|
18
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
19
|
+
'/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}',
|
|
20
|
+
Server::DEFAULT4)
|
|
21
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
22
|
+
.is_required(true)
|
|
23
|
+
.should_encode(true))
|
|
24
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
25
|
+
.is_required(true)
|
|
26
|
+
.should_encode(true))
|
|
27
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
28
|
+
.auth(Single.new('accountSid_authToken')))
|
|
29
|
+
.response(new_response_handler
|
|
30
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
31
|
+
.deserialize_into(TaskRouterTask.method(:from_hash))
|
|
32
|
+
.is_api_response(true))
|
|
33
|
+
.execute
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# TODO: type endpoint description here
|
|
37
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
38
|
+
# with the Task to update.
|
|
39
|
+
# @param [String] sid Required parameter: The SID of the Task resource to
|
|
40
|
+
# update.
|
|
41
|
+
# @param [String] if_match Optional parameter: If provided, applies this
|
|
42
|
+
# mutation if (and only if) the
|
|
43
|
+
# [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag)
|
|
44
|
+
# header of the Task matches the provided value. This matches the semantics
|
|
45
|
+
# of (and is implemented with) the HTTP [If-Match
|
|
46
|
+
# header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match
|
|
47
|
+
# ).
|
|
48
|
+
# @param [String] attributes Optional parameter: The JSON string that
|
|
49
|
+
# describes the custom attributes of the task.
|
|
50
|
+
# @param [TaskStatus] assignment_status Optional parameter: The current
|
|
51
|
+
# status of the Task's assignment. Can be: `pending`, `reserved`,
|
|
52
|
+
# `assigned`, `canceled`, `wrapping`, or `completed`.
|
|
53
|
+
# @param [String] reason Optional parameter: The reason that the Task was
|
|
54
|
+
# canceled or completed. This parameter is required only if the Task is
|
|
55
|
+
# canceled or completed. Setting this value queues the task for deletion and
|
|
56
|
+
# logs the reason.
|
|
57
|
+
# @param [Integer] priority Optional parameter: The Task's new priority
|
|
58
|
+
# value. When supplied, the Task takes on the specified priority unless it
|
|
59
|
+
# matches a Workflow Target with a Priority set. Value can be 0 to 2^31^
|
|
60
|
+
# (2,147,483,647).
|
|
61
|
+
# @param [String] task_channel Optional parameter: When MultiTasking is
|
|
62
|
+
# enabled, specify the TaskChannel with the task to update. Can be the
|
|
63
|
+
# TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or
|
|
64
|
+
# `default`.
|
|
65
|
+
# @param [DateTime] virtual_start_time Optional parameter: The task's new
|
|
66
|
+
# virtual start time value. When supplied, the Task takes on the specified
|
|
67
|
+
# virtual start time. Value can't be in the future or before the year of
|
|
68
|
+
# 1900.
|
|
69
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
70
|
+
def update_task(workspace_sid,
|
|
71
|
+
sid,
|
|
72
|
+
if_match: nil,
|
|
73
|
+
attributes: nil,
|
|
74
|
+
assignment_status: nil,
|
|
75
|
+
reason: nil,
|
|
76
|
+
priority: nil,
|
|
77
|
+
task_channel: nil,
|
|
78
|
+
virtual_start_time: nil)
|
|
79
|
+
@api_call
|
|
80
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
81
|
+
'/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}',
|
|
82
|
+
Server::DEFAULT4)
|
|
83
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
84
|
+
.is_required(true)
|
|
85
|
+
.should_encode(true))
|
|
86
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
87
|
+
.is_required(true)
|
|
88
|
+
.should_encode(true))
|
|
89
|
+
.header_param(new_parameter(if_match, key: 'If-Match'))
|
|
90
|
+
.form_param(new_parameter(attributes, key: 'Attributes'))
|
|
91
|
+
.form_param(new_parameter(assignment_status, key: 'AssignmentStatus'))
|
|
92
|
+
.form_param(new_parameter(reason, key: 'Reason'))
|
|
93
|
+
.form_param(new_parameter(priority, key: 'Priority'))
|
|
94
|
+
.form_param(new_parameter(task_channel, key: 'TaskChannel'))
|
|
95
|
+
.form_param(new_parameter(virtual_start_time, key: 'VirtualStartTime'))
|
|
96
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
97
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
98
|
+
.auth(Single.new('accountSid_authToken')))
|
|
99
|
+
.response(new_response_handler
|
|
100
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
101
|
+
.deserialize_into(TaskRouterTask.method(:from_hash))
|
|
102
|
+
.is_api_response(true))
|
|
103
|
+
.execute
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# TODO: type endpoint description here
|
|
107
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
108
|
+
# with the Task to delete.
|
|
109
|
+
# @param [String] sid Required parameter: The SID of the Task resource to
|
|
110
|
+
# delete.
|
|
111
|
+
# @param [String] if_match Optional parameter: If provided, deletes this
|
|
112
|
+
# Task if (and only if) the
|
|
113
|
+
# [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag)
|
|
114
|
+
# header of the Task matches the provided value. This matches the semantics
|
|
115
|
+
# of (and is implemented with) the HTTP [If-Match
|
|
116
|
+
# header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match
|
|
117
|
+
# ).
|
|
118
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
119
|
+
def delete_task(workspace_sid,
|
|
120
|
+
sid,
|
|
121
|
+
if_match: nil)
|
|
122
|
+
@api_call
|
|
123
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
124
|
+
'/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}',
|
|
125
|
+
Server::DEFAULT4)
|
|
126
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
127
|
+
.is_required(true)
|
|
128
|
+
.should_encode(true))
|
|
129
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
130
|
+
.is_required(true)
|
|
131
|
+
.should_encode(true))
|
|
132
|
+
.header_param(new_parameter(if_match, key: 'If-Match'))
|
|
133
|
+
.auth(Single.new('accountSid_authToken')))
|
|
134
|
+
.response(new_response_handler
|
|
135
|
+
.is_response_void(true)
|
|
136
|
+
.is_api_response(true))
|
|
137
|
+
.execute
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# TODO: type endpoint description here
|
|
141
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
142
|
+
# with the Tasks to read.
|
|
143
|
+
# @param [Integer] priority Optional parameter: The priority value of the
|
|
144
|
+
# Tasks to read. Returns the list of all Tasks in the Workspace with the
|
|
145
|
+
# specified priority.
|
|
146
|
+
# @param [Array[String]] assignment_status Optional parameter: The
|
|
147
|
+
# `assignment_status` of the Tasks you want to read. Can be: `pending`,
|
|
148
|
+
# `reserved`, `assigned`, `canceled`, `wrapping`, or `completed`. Returns
|
|
149
|
+
# all Tasks in the Workspace with the specified `assignment_status`.
|
|
150
|
+
# @param [String] workflow_sid Optional parameter: The SID of the Workflow
|
|
151
|
+
# with the Tasks to read. Returns the Tasks controlled by the Workflow
|
|
152
|
+
# identified by this SID.
|
|
153
|
+
# @param [String] workflow_name Optional parameter: The friendly name of the
|
|
154
|
+
# Workflow with the Tasks to read. Returns the Tasks controlled by the
|
|
155
|
+
# Workflow identified by this friendly name.
|
|
156
|
+
# @param [String] task_queue_sid Optional parameter: The SID of the
|
|
157
|
+
# TaskQueue with the Tasks to read. Returns the Tasks waiting in the
|
|
158
|
+
# TaskQueue identified by this SID.
|
|
159
|
+
# @param [String] task_queue_name Optional parameter: The `friendly_name` of
|
|
160
|
+
# the TaskQueue with the Tasks to read. Returns the Tasks waiting in the
|
|
161
|
+
# TaskQueue identified by this friendly name.
|
|
162
|
+
# @param [String] evaluate_task_attributes Optional parameter: The
|
|
163
|
+
# attributes of the Tasks to read. Returns the Tasks that match the
|
|
164
|
+
# attributes specified in this parameter.
|
|
165
|
+
# @param [String] routing_target Optional parameter: A SID of a Worker,
|
|
166
|
+
# Queue, or Workflow to route a Task to
|
|
167
|
+
# @param [String] ordering Optional parameter: How to order the returned
|
|
168
|
+
# Task resources. By default, Tasks are sorted by ascending DateCreated.
|
|
169
|
+
# This value is specified as: `Attribute:Order`, where `Attribute` can be
|
|
170
|
+
# either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be
|
|
171
|
+
# either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered
|
|
172
|
+
# in descending order of their Priority. Pairings of sort orders can be
|
|
173
|
+
# specified in a comma-separated list such as
|
|
174
|
+
# `Priority:desc,DateCreated:asc`, which returns the Tasks in descending
|
|
175
|
+
# Priority order and ascending DateCreated Order. The only ordering pairing
|
|
176
|
+
# not allowed is DateCreated and VirtualStartTime.
|
|
177
|
+
# @param [TrueClass | FalseClass] has_addons Optional parameter: Whether to
|
|
178
|
+
# read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If
|
|
179
|
+
# `false`, returns only Tasks without Add-ons.
|
|
180
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
181
|
+
# return in each list page. The default is 50, and the maximum is 1000.
|
|
182
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
183
|
+
# simply for client state.
|
|
184
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
185
|
+
# provided by the API.
|
|
186
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
187
|
+
def list_task(workspace_sid,
|
|
188
|
+
priority: nil,
|
|
189
|
+
assignment_status: nil,
|
|
190
|
+
workflow_sid: nil,
|
|
191
|
+
workflow_name: nil,
|
|
192
|
+
task_queue_sid: nil,
|
|
193
|
+
task_queue_name: nil,
|
|
194
|
+
evaluate_task_attributes: nil,
|
|
195
|
+
routing_target: nil,
|
|
196
|
+
ordering: nil,
|
|
197
|
+
has_addons: nil,
|
|
198
|
+
page_size: nil,
|
|
199
|
+
page: nil,
|
|
200
|
+
page_token: nil)
|
|
201
|
+
@api_call
|
|
202
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
203
|
+
'/v1/Workspaces/{WorkspaceSid}/Tasks',
|
|
204
|
+
Server::DEFAULT4)
|
|
205
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
206
|
+
.is_required(true)
|
|
207
|
+
.should_encode(true))
|
|
208
|
+
.query_param(new_parameter(priority, key: 'Priority'))
|
|
209
|
+
.query_param(new_parameter(assignment_status, key: 'AssignmentStatus'))
|
|
210
|
+
.query_param(new_parameter(workflow_sid, key: 'WorkflowSid'))
|
|
211
|
+
.query_param(new_parameter(workflow_name, key: 'WorkflowName'))
|
|
212
|
+
.query_param(new_parameter(task_queue_sid, key: 'TaskQueueSid'))
|
|
213
|
+
.query_param(new_parameter(task_queue_name, key: 'TaskQueueName'))
|
|
214
|
+
.query_param(new_parameter(evaluate_task_attributes, key: 'EvaluateTaskAttributes'))
|
|
215
|
+
.query_param(new_parameter(routing_target, key: 'RoutingTarget'))
|
|
216
|
+
.query_param(new_parameter(ordering, key: 'Ordering'))
|
|
217
|
+
.query_param(new_parameter(has_addons, key: 'HasAddons'))
|
|
218
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
219
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
220
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
221
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
222
|
+
.auth(Single.new('accountSid_authToken')))
|
|
223
|
+
.response(new_response_handler
|
|
224
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
225
|
+
.deserialize_into(ListTaskResponse.method(:from_hash))
|
|
226
|
+
.is_api_response(true))
|
|
227
|
+
.execute
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# TODO: type endpoint description here
|
|
231
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
232
|
+
# that the new Task belongs to.
|
|
233
|
+
# @param [Integer] timeout Optional parameter: The amount of time in seconds
|
|
234
|
+
# the new task can live before being assigned. Can be up to a maximum of 2
|
|
235
|
+
# weeks (1,209,600 seconds). The default value is 24 hours (86,400 seconds).
|
|
236
|
+
# On timeout, the `task.canceled` event will fire with description `Task TTL
|
|
237
|
+
# Exceeded`.
|
|
238
|
+
# @param [Integer] priority Optional parameter: The priority to assign the
|
|
239
|
+
# new task and override the default. When supplied, the new Task will have
|
|
240
|
+
# this priority unless it matches a Workflow Target with a Priority set.
|
|
241
|
+
# When not supplied, the new Task will have the priority of the matching
|
|
242
|
+
# Workflow Target. Value can be 0 to 2^31^ (2,147,483,647).
|
|
243
|
+
# @param [String] task_channel Optional parameter: When MultiTasking is
|
|
244
|
+
# enabled, specify the TaskChannel by passing either its `unique_name` or
|
|
245
|
+
# `sid`. Default value is `default`.
|
|
246
|
+
# @param [String] workflow_sid Optional parameter: The SID of the Workflow
|
|
247
|
+
# that you would like to handle routing for the new Task. If there is only
|
|
248
|
+
# one Workflow defined for the Workspace that you are posting the new task
|
|
249
|
+
# to, this parameter is optional.
|
|
250
|
+
# @param [String] attributes Optional parameter: A JSON string with the
|
|
251
|
+
# attributes of the new task. This value is passed to the Workflow's
|
|
252
|
+
# `assignment_callback_url` when the Task is assigned to a Worker. For
|
|
253
|
+
# example: `{ "task_type": "call", "twilio_call_sid": "CAxxx",
|
|
254
|
+
# "customer_ticket_number": "12345" }`.
|
|
255
|
+
# @param [DateTime] virtual_start_time Optional parameter: The virtual start
|
|
256
|
+
# time to assign the new task and override the default. When supplied, the
|
|
257
|
+
# new task will have this virtual start time. When not supplied, the new
|
|
258
|
+
# task will have the virtual start time equal to `date_created`. Value can't
|
|
259
|
+
# be in the future or before the year of 1900.
|
|
260
|
+
# @param [String] routing_target Optional parameter: A SID of a Worker,
|
|
261
|
+
# Queue, or Workflow to route a Task to
|
|
262
|
+
# @param [String] ignore_capacity Optional parameter: A boolean that
|
|
263
|
+
# indicates if the Task should respect a Worker's capacity and availability
|
|
264
|
+
# during assignment. This field can only be used when the `RoutingTarget`
|
|
265
|
+
# field is set to a Worker SID. By setting `IgnoreCapacity` to a value of
|
|
266
|
+
# `true`, `1`, or `yes`, the Task will be routed to the Worker without
|
|
267
|
+
# respecting their capacity and availability. Any other value will enforce
|
|
268
|
+
# the Worker's capacity and availability. The default value of
|
|
269
|
+
# `IgnoreCapacity` is `true` when the `RoutingTarget` is set to a Worker
|
|
270
|
+
# SID.
|
|
271
|
+
# @param [String] task_queue_sid Optional parameter: The SID of the
|
|
272
|
+
# TaskQueue in which the Task belongs
|
|
273
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
274
|
+
def create_task(workspace_sid,
|
|
275
|
+
timeout: nil,
|
|
276
|
+
priority: nil,
|
|
277
|
+
task_channel: nil,
|
|
278
|
+
workflow_sid: nil,
|
|
279
|
+
attributes: nil,
|
|
280
|
+
virtual_start_time: nil,
|
|
281
|
+
routing_target: nil,
|
|
282
|
+
ignore_capacity: nil,
|
|
283
|
+
task_queue_sid: nil)
|
|
284
|
+
@api_call
|
|
285
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
286
|
+
'/v1/Workspaces/{WorkspaceSid}/Tasks',
|
|
287
|
+
Server::DEFAULT4)
|
|
288
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
289
|
+
.is_required(true)
|
|
290
|
+
.should_encode(true))
|
|
291
|
+
.form_param(new_parameter(timeout, key: 'Timeout'))
|
|
292
|
+
.form_param(new_parameter(priority, key: 'Priority'))
|
|
293
|
+
.form_param(new_parameter(task_channel, key: 'TaskChannel'))
|
|
294
|
+
.form_param(new_parameter(workflow_sid, key: 'WorkflowSid'))
|
|
295
|
+
.form_param(new_parameter(attributes, key: 'Attributes'))
|
|
296
|
+
.form_param(new_parameter(virtual_start_time, key: 'VirtualStartTime'))
|
|
297
|
+
.form_param(new_parameter(routing_target, key: 'RoutingTarget'))
|
|
298
|
+
.form_param(new_parameter(ignore_capacity, key: 'IgnoreCapacity'))
|
|
299
|
+
.form_param(new_parameter(task_queue_sid, key: 'TaskQueueSid'))
|
|
300
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
301
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
302
|
+
.auth(Single.new('accountSid_authToken')))
|
|
303
|
+
.response(new_response_handler
|
|
304
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
305
|
+
.deserialize_into(TaskRouterTask.method(:from_hash))
|
|
306
|
+
.is_api_response(true))
|
|
307
|
+
.execute
|
|
308
|
+
end
|
|
309
|
+
end
|
|
310
|
+
end
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# TaskrouterV1TaskChannelApi
|
|
8
|
+
class TaskrouterV1TaskChannelApi < BaseApi
|
|
9
|
+
# Types of tasks
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# with the Task Channel to fetch.
|
|
12
|
+
# @param [String] sid Required parameter: The SID of the Task Channel
|
|
13
|
+
# resource to fetch.
|
|
14
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
15
|
+
def fetch_task_channel(workspace_sid,
|
|
16
|
+
sid)
|
|
17
|
+
@api_call
|
|
18
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
19
|
+
'/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}',
|
|
20
|
+
Server::DEFAULT4)
|
|
21
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
22
|
+
.is_required(true)
|
|
23
|
+
.should_encode(true))
|
|
24
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
25
|
+
.is_required(true)
|
|
26
|
+
.should_encode(true))
|
|
27
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
28
|
+
.auth(Single.new('accountSid_authToken')))
|
|
29
|
+
.response(new_response_handler
|
|
30
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
31
|
+
.deserialize_into(TaskChannel.method(:from_hash))
|
|
32
|
+
.is_api_response(true))
|
|
33
|
+
.execute
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Types of tasks
|
|
37
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
38
|
+
# with the Task Channel to update.
|
|
39
|
+
# @param [String] sid Required parameter: The SID of the Task Channel
|
|
40
|
+
# resource to update.
|
|
41
|
+
# @param [String] friendly_name Optional parameter: A descriptive string
|
|
42
|
+
# that you create to describe the Task Channel. It can be up to 64
|
|
43
|
+
# characters long.
|
|
44
|
+
# @param [TrueClass | FalseClass] channel_optimized_routing Optional
|
|
45
|
+
# parameter: Whether the TaskChannel should prioritize Workers that have
|
|
46
|
+
# been idle. If `true`, Workers that have been idle the longest are
|
|
47
|
+
# prioritized.
|
|
48
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
49
|
+
def update_task_channel(workspace_sid,
|
|
50
|
+
sid,
|
|
51
|
+
friendly_name: nil,
|
|
52
|
+
channel_optimized_routing: nil)
|
|
53
|
+
@api_call
|
|
54
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
55
|
+
'/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}',
|
|
56
|
+
Server::DEFAULT4)
|
|
57
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
58
|
+
.is_required(true)
|
|
59
|
+
.should_encode(true))
|
|
60
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
61
|
+
.is_required(true)
|
|
62
|
+
.should_encode(true))
|
|
63
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
64
|
+
.form_param(new_parameter(channel_optimized_routing, key: 'ChannelOptimizedRouting'))
|
|
65
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
66
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
67
|
+
.auth(Single.new('accountSid_authToken')))
|
|
68
|
+
.response(new_response_handler
|
|
69
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
70
|
+
.deserialize_into(TaskChannel.method(:from_hash))
|
|
71
|
+
.is_api_response(true))
|
|
72
|
+
.execute
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Types of tasks
|
|
76
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
77
|
+
# with the Task Channel to delete.
|
|
78
|
+
# @param [String] sid Required parameter: The SID of the Task Channel
|
|
79
|
+
# resource to delete.
|
|
80
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
81
|
+
def delete_task_channel(workspace_sid,
|
|
82
|
+
sid)
|
|
83
|
+
@api_call
|
|
84
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
85
|
+
'/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}',
|
|
86
|
+
Server::DEFAULT4)
|
|
87
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
88
|
+
.is_required(true)
|
|
89
|
+
.should_encode(true))
|
|
90
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
91
|
+
.is_required(true)
|
|
92
|
+
.should_encode(true))
|
|
93
|
+
.auth(Single.new('accountSid_authToken')))
|
|
94
|
+
.response(new_response_handler
|
|
95
|
+
.is_response_void(true)
|
|
96
|
+
.is_api_response(true))
|
|
97
|
+
.execute
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Types of tasks
|
|
101
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
102
|
+
# with the Task Channel to read.
|
|
103
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
104
|
+
# return in each list page. The default is 50, and the maximum is 1000.
|
|
105
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
106
|
+
# simply for client state.
|
|
107
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
108
|
+
# provided by the API.
|
|
109
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
110
|
+
def list_task_channel(workspace_sid,
|
|
111
|
+
page_size: nil,
|
|
112
|
+
page: nil,
|
|
113
|
+
page_token: nil)
|
|
114
|
+
@api_call
|
|
115
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
116
|
+
'/v1/Workspaces/{WorkspaceSid}/TaskChannels',
|
|
117
|
+
Server::DEFAULT4)
|
|
118
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
119
|
+
.is_required(true)
|
|
120
|
+
.should_encode(true))
|
|
121
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
122
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
123
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
124
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
125
|
+
.auth(Single.new('accountSid_authToken')))
|
|
126
|
+
.response(new_response_handler
|
|
127
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
128
|
+
.deserialize_into(ListTaskChannelResponse.method(:from_hash))
|
|
129
|
+
.is_api_response(true))
|
|
130
|
+
.execute
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Types of tasks
|
|
134
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
135
|
+
# that the new Task Channel belongs to.
|
|
136
|
+
# @param [String] friendly_name Required parameter: A descriptive string
|
|
137
|
+
# that you create to describe the Task Channel. It can be up to 64
|
|
138
|
+
# characters long.
|
|
139
|
+
# @param [String] unique_name Required parameter: An application-defined
|
|
140
|
+
# string that uniquely identifies the Task Channel, such as `voice` or
|
|
141
|
+
# `sms`.
|
|
142
|
+
# @param [TrueClass | FalseClass] channel_optimized_routing Optional
|
|
143
|
+
# parameter: Whether the Task Channel should prioritize Workers that have
|
|
144
|
+
# been idle. If `true`, Workers that have been idle the longest are
|
|
145
|
+
# prioritized.
|
|
146
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
147
|
+
def create_task_channel(workspace_sid,
|
|
148
|
+
friendly_name,
|
|
149
|
+
unique_name,
|
|
150
|
+
channel_optimized_routing: nil)
|
|
151
|
+
@api_call
|
|
152
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
153
|
+
'/v1/Workspaces/{WorkspaceSid}/TaskChannels',
|
|
154
|
+
Server::DEFAULT4)
|
|
155
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
156
|
+
.is_required(true)
|
|
157
|
+
.should_encode(true))
|
|
158
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName')
|
|
159
|
+
.is_required(true))
|
|
160
|
+
.form_param(new_parameter(unique_name, key: 'UniqueName')
|
|
161
|
+
.is_required(true))
|
|
162
|
+
.form_param(new_parameter(channel_optimized_routing, key: 'ChannelOptimizedRouting'))
|
|
163
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
164
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
165
|
+
.auth(Single.new('accountSid_authToken')))
|
|
166
|
+
.response(new_response_handler
|
|
167
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
168
|
+
.deserialize_into(TaskChannel.method(:from_hash))
|
|
169
|
+
.is_api_response(true))
|
|
170
|
+
.execute
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
end
|