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,232 @@
|
|
|
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
|
+
# TaskrouterV1TaskQueueApi
|
|
8
|
+
class TaskrouterV1TaskQueueApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# with the TaskQueue to fetch.
|
|
12
|
+
# @param [String] sid Required parameter: The SID of the TaskQueue resource
|
|
13
|
+
# to fetch.
|
|
14
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
15
|
+
def fetch_task_queue(workspace_sid,
|
|
16
|
+
sid)
|
|
17
|
+
@api_call
|
|
18
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
19
|
+
'/v1/Workspaces/{WorkspaceSid}/TaskQueues/{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(TaskQueue.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 TaskQueue to update.
|
|
39
|
+
# @param [String] sid Required parameter: The SID of the TaskQueue resource
|
|
40
|
+
# to update.
|
|
41
|
+
# @param [String] friendly_name Optional parameter: A descriptive string
|
|
42
|
+
# that you create to describe the TaskQueue. For example `Support-Tier 1`,
|
|
43
|
+
# `Sales`, or `Escalation`.
|
|
44
|
+
# @param [String] target_workers Optional parameter: A string describing the
|
|
45
|
+
# Worker selection criteria for any Tasks that enter the TaskQueue. For
|
|
46
|
+
# example '"language" == "spanish"' If no TargetWorkers parameter is
|
|
47
|
+
# provided, Tasks will wait in the queue until they are either deleted or
|
|
48
|
+
# moved to another queue. Additional examples on how to describing Worker
|
|
49
|
+
# selection criteria below.
|
|
50
|
+
# @param [String] reservation_activity_sid Optional parameter: The SID of
|
|
51
|
+
# the Activity to assign Workers when a task is reserved for them.
|
|
52
|
+
# @param [String] assignment_activity_sid Optional parameter: The SID of the
|
|
53
|
+
# Activity to assign Workers when a task is assigned for them.
|
|
54
|
+
# @param [Integer] max_reserved_workers Optional parameter: The maximum
|
|
55
|
+
# number of Workers to create reservations for the assignment of a task
|
|
56
|
+
# while in the queue. Maximum of 50.
|
|
57
|
+
# @param [TaskQueueTaskOrder] task_order Optional parameter: How Tasks will
|
|
58
|
+
# be assigned to Workers. Set this parameter to `LIFO` to assign most
|
|
59
|
+
# recently created Task first or `FIFO` to assign the oldest Task. Default
|
|
60
|
+
# is FIFO. [Click
|
|
61
|
+
# here](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out
|
|
62
|
+
# -lifo) to learn more.
|
|
63
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
64
|
+
def update_task_queue(workspace_sid,
|
|
65
|
+
sid,
|
|
66
|
+
friendly_name: nil,
|
|
67
|
+
target_workers: nil,
|
|
68
|
+
reservation_activity_sid: nil,
|
|
69
|
+
assignment_activity_sid: nil,
|
|
70
|
+
max_reserved_workers: nil,
|
|
71
|
+
task_order: nil)
|
|
72
|
+
@api_call
|
|
73
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
74
|
+
'/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}',
|
|
75
|
+
Server::DEFAULT4)
|
|
76
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
77
|
+
.is_required(true)
|
|
78
|
+
.should_encode(true))
|
|
79
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
80
|
+
.is_required(true)
|
|
81
|
+
.should_encode(true))
|
|
82
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
83
|
+
.form_param(new_parameter(target_workers, key: 'TargetWorkers'))
|
|
84
|
+
.form_param(new_parameter(reservation_activity_sid, key: 'ReservationActivitySid'))
|
|
85
|
+
.form_param(new_parameter(assignment_activity_sid, key: 'AssignmentActivitySid'))
|
|
86
|
+
.form_param(new_parameter(max_reserved_workers, key: 'MaxReservedWorkers'))
|
|
87
|
+
.form_param(new_parameter(task_order, key: 'TaskOrder'))
|
|
88
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
89
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
90
|
+
.auth(Single.new('accountSid_authToken')))
|
|
91
|
+
.response(new_response_handler
|
|
92
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
93
|
+
.deserialize_into(TaskQueue.method(:from_hash))
|
|
94
|
+
.is_api_response(true))
|
|
95
|
+
.execute
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# TODO: type endpoint description here
|
|
99
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
100
|
+
# with the TaskQueue to delete.
|
|
101
|
+
# @param [String] sid Required parameter: The SID of the TaskQueue resource
|
|
102
|
+
# to delete.
|
|
103
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
104
|
+
def delete_task_queue(workspace_sid,
|
|
105
|
+
sid)
|
|
106
|
+
@api_call
|
|
107
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
108
|
+
'/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}',
|
|
109
|
+
Server::DEFAULT4)
|
|
110
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
111
|
+
.is_required(true)
|
|
112
|
+
.should_encode(true))
|
|
113
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
114
|
+
.is_required(true)
|
|
115
|
+
.should_encode(true))
|
|
116
|
+
.auth(Single.new('accountSid_authToken')))
|
|
117
|
+
.response(new_response_handler
|
|
118
|
+
.is_response_void(true)
|
|
119
|
+
.is_api_response(true))
|
|
120
|
+
.execute
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# TODO: type endpoint description here
|
|
124
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
125
|
+
# with the TaskQueue to read.
|
|
126
|
+
# @param [String] friendly_name Optional parameter: The `friendly_name` of
|
|
127
|
+
# the TaskQueue resources to read.
|
|
128
|
+
# @param [String] evaluate_worker_attributes Optional parameter: The
|
|
129
|
+
# attributes of the Workers to read. Returns the TaskQueues with Workers
|
|
130
|
+
# that match the attributes specified in this parameter.
|
|
131
|
+
# @param [String] worker_sid Optional parameter: The SID of the Worker with
|
|
132
|
+
# the TaskQueue resources to read.
|
|
133
|
+
# @param [String] ordering Optional parameter: Sorting parameter for
|
|
134
|
+
# TaskQueues
|
|
135
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
136
|
+
# return in each list page. The default is 50, and the maximum is 1000.
|
|
137
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
138
|
+
# simply for client state.
|
|
139
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
140
|
+
# provided by the API.
|
|
141
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
142
|
+
def list_task_queue(workspace_sid,
|
|
143
|
+
friendly_name: nil,
|
|
144
|
+
evaluate_worker_attributes: nil,
|
|
145
|
+
worker_sid: nil,
|
|
146
|
+
ordering: nil,
|
|
147
|
+
page_size: nil,
|
|
148
|
+
page: nil,
|
|
149
|
+
page_token: nil)
|
|
150
|
+
@api_call
|
|
151
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
152
|
+
'/v1/Workspaces/{WorkspaceSid}/TaskQueues',
|
|
153
|
+
Server::DEFAULT4)
|
|
154
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
155
|
+
.is_required(true)
|
|
156
|
+
.should_encode(true))
|
|
157
|
+
.query_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
158
|
+
.query_param(new_parameter(evaluate_worker_attributes, key: 'EvaluateWorkerAttributes'))
|
|
159
|
+
.query_param(new_parameter(worker_sid, key: 'WorkerSid'))
|
|
160
|
+
.query_param(new_parameter(ordering, key: 'Ordering'))
|
|
161
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
162
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
163
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
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(ListTaskQueueResponse.method(:from_hash))
|
|
169
|
+
.is_api_response(true))
|
|
170
|
+
.execute
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# TODO: type endpoint description here
|
|
174
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
175
|
+
# that the new TaskQueue belongs to.
|
|
176
|
+
# @param [String] friendly_name Required parameter: A descriptive string
|
|
177
|
+
# that you create to describe the TaskQueue. For example `Support-Tier 1`,
|
|
178
|
+
# `Sales`, or `Escalation`.
|
|
179
|
+
# @param [String] target_workers Optional parameter: A string that describes
|
|
180
|
+
# the Worker selection criteria for any Tasks that enter the TaskQueue. For
|
|
181
|
+
# example, `'"language" == "spanish"'`. The default value is `1==1`. If this
|
|
182
|
+
# value is empty, Tasks will wait in the TaskQueue until they are deleted or
|
|
183
|
+
# moved to another TaskQueue. For more information about Worker selection,
|
|
184
|
+
# see [Describing Worker selection
|
|
185
|
+
# criteria](https://www.twilio.com/docs/taskrouter/api/taskqueues#target-wor
|
|
186
|
+
# kers).
|
|
187
|
+
# @param [Integer] max_reserved_workers Optional parameter: The maximum
|
|
188
|
+
# number of Workers to reserve for the assignment of a Task in the queue.
|
|
189
|
+
# Can be an integer between 1 and 50, inclusive and defaults to 1.
|
|
190
|
+
# @param [TaskQueueTaskOrder] task_order Optional parameter: How Tasks will
|
|
191
|
+
# be assigned to Workers. Set this parameter to `LIFO` to assign most
|
|
192
|
+
# recently created Task first or `FIFO` to assign the oldest Task. Default
|
|
193
|
+
# is FIFO. [Click
|
|
194
|
+
# here](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out
|
|
195
|
+
# -lifo) to learn more.
|
|
196
|
+
# @param [String] reservation_activity_sid Optional parameter: The SID of
|
|
197
|
+
# the Activity to assign Workers when a task is reserved for them.
|
|
198
|
+
# @param [String] assignment_activity_sid Optional parameter: The SID of the
|
|
199
|
+
# Activity to assign Workers when a task is assigned to them.
|
|
200
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
201
|
+
def create_task_queue(workspace_sid,
|
|
202
|
+
friendly_name,
|
|
203
|
+
target_workers: nil,
|
|
204
|
+
max_reserved_workers: nil,
|
|
205
|
+
task_order: nil,
|
|
206
|
+
reservation_activity_sid: nil,
|
|
207
|
+
assignment_activity_sid: nil)
|
|
208
|
+
@api_call
|
|
209
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
210
|
+
'/v1/Workspaces/{WorkspaceSid}/TaskQueues',
|
|
211
|
+
Server::DEFAULT4)
|
|
212
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
213
|
+
.is_required(true)
|
|
214
|
+
.should_encode(true))
|
|
215
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName')
|
|
216
|
+
.is_required(true))
|
|
217
|
+
.form_param(new_parameter(target_workers, key: 'TargetWorkers'))
|
|
218
|
+
.form_param(new_parameter(max_reserved_workers, key: 'MaxReservedWorkers'))
|
|
219
|
+
.form_param(new_parameter(task_order, key: 'TaskOrder'))
|
|
220
|
+
.form_param(new_parameter(reservation_activity_sid, key: 'ReservationActivitySid'))
|
|
221
|
+
.form_param(new_parameter(assignment_activity_sid, key: 'AssignmentActivitySid'))
|
|
222
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
223
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
224
|
+
.auth(Single.new('accountSid_authToken')))
|
|
225
|
+
.response(new_response_handler
|
|
226
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
227
|
+
.deserialize_into(TaskQueue.method(:from_hash))
|
|
228
|
+
.is_api_response(true))
|
|
229
|
+
.execute
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
# TaskrouterV1TaskQueueBulkRealTimeStatisticsApi
|
|
8
|
+
class TaskrouterV1TaskQueueBulkRealTimeStatisticsApi < BaseApi
|
|
9
|
+
# Fetch a Task Queue Real Time Statistics in bulk for the array of TaskQueue
|
|
10
|
+
# SIDs, support upto 50 in a request.
|
|
11
|
+
# @param [String] workspace_sid Required parameter: The unique SID
|
|
12
|
+
# identifier of the Workspace.
|
|
13
|
+
# @param [Object] body Optional parameter: TODO: type description here
|
|
14
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
15
|
+
def create_task_queue_bulk_real_time_statistics(workspace_sid,
|
|
16
|
+
body: nil)
|
|
17
|
+
@api_call
|
|
18
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
19
|
+
'/v1/Workspaces/{WorkspaceSid}/TaskQueues/RealTimeStatistics',
|
|
20
|
+
Server::DEFAULT4)
|
|
21
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
22
|
+
.is_required(true)
|
|
23
|
+
.should_encode(true))
|
|
24
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
25
|
+
.body_param(new_parameter(body))
|
|
26
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
27
|
+
.body_serializer(APIHelper.method(:json_serialize))
|
|
28
|
+
.auth(Single.new('accountSid_authToken')))
|
|
29
|
+
.response(new_response_handler
|
|
30
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
31
|
+
.deserialize_into(TaskQueueBulkRealTimeStatistics.method(:from_hash))
|
|
32
|
+
.is_api_response(true))
|
|
33
|
+
.execute
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
# TaskrouterV1TaskQueueCumulativeStatisticsApi
|
|
8
|
+
class TaskrouterV1TaskQueueCumulativeStatisticsApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# with the TaskQueue to fetch.
|
|
12
|
+
# @param [String] task_queue_sid Required parameter: The SID of the
|
|
13
|
+
# TaskQueue for which to fetch statistics.
|
|
14
|
+
# @param [DateTime] end_date Optional parameter: Only calculate statistics
|
|
15
|
+
# from this date and time and earlier, specified in GMT as an [ISO
|
|
16
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
|
|
17
|
+
# @param [Integer] minutes Optional parameter: Only calculate statistics
|
|
18
|
+
# since this many minutes in the past. The default is 15 minutes.
|
|
19
|
+
# @param [DateTime] start_date Optional parameter: Only calculate statistics
|
|
20
|
+
# from this date and time and later, specified in [ISO
|
|
21
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
22
|
+
# @param [String] task_channel Optional parameter: Only calculate cumulative
|
|
23
|
+
# statistics on this TaskChannel. Can be the TaskChannel's SID or its
|
|
24
|
+
# `unique_name`, such as `voice`, `sms`, or `default`.
|
|
25
|
+
# @param [String] split_by_wait_time Optional parameter: A comma separated
|
|
26
|
+
# list of values that describes the thresholds, in seconds, to calculate
|
|
27
|
+
# statistics on. For each threshold specified, the number of Tasks canceled
|
|
28
|
+
# and reservations accepted above and below the specified thresholds in
|
|
29
|
+
# seconds are computed. TaskRouter will calculate statistics on up to 10,000
|
|
30
|
+
# Tasks/Reservations for any given threshold.
|
|
31
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
32
|
+
def fetch_task_queue_cumulative_statistics(workspace_sid,
|
|
33
|
+
task_queue_sid,
|
|
34
|
+
end_date: nil,
|
|
35
|
+
minutes: nil,
|
|
36
|
+
start_date: nil,
|
|
37
|
+
task_channel: nil,
|
|
38
|
+
split_by_wait_time: nil)
|
|
39
|
+
@api_call
|
|
40
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
41
|
+
'/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/CumulativeStatistics',
|
|
42
|
+
Server::DEFAULT4)
|
|
43
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
44
|
+
.is_required(true)
|
|
45
|
+
.should_encode(true))
|
|
46
|
+
.template_param(new_parameter(task_queue_sid, key: 'TaskQueueSid')
|
|
47
|
+
.is_required(true)
|
|
48
|
+
.should_encode(true))
|
|
49
|
+
.query_param(new_parameter(end_date, key: 'EndDate'))
|
|
50
|
+
.query_param(new_parameter(minutes, key: 'Minutes'))
|
|
51
|
+
.query_param(new_parameter(start_date, key: 'StartDate'))
|
|
52
|
+
.query_param(new_parameter(task_channel, key: 'TaskChannel'))
|
|
53
|
+
.query_param(new_parameter(split_by_wait_time, key: 'SplitByWaitTime'))
|
|
54
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
55
|
+
.auth(Single.new('accountSid_authToken')))
|
|
56
|
+
.response(new_response_handler
|
|
57
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
58
|
+
.deserialize_into(TaskQueueCumulative.method(:from_hash))
|
|
59
|
+
.is_api_response(true))
|
|
60
|
+
.execute
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
# TaskrouterV1TaskQueueRealTimeStatisticsApi
|
|
8
|
+
class TaskrouterV1TaskQueueRealTimeStatisticsApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# with the TaskQueue to fetch.
|
|
12
|
+
# @param [String] task_queue_sid Required parameter: The SID of the
|
|
13
|
+
# TaskQueue for which to fetch statistics.
|
|
14
|
+
# @param [String] task_channel Optional parameter: The TaskChannel for which
|
|
15
|
+
# to fetch statistics. Can be the TaskChannel's SID or its `unique_name`,
|
|
16
|
+
# such as `voice`, `sms`, or `default`.
|
|
17
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
18
|
+
def fetch_task_queue_real_time_statistics(workspace_sid,
|
|
19
|
+
task_queue_sid,
|
|
20
|
+
task_channel: nil)
|
|
21
|
+
@api_call
|
|
22
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
23
|
+
'/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/RealTimeStatistics',
|
|
24
|
+
Server::DEFAULT4)
|
|
25
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
26
|
+
.is_required(true)
|
|
27
|
+
.should_encode(true))
|
|
28
|
+
.template_param(new_parameter(task_queue_sid, key: 'TaskQueueSid')
|
|
29
|
+
.is_required(true)
|
|
30
|
+
.should_encode(true))
|
|
31
|
+
.query_param(new_parameter(task_channel, key: 'TaskChannel'))
|
|
32
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
33
|
+
.auth(Single.new('accountSid_authToken')))
|
|
34
|
+
.response(new_response_handler
|
|
35
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
36
|
+
.deserialize_into(TaskQueueRealTimeStatistics.method(:from_hash))
|
|
37
|
+
.is_api_response(true))
|
|
38
|
+
.execute
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
# TaskrouterV1TaskQueueStatisticsApi
|
|
8
|
+
class TaskrouterV1TaskQueueStatisticsApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# with the TaskQueue to fetch.
|
|
12
|
+
# @param [String] task_queue_sid Required parameter: The SID of the
|
|
13
|
+
# TaskQueue for which to fetch statistics.
|
|
14
|
+
# @param [DateTime] end_date Optional parameter: Only calculate statistics
|
|
15
|
+
# from this date and time and earlier, specified in GMT as an [ISO
|
|
16
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
|
|
17
|
+
# @param [Integer] minutes Optional parameter: Only calculate statistics
|
|
18
|
+
# since this many minutes in the past. The default is 15 minutes.
|
|
19
|
+
# @param [DateTime] start_date Optional parameter: Only calculate statistics
|
|
20
|
+
# from this date and time and later, specified in [ISO
|
|
21
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
22
|
+
# @param [String] task_channel Optional parameter: Only calculate real-time
|
|
23
|
+
# and cumulative statistics for the specified TaskChannel. Can be the
|
|
24
|
+
# TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or
|
|
25
|
+
# `default`.
|
|
26
|
+
# @param [String] split_by_wait_time Optional parameter: A comma separated
|
|
27
|
+
# list of values that describes the thresholds, in seconds, to calculate
|
|
28
|
+
# statistics on. For each threshold specified, the number of Tasks canceled
|
|
29
|
+
# and reservations accepted above and below the specified thresholds in
|
|
30
|
+
# seconds are computed.
|
|
31
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
32
|
+
def fetch_task_queue_statistics(workspace_sid,
|
|
33
|
+
task_queue_sid,
|
|
34
|
+
end_date: nil,
|
|
35
|
+
minutes: nil,
|
|
36
|
+
start_date: nil,
|
|
37
|
+
task_channel: nil,
|
|
38
|
+
split_by_wait_time: nil)
|
|
39
|
+
@api_call
|
|
40
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
41
|
+
'/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/Statistics',
|
|
42
|
+
Server::DEFAULT4)
|
|
43
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
44
|
+
.is_required(true)
|
|
45
|
+
.should_encode(true))
|
|
46
|
+
.template_param(new_parameter(task_queue_sid, key: 'TaskQueueSid')
|
|
47
|
+
.is_required(true)
|
|
48
|
+
.should_encode(true))
|
|
49
|
+
.query_param(new_parameter(end_date, key: 'EndDate'))
|
|
50
|
+
.query_param(new_parameter(minutes, key: 'Minutes'))
|
|
51
|
+
.query_param(new_parameter(start_date, key: 'StartDate'))
|
|
52
|
+
.query_param(new_parameter(task_channel, key: 'TaskChannel'))
|
|
53
|
+
.query_param(new_parameter(split_by_wait_time, key: 'SplitByWaitTime'))
|
|
54
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
55
|
+
.auth(Single.new('accountSid_authToken')))
|
|
56
|
+
.response(new_response_handler
|
|
57
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
58
|
+
.deserialize_into(TaskQueueStatistics.method(:from_hash))
|
|
59
|
+
.is_api_response(true))
|
|
60
|
+
.execute
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
# TaskrouterV1TaskQueuesStatisticsApi
|
|
8
|
+
class TaskrouterV1TaskQueuesStatisticsApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# with the TaskQueues to read.
|
|
12
|
+
# @param [DateTime] end_date Optional parameter: Only calculate statistics
|
|
13
|
+
# from this date and time and earlier, specified in GMT as an [ISO
|
|
14
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
|
|
15
|
+
# @param [String] friendly_name Optional parameter: The `friendly_name` of
|
|
16
|
+
# the TaskQueue statistics to read.
|
|
17
|
+
# @param [Integer] minutes Optional parameter: Only calculate statistics
|
|
18
|
+
# since this many minutes in the past. The default is 15 minutes.
|
|
19
|
+
# @param [DateTime] start_date Optional parameter: Only calculate statistics
|
|
20
|
+
# from this date and time and later, specified in [ISO
|
|
21
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
22
|
+
# @param [String] task_channel Optional parameter: Only calculate statistics
|
|
23
|
+
# on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`,
|
|
24
|
+
# such as `voice`, `sms`, or `default`.
|
|
25
|
+
# @param [String] split_by_wait_time Optional parameter: A comma separated
|
|
26
|
+
# list of values that describes the thresholds, in seconds, to calculate
|
|
27
|
+
# statistics on. For each threshold specified, the number of Tasks canceled
|
|
28
|
+
# and reservations accepted above and below the specified thresholds in
|
|
29
|
+
# seconds are computed.
|
|
30
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
31
|
+
# return in each list page. The default is 50, and the maximum is 1000.
|
|
32
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
33
|
+
# simply for client state.
|
|
34
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
35
|
+
# provided by the API.
|
|
36
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
37
|
+
def list_task_queues_statistics(workspace_sid,
|
|
38
|
+
end_date: nil,
|
|
39
|
+
friendly_name: nil,
|
|
40
|
+
minutes: nil,
|
|
41
|
+
start_date: nil,
|
|
42
|
+
task_channel: nil,
|
|
43
|
+
split_by_wait_time: nil,
|
|
44
|
+
page_size: nil,
|
|
45
|
+
page: nil,
|
|
46
|
+
page_token: nil)
|
|
47
|
+
@api_call
|
|
48
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
49
|
+
'/v1/Workspaces/{WorkspaceSid}/TaskQueues/Statistics',
|
|
50
|
+
Server::DEFAULT4)
|
|
51
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
52
|
+
.is_required(true)
|
|
53
|
+
.should_encode(true))
|
|
54
|
+
.query_param(new_parameter(end_date, key: 'EndDate'))
|
|
55
|
+
.query_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
56
|
+
.query_param(new_parameter(minutes, key: 'Minutes'))
|
|
57
|
+
.query_param(new_parameter(start_date, key: 'StartDate'))
|
|
58
|
+
.query_param(new_parameter(task_channel, key: 'TaskChannel'))
|
|
59
|
+
.query_param(new_parameter(split_by_wait_time, key: 'SplitByWaitTime'))
|
|
60
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
61
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
62
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
63
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
64
|
+
.auth(Single.new('accountSid_authToken')))
|
|
65
|
+
.response(new_response_handler
|
|
66
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
67
|
+
.deserialize_into(ListTaskQueuesStatisticsResponse.method(:from_hash))
|
|
68
|
+
.is_api_response(true))
|
|
69
|
+
.execute
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|