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,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
|
+
# TaskrouterV1WorkersStatisticsApi
|
|
8
|
+
class TaskrouterV1WorkersStatisticsApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# with the Worker to fetch.
|
|
12
|
+
# @param [Integer] minutes Optional parameter: Only calculate statistics
|
|
13
|
+
# since this many minutes in the past. The default 15 minutes. This is
|
|
14
|
+
# helpful for displaying statistics for the last 15 minutes, 240 minutes (4
|
|
15
|
+
# hours), and 480 minutes (8 hours) to see trends.
|
|
16
|
+
# @param [DateTime] start_date Optional parameter: Only calculate statistics
|
|
17
|
+
# from this date and time and later, specified in [ISO
|
|
18
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
19
|
+
# @param [DateTime] end_date Optional parameter: Only calculate statistics
|
|
20
|
+
# from this date and time and earlier, specified in GMT as an [ISO
|
|
21
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
|
|
22
|
+
# @param [String] task_queue_sid Optional parameter: The SID of the
|
|
23
|
+
# TaskQueue for which to fetch Worker statistics.
|
|
24
|
+
# @param [String] task_queue_name Optional parameter: The `friendly_name` of
|
|
25
|
+
# the TaskQueue for which to fetch Worker statistics.
|
|
26
|
+
# @param [String] friendly_name Optional parameter: Only include Workers
|
|
27
|
+
# with `friendly_name` values that match this parameter.
|
|
28
|
+
# @param [String] task_channel Optional parameter: Only calculate statistics
|
|
29
|
+
# on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`,
|
|
30
|
+
# such as `voice`, `sms`, or `default`.
|
|
31
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
32
|
+
def fetch_worker_statistics(workspace_sid,
|
|
33
|
+
minutes: nil,
|
|
34
|
+
start_date: nil,
|
|
35
|
+
end_date: nil,
|
|
36
|
+
task_queue_sid: nil,
|
|
37
|
+
task_queue_name: nil,
|
|
38
|
+
friendly_name: nil,
|
|
39
|
+
task_channel: nil)
|
|
40
|
+
@api_call
|
|
41
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
42
|
+
'/v1/Workspaces/{WorkspaceSid}/Workers/Statistics',
|
|
43
|
+
Server::DEFAULT4)
|
|
44
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
45
|
+
.is_required(true)
|
|
46
|
+
.should_encode(true))
|
|
47
|
+
.query_param(new_parameter(minutes, key: 'Minutes'))
|
|
48
|
+
.query_param(new_parameter(start_date, key: 'StartDate'))
|
|
49
|
+
.query_param(new_parameter(end_date, key: 'EndDate'))
|
|
50
|
+
.query_param(new_parameter(task_queue_sid, key: 'TaskQueueSid'))
|
|
51
|
+
.query_param(new_parameter(task_queue_name, key: 'TaskQueueName'))
|
|
52
|
+
.query_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
53
|
+
.query_param(new_parameter(task_channel, key: 'TaskChannel'))
|
|
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(WorkerStatistics.method(:from_hash))
|
|
59
|
+
.is_api_response(true))
|
|
60
|
+
.execute
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,213 @@
|
|
|
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
|
+
# TaskrouterV1WorkflowApi
|
|
8
|
+
class TaskrouterV1WorkflowApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# with the Workflow to fetch.
|
|
12
|
+
# @param [String] sid Required parameter: The SID of the Workflow resource
|
|
13
|
+
# to fetch.
|
|
14
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
15
|
+
def fetch_workflow(workspace_sid,
|
|
16
|
+
sid)
|
|
17
|
+
@api_call
|
|
18
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
19
|
+
'/v1/Workspaces/{WorkspaceSid}/Workflows/{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(Workflow.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 Workflow to update.
|
|
39
|
+
# @param [String] sid Required parameter: The SID of the Workflow resource
|
|
40
|
+
# to update.
|
|
41
|
+
# @param [String] friendly_name Optional parameter: A descriptive string
|
|
42
|
+
# that you create to describe the Workflow resource. For example, `Inbound
|
|
43
|
+
# Call Workflow` or `2014 Outbound Campaign`.
|
|
44
|
+
# @param [String] assignment_callback_url Optional parameter: The URL from
|
|
45
|
+
# your application that will process task assignment events. See [Handling
|
|
46
|
+
# Task Assignment
|
|
47
|
+
# Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbac
|
|
48
|
+
# ks) for more details.
|
|
49
|
+
# @param [String] fallback_assignment_callback_url Optional parameter: The
|
|
50
|
+
# URL that we should call when a call to the `assignment_callback_url`
|
|
51
|
+
# fails.
|
|
52
|
+
# @param [String] configuration Optional parameter: A JSON string that
|
|
53
|
+
# contains the rules to apply to the Workflow. See [Configuring
|
|
54
|
+
# Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration)
|
|
55
|
+
# for more information.
|
|
56
|
+
# @param [Integer] task_reservation_timeout Optional parameter: How long
|
|
57
|
+
# TaskRouter will wait for a confirmation response from your application
|
|
58
|
+
# after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and
|
|
59
|
+
# the default is `120`.
|
|
60
|
+
# @param [String] re_evaluate_tasks Optional parameter: Whether or not to
|
|
61
|
+
# re-evaluate Tasks. The default is `false`, which means Tasks in the
|
|
62
|
+
# Workflow will not be processed through the assignment loop again.
|
|
63
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
64
|
+
def update_workflow(workspace_sid,
|
|
65
|
+
sid,
|
|
66
|
+
friendly_name: nil,
|
|
67
|
+
assignment_callback_url: nil,
|
|
68
|
+
fallback_assignment_callback_url: nil,
|
|
69
|
+
configuration: nil,
|
|
70
|
+
task_reservation_timeout: nil,
|
|
71
|
+
re_evaluate_tasks: nil)
|
|
72
|
+
@api_call
|
|
73
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
74
|
+
'/v1/Workspaces/{WorkspaceSid}/Workflows/{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(assignment_callback_url, key: 'AssignmentCallbackUrl'))
|
|
84
|
+
.form_param(new_parameter(fallback_assignment_callback_url, key: 'FallbackAssignmentCallbackUrl'))
|
|
85
|
+
.form_param(new_parameter(configuration, key: 'Configuration'))
|
|
86
|
+
.form_param(new_parameter(task_reservation_timeout, key: 'TaskReservationTimeout'))
|
|
87
|
+
.form_param(new_parameter(re_evaluate_tasks, key: 'ReEvaluateTasks'))
|
|
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(Workflow.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 Workflow to delete.
|
|
101
|
+
# @param [String] sid Required parameter: The SID of the Workflow resource
|
|
102
|
+
# to delete.
|
|
103
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
104
|
+
def delete_workflow(workspace_sid,
|
|
105
|
+
sid)
|
|
106
|
+
@api_call
|
|
107
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
108
|
+
'/v1/Workspaces/{WorkspaceSid}/Workflows/{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 Workflow to read.
|
|
126
|
+
# @param [String] friendly_name Optional parameter: The `friendly_name` of
|
|
127
|
+
# the Workflow resources to read.
|
|
128
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
129
|
+
# return in each list page. The default is 50, and the maximum is 1000.
|
|
130
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
131
|
+
# simply for client state.
|
|
132
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
133
|
+
# provided by the API.
|
|
134
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
135
|
+
def list_workflow(workspace_sid,
|
|
136
|
+
friendly_name: nil,
|
|
137
|
+
page_size: nil,
|
|
138
|
+
page: nil,
|
|
139
|
+
page_token: nil)
|
|
140
|
+
@api_call
|
|
141
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
142
|
+
'/v1/Workspaces/{WorkspaceSid}/Workflows',
|
|
143
|
+
Server::DEFAULT4)
|
|
144
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
145
|
+
.is_required(true)
|
|
146
|
+
.should_encode(true))
|
|
147
|
+
.query_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
148
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
149
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
150
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
151
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
152
|
+
.auth(Single.new('accountSid_authToken')))
|
|
153
|
+
.response(new_response_handler
|
|
154
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
155
|
+
.deserialize_into(ListWorkflowResponse.method(:from_hash))
|
|
156
|
+
.is_api_response(true))
|
|
157
|
+
.execute
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# TODO: type endpoint description here
|
|
161
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
162
|
+
# that the new Workflow to create belongs to.
|
|
163
|
+
# @param [String] friendly_name Required parameter: A descriptive string
|
|
164
|
+
# that you create to describe the Workflow resource. For example, `Inbound
|
|
165
|
+
# Call Workflow` or `2014 Outbound Campaign`.
|
|
166
|
+
# @param [String] configuration Required parameter: A JSON string that
|
|
167
|
+
# contains the rules to apply to the Workflow. See [Configuring
|
|
168
|
+
# Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration)
|
|
169
|
+
# for more information.
|
|
170
|
+
# @param [String] assignment_callback_url Optional parameter: The URL from
|
|
171
|
+
# your application that will process task assignment events. See [Handling
|
|
172
|
+
# Task Assignment
|
|
173
|
+
# Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbac
|
|
174
|
+
# ks) for more details.
|
|
175
|
+
# @param [String] fallback_assignment_callback_url Optional parameter: The
|
|
176
|
+
# URL that we should call when a call to the `assignment_callback_url`
|
|
177
|
+
# fails.
|
|
178
|
+
# @param [Integer] task_reservation_timeout Optional parameter: How long
|
|
179
|
+
# TaskRouter will wait for a confirmation response from your application
|
|
180
|
+
# after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and
|
|
181
|
+
# the default is `120`.
|
|
182
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
183
|
+
def create_workflow(workspace_sid,
|
|
184
|
+
friendly_name,
|
|
185
|
+
configuration,
|
|
186
|
+
assignment_callback_url: nil,
|
|
187
|
+
fallback_assignment_callback_url: nil,
|
|
188
|
+
task_reservation_timeout: nil)
|
|
189
|
+
@api_call
|
|
190
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
191
|
+
'/v1/Workspaces/{WorkspaceSid}/Workflows',
|
|
192
|
+
Server::DEFAULT4)
|
|
193
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
194
|
+
.is_required(true)
|
|
195
|
+
.should_encode(true))
|
|
196
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName')
|
|
197
|
+
.is_required(true))
|
|
198
|
+
.form_param(new_parameter(configuration, key: 'Configuration')
|
|
199
|
+
.is_required(true))
|
|
200
|
+
.form_param(new_parameter(assignment_callback_url, key: 'AssignmentCallbackUrl'))
|
|
201
|
+
.form_param(new_parameter(fallback_assignment_callback_url, key: 'FallbackAssignmentCallbackUrl'))
|
|
202
|
+
.form_param(new_parameter(task_reservation_timeout, key: 'TaskReservationTimeout'))
|
|
203
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
204
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
205
|
+
.auth(Single.new('accountSid_authToken')))
|
|
206
|
+
.response(new_response_handler
|
|
207
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
208
|
+
.deserialize_into(Workflow.method(:from_hash))
|
|
209
|
+
.is_api_response(true))
|
|
210
|
+
.execute
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
# TaskrouterV1WorkflowCumulativeStatisticsApi
|
|
8
|
+
class TaskrouterV1WorkflowCumulativeStatisticsApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# with the resource to fetch.
|
|
12
|
+
# @param [String] workflow_sid Required parameter: Returns the list of Tasks
|
|
13
|
+
# that are being controlled by the Workflow with the specified Sid value.
|
|
14
|
+
# @param [DateTime] end_date Optional parameter: Only include usage that
|
|
15
|
+
# occurred on or before this date, 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 15 minutes. This is
|
|
19
|
+
# helpful for displaying statistics for the last 15 minutes, 240 minutes (4
|
|
20
|
+
# hours), and 480 minutes (8 hours) to see trends.
|
|
21
|
+
# @param [DateTime] start_date Optional parameter: Only calculate statistics
|
|
22
|
+
# from this date and time and later, specified in [ISO
|
|
23
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
24
|
+
# @param [String] task_channel Optional parameter: Only calculate cumulative
|
|
25
|
+
# statistics on this TaskChannel. Can be the TaskChannel's SID or its
|
|
26
|
+
# `unique_name`, such as `voice`, `sms`, or `default`.
|
|
27
|
+
# @param [String] split_by_wait_time Optional parameter: A comma separated
|
|
28
|
+
# list of values that describes the thresholds, in seconds, to calculate
|
|
29
|
+
# statistics on. For each threshold specified, the number of Tasks canceled
|
|
30
|
+
# and reservations accepted above and below the specified thresholds in
|
|
31
|
+
# seconds are computed. For example, `5,30` would show splits of Tasks that
|
|
32
|
+
# were canceled or accepted before and after 5 seconds and before and after
|
|
33
|
+
# 30 seconds. This can be used to show short abandoned Tasks or Tasks that
|
|
34
|
+
# failed to meet an SLA. TaskRouter will calculate statistics on up to
|
|
35
|
+
# 10,000 Tasks for any given threshold.
|
|
36
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
37
|
+
def fetch_workflow_cumulative_statistics(workspace_sid,
|
|
38
|
+
workflow_sid,
|
|
39
|
+
end_date: nil,
|
|
40
|
+
minutes: nil,
|
|
41
|
+
start_date: nil,
|
|
42
|
+
task_channel: nil,
|
|
43
|
+
split_by_wait_time: nil)
|
|
44
|
+
@api_call
|
|
45
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
46
|
+
'/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/CumulativeStatistics',
|
|
47
|
+
Server::DEFAULT4)
|
|
48
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
49
|
+
.is_required(true)
|
|
50
|
+
.should_encode(true))
|
|
51
|
+
.template_param(new_parameter(workflow_sid, key: 'WorkflowSid')
|
|
52
|
+
.is_required(true)
|
|
53
|
+
.should_encode(true))
|
|
54
|
+
.query_param(new_parameter(end_date, key: 'EndDate'))
|
|
55
|
+
.query_param(new_parameter(minutes, key: 'Minutes'))
|
|
56
|
+
.query_param(new_parameter(start_date, key: 'StartDate'))
|
|
57
|
+
.query_param(new_parameter(task_channel, key: 'TaskChannel'))
|
|
58
|
+
.query_param(new_parameter(split_by_wait_time, key: 'SplitByWaitTime'))
|
|
59
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
60
|
+
.auth(Single.new('accountSid_authToken')))
|
|
61
|
+
.response(new_response_handler
|
|
62
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
63
|
+
.deserialize_into(WorkflowCumulativeStatistics.method(:from_hash))
|
|
64
|
+
.is_api_response(true))
|
|
65
|
+
.execute
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
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
|
+
# TaskrouterV1WorkflowRealTimeStatisticsApi
|
|
8
|
+
class TaskrouterV1WorkflowRealTimeStatisticsApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# with the Workflow to fetch.
|
|
12
|
+
# @param [String] workflow_sid Required parameter: Returns the list of Tasks
|
|
13
|
+
# that are being controlled by the Workflow with the specified SID value.
|
|
14
|
+
# @param [String] task_channel Optional parameter: Only calculate real-time
|
|
15
|
+
# statistics on this TaskChannel. Can be the TaskChannel's SID or its
|
|
16
|
+
# `unique_name`, such as `voice`, `sms`, or `default`.
|
|
17
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
18
|
+
def fetch_workflow_real_time_statistics(workspace_sid,
|
|
19
|
+
workflow_sid,
|
|
20
|
+
task_channel: nil)
|
|
21
|
+
@api_call
|
|
22
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
23
|
+
'/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/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(workflow_sid, key: 'WorkflowSid')
|
|
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(WorkflowRealTimeStatistics.method(:from_hash))
|
|
37
|
+
.is_api_response(true))
|
|
38
|
+
.execute
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
# TaskrouterV1WorkflowStatisticsApi
|
|
8
|
+
class TaskrouterV1WorkflowStatisticsApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# with the Workflow to fetch.
|
|
12
|
+
# @param [String] workflow_sid Required parameter: Returns the list of Tasks
|
|
13
|
+
# that are being controlled by the Workflow with the specified SID value.
|
|
14
|
+
# @param [Integer] minutes Optional parameter: Only calculate statistics
|
|
15
|
+
# since this many minutes in the past. The default 15 minutes. This is
|
|
16
|
+
# helpful for displaying statistics for the last 15 minutes, 240 minutes (4
|
|
17
|
+
# hours), and 480 minutes (8 hours) to see trends.
|
|
18
|
+
# @param [DateTime] start_date Optional parameter: Only calculate statistics
|
|
19
|
+
# from this date and time and later, specified in [ISO
|
|
20
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
21
|
+
# @param [DateTime] end_date Optional parameter: Only calculate statistics
|
|
22
|
+
# from this date and time and earlier, specified in GMT as an [ISO
|
|
23
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
|
|
24
|
+
# @param [String] task_channel Optional parameter: Only calculate real-time
|
|
25
|
+
# statistics on this TaskChannel. Can be the TaskChannel's SID or its
|
|
26
|
+
# `unique_name`, such as `voice`, `sms`, or `default`.
|
|
27
|
+
# @param [String] split_by_wait_time Optional parameter: A comma separated
|
|
28
|
+
# list of values that describes the thresholds, in seconds, to calculate
|
|
29
|
+
# statistics on. For each threshold specified, the number of Tasks canceled
|
|
30
|
+
# and reservations accepted above and below the specified thresholds in
|
|
31
|
+
# seconds are computed. For example, `5,30` would show splits of Tasks that
|
|
32
|
+
# were canceled or accepted before and after 5 seconds and before and after
|
|
33
|
+
# 30 seconds. This can be used to show short abandoned Tasks or Tasks that
|
|
34
|
+
# failed to meet an SLA.
|
|
35
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
36
|
+
def fetch_workflow_statistics(workspace_sid,
|
|
37
|
+
workflow_sid,
|
|
38
|
+
minutes: nil,
|
|
39
|
+
start_date: nil,
|
|
40
|
+
end_date: nil,
|
|
41
|
+
task_channel: nil,
|
|
42
|
+
split_by_wait_time: nil)
|
|
43
|
+
@api_call
|
|
44
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
45
|
+
'/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/Statistics',
|
|
46
|
+
Server::DEFAULT4)
|
|
47
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
48
|
+
.is_required(true)
|
|
49
|
+
.should_encode(true))
|
|
50
|
+
.template_param(new_parameter(workflow_sid, key: 'WorkflowSid')
|
|
51
|
+
.is_required(true)
|
|
52
|
+
.should_encode(true))
|
|
53
|
+
.query_param(new_parameter(minutes, key: 'Minutes'))
|
|
54
|
+
.query_param(new_parameter(start_date, key: 'StartDate'))
|
|
55
|
+
.query_param(new_parameter(end_date, key: 'EndDate'))
|
|
56
|
+
.query_param(new_parameter(task_channel, key: 'TaskChannel'))
|
|
57
|
+
.query_param(new_parameter(split_by_wait_time, key: 'SplitByWaitTime'))
|
|
58
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
59
|
+
.auth(Single.new('accountSid_authToken')))
|
|
60
|
+
.response(new_response_handler
|
|
61
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
62
|
+
.deserialize_into(WorkflowStatistics.method(:from_hash))
|
|
63
|
+
.is_api_response(true))
|
|
64
|
+
.execute
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|