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,285 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module TwilioApIs
|
|
8
|
+
# Workspace Model.
|
|
9
|
+
class Workspace < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that
|
|
14
|
+
# created the Workspace resource.
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :account_sid
|
|
17
|
+
|
|
18
|
+
# The date and time in GMT when the resource was created specified in [ISO
|
|
19
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
20
|
+
# @return [DateTime]
|
|
21
|
+
attr_accessor :date_created
|
|
22
|
+
|
|
23
|
+
# The date and time in GMT when the resource was last updated specified in
|
|
24
|
+
# [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
25
|
+
# @return [DateTime]
|
|
26
|
+
attr_accessor :date_updated
|
|
27
|
+
|
|
28
|
+
# The name of the default activity.
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :default_activity_name
|
|
31
|
+
|
|
32
|
+
# The SID of the Activity that will be used when new Workers are created in
|
|
33
|
+
# the Workspace.
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :default_activity_sid
|
|
36
|
+
|
|
37
|
+
# The URL we call when an event occurs. If provided, the Workspace will
|
|
38
|
+
# publish events to this URL, for example, to collect data for reporting.
|
|
39
|
+
# See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event)
|
|
40
|
+
# for more information. This parameter supports Twilio's [Webhooks (HTTP
|
|
41
|
+
# callbacks) Connection
|
|
42
|
+
# Overrides](https://www.twilio.com/docs/usage/webhooks/webhooks-connection-
|
|
43
|
+
# overrides).
|
|
44
|
+
# @return [String]
|
|
45
|
+
attr_accessor :event_callback_url
|
|
46
|
+
|
|
47
|
+
# The list of Workspace events for which to call `event_callback_url`. For
|
|
48
|
+
# example, if `EventsFilter=task.created, task.canceled,
|
|
49
|
+
# worker.activity.update`, then TaskRouter will call event_callback_url only
|
|
50
|
+
# when a task is created, canceled, or a Worker activity is updated.
|
|
51
|
+
# @return [String]
|
|
52
|
+
attr_accessor :events_filter
|
|
53
|
+
|
|
54
|
+
# The string that you assigned to describe the Workspace resource. For
|
|
55
|
+
# example `Customer Support` or `2014 Election Campaign`.
|
|
56
|
+
# @return [String]
|
|
57
|
+
attr_accessor :friendly_name
|
|
58
|
+
|
|
59
|
+
# Whether multi-tasking is enabled. The default is `true`, which enables
|
|
60
|
+
# multi-tasking. Multi-tasking allows Workers to handle multiple Tasks
|
|
61
|
+
# simultaneously. When enabled (`true`), each Worker can receive parallel
|
|
62
|
+
# reservations up to the per-channel maximums defined in the Workers
|
|
63
|
+
# section. In single-tasking each Worker would only receive a new
|
|
64
|
+
# reservation when the previous task is completed. Learn more at
|
|
65
|
+
# [Multitasking](https://www.twilio.com/docs/taskrouter/multitasking).
|
|
66
|
+
# @return [TrueClass | FalseClass]
|
|
67
|
+
attr_accessor :multi_task_enabled
|
|
68
|
+
|
|
69
|
+
# The unique string that we created to identify the Workspace resource.
|
|
70
|
+
# @return [String]
|
|
71
|
+
attr_accessor :sid
|
|
72
|
+
|
|
73
|
+
# The name of the timeout activity.
|
|
74
|
+
# @return [String]
|
|
75
|
+
attr_accessor :timeout_activity_name
|
|
76
|
+
|
|
77
|
+
# The SID of the Activity that will be assigned to a Worker when a Task
|
|
78
|
+
# reservation times out without a response.
|
|
79
|
+
# @return [String]
|
|
80
|
+
attr_accessor :timeout_activity_sid
|
|
81
|
+
|
|
82
|
+
# The type of TaskQueue to prioritize when Workers are receiving Tasks from
|
|
83
|
+
# both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is
|
|
84
|
+
# `FIFO`. For more information, see [Queue
|
|
85
|
+
# Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first
|
|
86
|
+
# -out-lifo).
|
|
87
|
+
# @return [WorkspaceQueueOrder]
|
|
88
|
+
attr_accessor :prioritize_queue_order
|
|
89
|
+
|
|
90
|
+
# The absolute URL of the Workspace resource.
|
|
91
|
+
# @return [String]
|
|
92
|
+
attr_accessor :url
|
|
93
|
+
|
|
94
|
+
# The URLs of related resources.
|
|
95
|
+
# @return [Object]
|
|
96
|
+
attr_accessor :links
|
|
97
|
+
|
|
98
|
+
# A mapping from model property names to API property names.
|
|
99
|
+
def self.names
|
|
100
|
+
@_hash = {} if @_hash.nil?
|
|
101
|
+
@_hash['account_sid'] = 'account_sid'
|
|
102
|
+
@_hash['date_created'] = 'date_created'
|
|
103
|
+
@_hash['date_updated'] = 'date_updated'
|
|
104
|
+
@_hash['default_activity_name'] = 'default_activity_name'
|
|
105
|
+
@_hash['default_activity_sid'] = 'default_activity_sid'
|
|
106
|
+
@_hash['event_callback_url'] = 'event_callback_url'
|
|
107
|
+
@_hash['events_filter'] = 'events_filter'
|
|
108
|
+
@_hash['friendly_name'] = 'friendly_name'
|
|
109
|
+
@_hash['multi_task_enabled'] = 'multi_task_enabled'
|
|
110
|
+
@_hash['sid'] = 'sid'
|
|
111
|
+
@_hash['timeout_activity_name'] = 'timeout_activity_name'
|
|
112
|
+
@_hash['timeout_activity_sid'] = 'timeout_activity_sid'
|
|
113
|
+
@_hash['prioritize_queue_order'] = 'prioritize_queue_order'
|
|
114
|
+
@_hash['url'] = 'url'
|
|
115
|
+
@_hash['links'] = 'links'
|
|
116
|
+
@_hash
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# An array for optional fields
|
|
120
|
+
def self.optionals
|
|
121
|
+
%w[
|
|
122
|
+
account_sid
|
|
123
|
+
date_created
|
|
124
|
+
date_updated
|
|
125
|
+
default_activity_name
|
|
126
|
+
default_activity_sid
|
|
127
|
+
event_callback_url
|
|
128
|
+
events_filter
|
|
129
|
+
friendly_name
|
|
130
|
+
multi_task_enabled
|
|
131
|
+
sid
|
|
132
|
+
timeout_activity_name
|
|
133
|
+
timeout_activity_sid
|
|
134
|
+
prioritize_queue_order
|
|
135
|
+
url
|
|
136
|
+
links
|
|
137
|
+
]
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# An array for nullable fields
|
|
141
|
+
def self.nullables
|
|
142
|
+
%w[
|
|
143
|
+
account_sid
|
|
144
|
+
date_created
|
|
145
|
+
date_updated
|
|
146
|
+
default_activity_name
|
|
147
|
+
default_activity_sid
|
|
148
|
+
event_callback_url
|
|
149
|
+
events_filter
|
|
150
|
+
friendly_name
|
|
151
|
+
multi_task_enabled
|
|
152
|
+
sid
|
|
153
|
+
timeout_activity_name
|
|
154
|
+
timeout_activity_sid
|
|
155
|
+
url
|
|
156
|
+
links
|
|
157
|
+
]
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
def initialize(account_sid: SKIP, date_created: SKIP, date_updated: SKIP,
|
|
161
|
+
default_activity_name: SKIP, default_activity_sid: SKIP,
|
|
162
|
+
event_callback_url: SKIP, events_filter: SKIP,
|
|
163
|
+
friendly_name: SKIP, multi_task_enabled: SKIP, sid: SKIP,
|
|
164
|
+
timeout_activity_name: SKIP, timeout_activity_sid: SKIP,
|
|
165
|
+
prioritize_queue_order: SKIP, url: SKIP, links: SKIP,
|
|
166
|
+
additional_properties: nil)
|
|
167
|
+
# Add additional model properties to the instance
|
|
168
|
+
additional_properties = {} if additional_properties.nil?
|
|
169
|
+
|
|
170
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
171
|
+
@date_created = date_created unless date_created == SKIP
|
|
172
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
173
|
+
@default_activity_name = default_activity_name unless default_activity_name == SKIP
|
|
174
|
+
@default_activity_sid = default_activity_sid unless default_activity_sid == SKIP
|
|
175
|
+
@event_callback_url = event_callback_url unless event_callback_url == SKIP
|
|
176
|
+
@events_filter = events_filter unless events_filter == SKIP
|
|
177
|
+
@friendly_name = friendly_name unless friendly_name == SKIP
|
|
178
|
+
@multi_task_enabled = multi_task_enabled unless multi_task_enabled == SKIP
|
|
179
|
+
@sid = sid unless sid == SKIP
|
|
180
|
+
@timeout_activity_name = timeout_activity_name unless timeout_activity_name == SKIP
|
|
181
|
+
@timeout_activity_sid = timeout_activity_sid unless timeout_activity_sid == SKIP
|
|
182
|
+
@prioritize_queue_order = prioritize_queue_order unless prioritize_queue_order == SKIP
|
|
183
|
+
@url = url unless url == SKIP
|
|
184
|
+
@links = links unless links == SKIP
|
|
185
|
+
@additional_properties = additional_properties
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Creates an instance of the object from a hash.
|
|
189
|
+
def self.from_hash(hash)
|
|
190
|
+
return nil unless hash
|
|
191
|
+
|
|
192
|
+
# Extract variables from the hash.
|
|
193
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
194
|
+
date_created = if hash.key?('date_created')
|
|
195
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
196
|
+
else
|
|
197
|
+
SKIP
|
|
198
|
+
end
|
|
199
|
+
date_updated = if hash.key?('date_updated')
|
|
200
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
201
|
+
else
|
|
202
|
+
SKIP
|
|
203
|
+
end
|
|
204
|
+
default_activity_name =
|
|
205
|
+
hash.key?('default_activity_name') ? hash['default_activity_name'] : SKIP
|
|
206
|
+
default_activity_sid =
|
|
207
|
+
hash.key?('default_activity_sid') ? hash['default_activity_sid'] : SKIP
|
|
208
|
+
event_callback_url =
|
|
209
|
+
hash.key?('event_callback_url') ? hash['event_callback_url'] : SKIP
|
|
210
|
+
events_filter = hash.key?('events_filter') ? hash['events_filter'] : SKIP
|
|
211
|
+
friendly_name = hash.key?('friendly_name') ? hash['friendly_name'] : SKIP
|
|
212
|
+
multi_task_enabled =
|
|
213
|
+
hash.key?('multi_task_enabled') ? hash['multi_task_enabled'] : SKIP
|
|
214
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
215
|
+
timeout_activity_name =
|
|
216
|
+
hash.key?('timeout_activity_name') ? hash['timeout_activity_name'] : SKIP
|
|
217
|
+
timeout_activity_sid =
|
|
218
|
+
hash.key?('timeout_activity_sid') ? hash['timeout_activity_sid'] : SKIP
|
|
219
|
+
prioritize_queue_order =
|
|
220
|
+
hash.key?('prioritize_queue_order') ? hash['prioritize_queue_order'] : SKIP
|
|
221
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
222
|
+
links = hash.key?('links') ? hash['links'] : SKIP
|
|
223
|
+
|
|
224
|
+
# Create a new hash for additional properties, removing known properties.
|
|
225
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
226
|
+
|
|
227
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
228
|
+
new_hash, proc { |value| value }
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
# Create object from extracted values.
|
|
232
|
+
Workspace.new(account_sid: account_sid,
|
|
233
|
+
date_created: date_created,
|
|
234
|
+
date_updated: date_updated,
|
|
235
|
+
default_activity_name: default_activity_name,
|
|
236
|
+
default_activity_sid: default_activity_sid,
|
|
237
|
+
event_callback_url: event_callback_url,
|
|
238
|
+
events_filter: events_filter,
|
|
239
|
+
friendly_name: friendly_name,
|
|
240
|
+
multi_task_enabled: multi_task_enabled,
|
|
241
|
+
sid: sid,
|
|
242
|
+
timeout_activity_name: timeout_activity_name,
|
|
243
|
+
timeout_activity_sid: timeout_activity_sid,
|
|
244
|
+
prioritize_queue_order: prioritize_queue_order,
|
|
245
|
+
url: url,
|
|
246
|
+
links: links,
|
|
247
|
+
additional_properties: additional_properties)
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
def to_custom_date_created
|
|
251
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
def to_custom_date_updated
|
|
255
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Provides a human-readable string representation of the object.
|
|
259
|
+
def to_s
|
|
260
|
+
class_name = self.class.name.split('::').last
|
|
261
|
+
"<#{class_name} account_sid: #{@account_sid}, date_created: #{@date_created}, date_updated:"\
|
|
262
|
+
" #{@date_updated}, default_activity_name: #{@default_activity_name}, default_activity_sid:"\
|
|
263
|
+
" #{@default_activity_sid}, event_callback_url: #{@event_callback_url}, events_filter:"\
|
|
264
|
+
" #{@events_filter}, friendly_name: #{@friendly_name}, multi_task_enabled:"\
|
|
265
|
+
" #{@multi_task_enabled}, sid: #{@sid}, timeout_activity_name: #{@timeout_activity_name},"\
|
|
266
|
+
" timeout_activity_sid: #{@timeout_activity_sid}, prioritize_queue_order:"\
|
|
267
|
+
" #{@prioritize_queue_order}, url: #{@url}, links: #{@links}, additional_properties:"\
|
|
268
|
+
" #{@additional_properties}>"
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
272
|
+
def inspect
|
|
273
|
+
class_name = self.class.name.split('::').last
|
|
274
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, date_created:"\
|
|
275
|
+
" #{@date_created.inspect}, date_updated: #{@date_updated.inspect}, default_activity_name:"\
|
|
276
|
+
" #{@default_activity_name.inspect}, default_activity_sid: #{@default_activity_sid.inspect},"\
|
|
277
|
+
" event_callback_url: #{@event_callback_url.inspect}, events_filter:"\
|
|
278
|
+
" #{@events_filter.inspect}, friendly_name: #{@friendly_name.inspect}, multi_task_enabled:"\
|
|
279
|
+
" #{@multi_task_enabled.inspect}, sid: #{@sid.inspect}, timeout_activity_name:"\
|
|
280
|
+
" #{@timeout_activity_name.inspect}, timeout_activity_sid: #{@timeout_activity_sid.inspect},"\
|
|
281
|
+
" prioritize_queue_order: #{@prioritize_queue_order.inspect}, url: #{@url.inspect}, links:"\
|
|
282
|
+
" #{@links.inspect}, additional_properties: #{@additional_properties}>"
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
end
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module TwilioApIs
|
|
8
|
+
# WorkspaceCumulativeStatistics Model.
|
|
9
|
+
class WorkspaceCumulativeStatistics < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that
|
|
14
|
+
# created the Workspace resource.
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :account_sid
|
|
17
|
+
|
|
18
|
+
# The average time in seconds between Task creation and acceptance.
|
|
19
|
+
# @return [Integer]
|
|
20
|
+
attr_accessor :avg_task_acceptance_time
|
|
21
|
+
|
|
22
|
+
# The beginning of the interval during which these statistics were
|
|
23
|
+
# calculated, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
24
|
+
# @return [DateTime]
|
|
25
|
+
attr_accessor :start_time
|
|
26
|
+
|
|
27
|
+
# The end of the interval during which these statistics were calculated, in
|
|
28
|
+
# [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
29
|
+
# @return [DateTime]
|
|
30
|
+
attr_accessor :end_time
|
|
31
|
+
|
|
32
|
+
# The total number of Reservations that were created for Workers.
|
|
33
|
+
# @return [Integer]
|
|
34
|
+
attr_accessor :reservations_created
|
|
35
|
+
|
|
36
|
+
# The total number of Reservations accepted by Workers.
|
|
37
|
+
# @return [Integer]
|
|
38
|
+
attr_accessor :reservations_accepted
|
|
39
|
+
|
|
40
|
+
# The total number of Reservations that were rejected.
|
|
41
|
+
# @return [Integer]
|
|
42
|
+
attr_accessor :reservations_rejected
|
|
43
|
+
|
|
44
|
+
# The total number of Reservations that were timed out.
|
|
45
|
+
# @return [Integer]
|
|
46
|
+
attr_accessor :reservations_timed_out
|
|
47
|
+
|
|
48
|
+
# The total number of Reservations that were canceled.
|
|
49
|
+
# @return [Integer]
|
|
50
|
+
attr_accessor :reservations_canceled
|
|
51
|
+
|
|
52
|
+
# The total number of Reservations that were rescinded.
|
|
53
|
+
# @return [Integer]
|
|
54
|
+
attr_accessor :reservations_rescinded
|
|
55
|
+
|
|
56
|
+
# A list of objects that describe the number of Tasks canceled and
|
|
57
|
+
# reservations accepted above and below the thresholds specified in seconds.
|
|
58
|
+
# @return [Object]
|
|
59
|
+
attr_accessor :split_by_wait_time
|
|
60
|
+
|
|
61
|
+
# The wait duration statistics (`avg`, `min`, `max`, `total`) for Tasks that
|
|
62
|
+
# were accepted.
|
|
63
|
+
# @return [Object]
|
|
64
|
+
attr_accessor :wait_duration_until_accepted
|
|
65
|
+
|
|
66
|
+
# The wait duration statistics (`avg`, `min`, `max`, `total`) for Tasks that
|
|
67
|
+
# were canceled.
|
|
68
|
+
# @return [Object]
|
|
69
|
+
attr_accessor :wait_duration_until_canceled
|
|
70
|
+
|
|
71
|
+
# The total number of Tasks that were canceled.
|
|
72
|
+
# @return [Integer]
|
|
73
|
+
attr_accessor :tasks_canceled
|
|
74
|
+
|
|
75
|
+
# The total number of Tasks that were completed.
|
|
76
|
+
# @return [Integer]
|
|
77
|
+
attr_accessor :tasks_completed
|
|
78
|
+
|
|
79
|
+
# The total number of Tasks created.
|
|
80
|
+
# @return [Integer]
|
|
81
|
+
attr_accessor :tasks_created
|
|
82
|
+
|
|
83
|
+
# The total number of Tasks that were deleted.
|
|
84
|
+
# @return [Integer]
|
|
85
|
+
attr_accessor :tasks_deleted
|
|
86
|
+
|
|
87
|
+
# The total number of Tasks that were moved from one queue to another.
|
|
88
|
+
# @return [Integer]
|
|
89
|
+
attr_accessor :tasks_moved
|
|
90
|
+
|
|
91
|
+
# The total number of Tasks that were timed out of their Workflows (and
|
|
92
|
+
# deleted).
|
|
93
|
+
# @return [Integer]
|
|
94
|
+
attr_accessor :tasks_timed_out_in_workflow
|
|
95
|
+
|
|
96
|
+
# The SID of the Workspace.
|
|
97
|
+
# @return [String]
|
|
98
|
+
attr_accessor :workspace_sid
|
|
99
|
+
|
|
100
|
+
# The absolute URL of the Workspace statistics resource.
|
|
101
|
+
# @return [String]
|
|
102
|
+
attr_accessor :url
|
|
103
|
+
|
|
104
|
+
# A mapping from model property names to API property names.
|
|
105
|
+
def self.names
|
|
106
|
+
@_hash = {} if @_hash.nil?
|
|
107
|
+
@_hash['account_sid'] = 'account_sid'
|
|
108
|
+
@_hash['avg_task_acceptance_time'] = 'avg_task_acceptance_time'
|
|
109
|
+
@_hash['start_time'] = 'start_time'
|
|
110
|
+
@_hash['end_time'] = 'end_time'
|
|
111
|
+
@_hash['reservations_created'] = 'reservations_created'
|
|
112
|
+
@_hash['reservations_accepted'] = 'reservations_accepted'
|
|
113
|
+
@_hash['reservations_rejected'] = 'reservations_rejected'
|
|
114
|
+
@_hash['reservations_timed_out'] = 'reservations_timed_out'
|
|
115
|
+
@_hash['reservations_canceled'] = 'reservations_canceled'
|
|
116
|
+
@_hash['reservations_rescinded'] = 'reservations_rescinded'
|
|
117
|
+
@_hash['split_by_wait_time'] = 'split_by_wait_time'
|
|
118
|
+
@_hash['wait_duration_until_accepted'] = 'wait_duration_until_accepted'
|
|
119
|
+
@_hash['wait_duration_until_canceled'] = 'wait_duration_until_canceled'
|
|
120
|
+
@_hash['tasks_canceled'] = 'tasks_canceled'
|
|
121
|
+
@_hash['tasks_completed'] = 'tasks_completed'
|
|
122
|
+
@_hash['tasks_created'] = 'tasks_created'
|
|
123
|
+
@_hash['tasks_deleted'] = 'tasks_deleted'
|
|
124
|
+
@_hash['tasks_moved'] = 'tasks_moved'
|
|
125
|
+
@_hash['tasks_timed_out_in_workflow'] = 'tasks_timed_out_in_workflow'
|
|
126
|
+
@_hash['workspace_sid'] = 'workspace_sid'
|
|
127
|
+
@_hash['url'] = 'url'
|
|
128
|
+
@_hash
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# An array for optional fields
|
|
132
|
+
def self.optionals
|
|
133
|
+
%w[
|
|
134
|
+
account_sid
|
|
135
|
+
avg_task_acceptance_time
|
|
136
|
+
start_time
|
|
137
|
+
end_time
|
|
138
|
+
reservations_created
|
|
139
|
+
reservations_accepted
|
|
140
|
+
reservations_rejected
|
|
141
|
+
reservations_timed_out
|
|
142
|
+
reservations_canceled
|
|
143
|
+
reservations_rescinded
|
|
144
|
+
split_by_wait_time
|
|
145
|
+
wait_duration_until_accepted
|
|
146
|
+
wait_duration_until_canceled
|
|
147
|
+
tasks_canceled
|
|
148
|
+
tasks_completed
|
|
149
|
+
tasks_created
|
|
150
|
+
tasks_deleted
|
|
151
|
+
tasks_moved
|
|
152
|
+
tasks_timed_out_in_workflow
|
|
153
|
+
workspace_sid
|
|
154
|
+
url
|
|
155
|
+
]
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# An array for nullable fields
|
|
159
|
+
def self.nullables
|
|
160
|
+
%w[
|
|
161
|
+
account_sid
|
|
162
|
+
start_time
|
|
163
|
+
end_time
|
|
164
|
+
split_by_wait_time
|
|
165
|
+
wait_duration_until_accepted
|
|
166
|
+
wait_duration_until_canceled
|
|
167
|
+
workspace_sid
|
|
168
|
+
url
|
|
169
|
+
]
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
def initialize(account_sid: SKIP, avg_task_acceptance_time: 0,
|
|
173
|
+
start_time: SKIP, end_time: SKIP, reservations_created: 0,
|
|
174
|
+
reservations_accepted: 0, reservations_rejected: 0,
|
|
175
|
+
reservations_timed_out: 0, reservations_canceled: 0,
|
|
176
|
+
reservations_rescinded: 0, split_by_wait_time: SKIP,
|
|
177
|
+
wait_duration_until_accepted: SKIP,
|
|
178
|
+
wait_duration_until_canceled: SKIP, tasks_canceled: 0,
|
|
179
|
+
tasks_completed: 0, tasks_created: 0, tasks_deleted: 0,
|
|
180
|
+
tasks_moved: 0, tasks_timed_out_in_workflow: 0,
|
|
181
|
+
workspace_sid: SKIP, url: SKIP, additional_properties: nil)
|
|
182
|
+
# Add additional model properties to the instance
|
|
183
|
+
additional_properties = {} if additional_properties.nil?
|
|
184
|
+
|
|
185
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
186
|
+
@avg_task_acceptance_time = avg_task_acceptance_time unless avg_task_acceptance_time == SKIP
|
|
187
|
+
@start_time = start_time unless start_time == SKIP
|
|
188
|
+
@end_time = end_time unless end_time == SKIP
|
|
189
|
+
@reservations_created = reservations_created unless reservations_created == SKIP
|
|
190
|
+
@reservations_accepted = reservations_accepted unless reservations_accepted == SKIP
|
|
191
|
+
@reservations_rejected = reservations_rejected unless reservations_rejected == SKIP
|
|
192
|
+
@reservations_timed_out = reservations_timed_out unless reservations_timed_out == SKIP
|
|
193
|
+
@reservations_canceled = reservations_canceled unless reservations_canceled == SKIP
|
|
194
|
+
@reservations_rescinded = reservations_rescinded unless reservations_rescinded == SKIP
|
|
195
|
+
@split_by_wait_time = split_by_wait_time unless split_by_wait_time == SKIP
|
|
196
|
+
unless wait_duration_until_accepted == SKIP
|
|
197
|
+
@wait_duration_until_accepted =
|
|
198
|
+
wait_duration_until_accepted
|
|
199
|
+
end
|
|
200
|
+
unless wait_duration_until_canceled == SKIP
|
|
201
|
+
@wait_duration_until_canceled =
|
|
202
|
+
wait_duration_until_canceled
|
|
203
|
+
end
|
|
204
|
+
@tasks_canceled = tasks_canceled unless tasks_canceled == SKIP
|
|
205
|
+
@tasks_completed = tasks_completed unless tasks_completed == SKIP
|
|
206
|
+
@tasks_created = tasks_created unless tasks_created == SKIP
|
|
207
|
+
@tasks_deleted = tasks_deleted unless tasks_deleted == SKIP
|
|
208
|
+
@tasks_moved = tasks_moved unless tasks_moved == SKIP
|
|
209
|
+
unless tasks_timed_out_in_workflow == SKIP
|
|
210
|
+
@tasks_timed_out_in_workflow =
|
|
211
|
+
tasks_timed_out_in_workflow
|
|
212
|
+
end
|
|
213
|
+
@workspace_sid = workspace_sid unless workspace_sid == SKIP
|
|
214
|
+
@url = url unless url == SKIP
|
|
215
|
+
@additional_properties = additional_properties
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Creates an instance of the object from a hash.
|
|
219
|
+
def self.from_hash(hash)
|
|
220
|
+
return nil unless hash
|
|
221
|
+
|
|
222
|
+
# Extract variables from the hash.
|
|
223
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
224
|
+
avg_task_acceptance_time = hash['avg_task_acceptance_time'] ||= 0
|
|
225
|
+
start_time = if hash.key?('start_time')
|
|
226
|
+
(DateTimeHelper.from_rfc3339(hash['start_time']) if hash['start_time'])
|
|
227
|
+
else
|
|
228
|
+
SKIP
|
|
229
|
+
end
|
|
230
|
+
end_time = if hash.key?('end_time')
|
|
231
|
+
(DateTimeHelper.from_rfc3339(hash['end_time']) if hash['end_time'])
|
|
232
|
+
else
|
|
233
|
+
SKIP
|
|
234
|
+
end
|
|
235
|
+
reservations_created = hash['reservations_created'] ||= 0
|
|
236
|
+
reservations_accepted = hash['reservations_accepted'] ||= 0
|
|
237
|
+
reservations_rejected = hash['reservations_rejected'] ||= 0
|
|
238
|
+
reservations_timed_out = hash['reservations_timed_out'] ||= 0
|
|
239
|
+
reservations_canceled = hash['reservations_canceled'] ||= 0
|
|
240
|
+
reservations_rescinded = hash['reservations_rescinded'] ||= 0
|
|
241
|
+
split_by_wait_time =
|
|
242
|
+
hash.key?('split_by_wait_time') ? hash['split_by_wait_time'] : SKIP
|
|
243
|
+
wait_duration_until_accepted =
|
|
244
|
+
hash.key?('wait_duration_until_accepted') ? hash['wait_duration_until_accepted'] : SKIP
|
|
245
|
+
wait_duration_until_canceled =
|
|
246
|
+
hash.key?('wait_duration_until_canceled') ? hash['wait_duration_until_canceled'] : SKIP
|
|
247
|
+
tasks_canceled = hash['tasks_canceled'] ||= 0
|
|
248
|
+
tasks_completed = hash['tasks_completed'] ||= 0
|
|
249
|
+
tasks_created = hash['tasks_created'] ||= 0
|
|
250
|
+
tasks_deleted = hash['tasks_deleted'] ||= 0
|
|
251
|
+
tasks_moved = hash['tasks_moved'] ||= 0
|
|
252
|
+
tasks_timed_out_in_workflow = hash['tasks_timed_out_in_workflow'] ||= 0
|
|
253
|
+
workspace_sid = hash.key?('workspace_sid') ? hash['workspace_sid'] : SKIP
|
|
254
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
255
|
+
|
|
256
|
+
# Create a new hash for additional properties, removing known properties.
|
|
257
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
258
|
+
|
|
259
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
260
|
+
new_hash, proc { |value| value }
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
# Create object from extracted values.
|
|
264
|
+
WorkspaceCumulativeStatistics.new(account_sid: account_sid,
|
|
265
|
+
avg_task_acceptance_time: avg_task_acceptance_time,
|
|
266
|
+
start_time: start_time,
|
|
267
|
+
end_time: end_time,
|
|
268
|
+
reservations_created: reservations_created,
|
|
269
|
+
reservations_accepted: reservations_accepted,
|
|
270
|
+
reservations_rejected: reservations_rejected,
|
|
271
|
+
reservations_timed_out: reservations_timed_out,
|
|
272
|
+
reservations_canceled: reservations_canceled,
|
|
273
|
+
reservations_rescinded: reservations_rescinded,
|
|
274
|
+
split_by_wait_time: split_by_wait_time,
|
|
275
|
+
wait_duration_until_accepted: wait_duration_until_accepted,
|
|
276
|
+
wait_duration_until_canceled: wait_duration_until_canceled,
|
|
277
|
+
tasks_canceled: tasks_canceled,
|
|
278
|
+
tasks_completed: tasks_completed,
|
|
279
|
+
tasks_created: tasks_created,
|
|
280
|
+
tasks_deleted: tasks_deleted,
|
|
281
|
+
tasks_moved: tasks_moved,
|
|
282
|
+
tasks_timed_out_in_workflow: tasks_timed_out_in_workflow,
|
|
283
|
+
workspace_sid: workspace_sid,
|
|
284
|
+
url: url,
|
|
285
|
+
additional_properties: additional_properties)
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
def to_custom_start_time
|
|
289
|
+
DateTimeHelper.to_rfc3339(start_time)
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
def to_custom_end_time
|
|
293
|
+
DateTimeHelper.to_rfc3339(end_time)
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Provides a human-readable string representation of the object.
|
|
297
|
+
def to_s
|
|
298
|
+
class_name = self.class.name.split('::').last
|
|
299
|
+
"<#{class_name} account_sid: #{@account_sid}, avg_task_acceptance_time:"\
|
|
300
|
+
" #{@avg_task_acceptance_time}, start_time: #{@start_time}, end_time: #{@end_time},"\
|
|
301
|
+
" reservations_created: #{@reservations_created}, reservations_accepted:"\
|
|
302
|
+
" #{@reservations_accepted}, reservations_rejected: #{@reservations_rejected},"\
|
|
303
|
+
" reservations_timed_out: #{@reservations_timed_out}, reservations_canceled:"\
|
|
304
|
+
" #{@reservations_canceled}, reservations_rescinded: #{@reservations_rescinded},"\
|
|
305
|
+
" split_by_wait_time: #{@split_by_wait_time}, wait_duration_until_accepted:"\
|
|
306
|
+
" #{@wait_duration_until_accepted}, wait_duration_until_canceled:"\
|
|
307
|
+
" #{@wait_duration_until_canceled}, tasks_canceled: #{@tasks_canceled}, tasks_completed:"\
|
|
308
|
+
" #{@tasks_completed}, tasks_created: #{@tasks_created}, tasks_deleted: #{@tasks_deleted},"\
|
|
309
|
+
" tasks_moved: #{@tasks_moved}, tasks_timed_out_in_workflow:"\
|
|
310
|
+
" #{@tasks_timed_out_in_workflow}, workspace_sid: #{@workspace_sid}, url: #{@url},"\
|
|
311
|
+
" additional_properties: #{@additional_properties}>"
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
315
|
+
def inspect
|
|
316
|
+
class_name = self.class.name.split('::').last
|
|
317
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, avg_task_acceptance_time:"\
|
|
318
|
+
" #{@avg_task_acceptance_time.inspect}, start_time: #{@start_time.inspect}, end_time:"\
|
|
319
|
+
" #{@end_time.inspect}, reservations_created: #{@reservations_created.inspect},"\
|
|
320
|
+
" reservations_accepted: #{@reservations_accepted.inspect}, reservations_rejected:"\
|
|
321
|
+
" #{@reservations_rejected.inspect}, reservations_timed_out:"\
|
|
322
|
+
" #{@reservations_timed_out.inspect}, reservations_canceled:"\
|
|
323
|
+
" #{@reservations_canceled.inspect}, reservations_rescinded:"\
|
|
324
|
+
" #{@reservations_rescinded.inspect}, split_by_wait_time: #{@split_by_wait_time.inspect},"\
|
|
325
|
+
" wait_duration_until_accepted: #{@wait_duration_until_accepted.inspect},"\
|
|
326
|
+
" wait_duration_until_canceled: #{@wait_duration_until_canceled.inspect}, tasks_canceled:"\
|
|
327
|
+
" #{@tasks_canceled.inspect}, tasks_completed: #{@tasks_completed.inspect}, tasks_created:"\
|
|
328
|
+
" #{@tasks_created.inspect}, tasks_deleted: #{@tasks_deleted.inspect}, tasks_moved:"\
|
|
329
|
+
" #{@tasks_moved.inspect}, tasks_timed_out_in_workflow:"\
|
|
330
|
+
" #{@tasks_timed_out_in_workflow.inspect}, workspace_sid: #{@workspace_sid.inspect}, url:"\
|
|
331
|
+
" #{@url.inspect}, additional_properties: #{@additional_properties}>"
|
|
332
|
+
end
|
|
333
|
+
end
|
|
334
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
# The type of TaskQueue to prioritize when Workers are receiving Tasks from
|
|
8
|
+
# both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is
|
|
9
|
+
# `FIFO`. For more information, see [Queue
|
|
10
|
+
# Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-o
|
|
11
|
+
# ut-lifo).
|
|
12
|
+
class WorkspaceQueueOrder
|
|
13
|
+
WORKSPACE_QUEUE_ORDER = [
|
|
14
|
+
# TODO: Write general description for FIFO
|
|
15
|
+
FIFO = 'FIFO'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for LIFO
|
|
18
|
+
LIFO = 'LIFO'.freeze
|
|
19
|
+
].freeze
|
|
20
|
+
|
|
21
|
+
def self.validate(value)
|
|
22
|
+
return false if value.nil?
|
|
23
|
+
|
|
24
|
+
WORKSPACE_QUEUE_ORDER.include?(value)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def self.from_value(value, default_value = FIFO)
|
|
28
|
+
return default_value if value.nil?
|
|
29
|
+
|
|
30
|
+
str = value.to_s.strip
|
|
31
|
+
|
|
32
|
+
case str.downcase
|
|
33
|
+
when 'fifo' then FIFO
|
|
34
|
+
when 'lifo' then LIFO
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|