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,347 @@
|
|
|
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
|
+
# WorkflowCumulativeStatistics Model.
|
|
9
|
+
class WorkflowCumulativeStatistics < 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 Workflow 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 that entered the Workflow.
|
|
80
|
+
# @return [Integer]
|
|
81
|
+
attr_accessor :tasks_entered
|
|
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
|
+
# Returns the list of Tasks that are being controlled by the Workflow with
|
|
97
|
+
# the specified Sid value.
|
|
98
|
+
# @return [String]
|
|
99
|
+
attr_accessor :workflow_sid
|
|
100
|
+
|
|
101
|
+
# The SID of the Workspace that contains the Workflow.
|
|
102
|
+
# @return [String]
|
|
103
|
+
attr_accessor :workspace_sid
|
|
104
|
+
|
|
105
|
+
# The absolute URL of the Workflow statistics resource.
|
|
106
|
+
# @return [String]
|
|
107
|
+
attr_accessor :url
|
|
108
|
+
|
|
109
|
+
# A mapping from model property names to API property names.
|
|
110
|
+
def self.names
|
|
111
|
+
@_hash = {} if @_hash.nil?
|
|
112
|
+
@_hash['account_sid'] = 'account_sid'
|
|
113
|
+
@_hash['avg_task_acceptance_time'] = 'avg_task_acceptance_time'
|
|
114
|
+
@_hash['start_time'] = 'start_time'
|
|
115
|
+
@_hash['end_time'] = 'end_time'
|
|
116
|
+
@_hash['reservations_created'] = 'reservations_created'
|
|
117
|
+
@_hash['reservations_accepted'] = 'reservations_accepted'
|
|
118
|
+
@_hash['reservations_rejected'] = 'reservations_rejected'
|
|
119
|
+
@_hash['reservations_timed_out'] = 'reservations_timed_out'
|
|
120
|
+
@_hash['reservations_canceled'] = 'reservations_canceled'
|
|
121
|
+
@_hash['reservations_rescinded'] = 'reservations_rescinded'
|
|
122
|
+
@_hash['split_by_wait_time'] = 'split_by_wait_time'
|
|
123
|
+
@_hash['wait_duration_until_accepted'] = 'wait_duration_until_accepted'
|
|
124
|
+
@_hash['wait_duration_until_canceled'] = 'wait_duration_until_canceled'
|
|
125
|
+
@_hash['tasks_canceled'] = 'tasks_canceled'
|
|
126
|
+
@_hash['tasks_completed'] = 'tasks_completed'
|
|
127
|
+
@_hash['tasks_entered'] = 'tasks_entered'
|
|
128
|
+
@_hash['tasks_deleted'] = 'tasks_deleted'
|
|
129
|
+
@_hash['tasks_moved'] = 'tasks_moved'
|
|
130
|
+
@_hash['tasks_timed_out_in_workflow'] = 'tasks_timed_out_in_workflow'
|
|
131
|
+
@_hash['workflow_sid'] = 'workflow_sid'
|
|
132
|
+
@_hash['workspace_sid'] = 'workspace_sid'
|
|
133
|
+
@_hash['url'] = 'url'
|
|
134
|
+
@_hash
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# An array for optional fields
|
|
138
|
+
def self.optionals
|
|
139
|
+
%w[
|
|
140
|
+
account_sid
|
|
141
|
+
avg_task_acceptance_time
|
|
142
|
+
start_time
|
|
143
|
+
end_time
|
|
144
|
+
reservations_created
|
|
145
|
+
reservations_accepted
|
|
146
|
+
reservations_rejected
|
|
147
|
+
reservations_timed_out
|
|
148
|
+
reservations_canceled
|
|
149
|
+
reservations_rescinded
|
|
150
|
+
split_by_wait_time
|
|
151
|
+
wait_duration_until_accepted
|
|
152
|
+
wait_duration_until_canceled
|
|
153
|
+
tasks_canceled
|
|
154
|
+
tasks_completed
|
|
155
|
+
tasks_entered
|
|
156
|
+
tasks_deleted
|
|
157
|
+
tasks_moved
|
|
158
|
+
tasks_timed_out_in_workflow
|
|
159
|
+
workflow_sid
|
|
160
|
+
workspace_sid
|
|
161
|
+
url
|
|
162
|
+
]
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# An array for nullable fields
|
|
166
|
+
def self.nullables
|
|
167
|
+
%w[
|
|
168
|
+
account_sid
|
|
169
|
+
start_time
|
|
170
|
+
end_time
|
|
171
|
+
split_by_wait_time
|
|
172
|
+
wait_duration_until_accepted
|
|
173
|
+
wait_duration_until_canceled
|
|
174
|
+
workflow_sid
|
|
175
|
+
workspace_sid
|
|
176
|
+
url
|
|
177
|
+
]
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
def initialize(account_sid: SKIP, avg_task_acceptance_time: 0,
|
|
181
|
+
start_time: SKIP, end_time: SKIP, reservations_created: 0,
|
|
182
|
+
reservations_accepted: 0, reservations_rejected: 0,
|
|
183
|
+
reservations_timed_out: 0, reservations_canceled: 0,
|
|
184
|
+
reservations_rescinded: 0, split_by_wait_time: SKIP,
|
|
185
|
+
wait_duration_until_accepted: SKIP,
|
|
186
|
+
wait_duration_until_canceled: SKIP, tasks_canceled: 0,
|
|
187
|
+
tasks_completed: 0, tasks_entered: 0, tasks_deleted: 0,
|
|
188
|
+
tasks_moved: 0, tasks_timed_out_in_workflow: 0,
|
|
189
|
+
workflow_sid: SKIP, workspace_sid: SKIP, url: SKIP,
|
|
190
|
+
additional_properties: nil)
|
|
191
|
+
# Add additional model properties to the instance
|
|
192
|
+
additional_properties = {} if additional_properties.nil?
|
|
193
|
+
|
|
194
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
195
|
+
@avg_task_acceptance_time = avg_task_acceptance_time unless avg_task_acceptance_time == SKIP
|
|
196
|
+
@start_time = start_time unless start_time == SKIP
|
|
197
|
+
@end_time = end_time unless end_time == SKIP
|
|
198
|
+
@reservations_created = reservations_created unless reservations_created == SKIP
|
|
199
|
+
@reservations_accepted = reservations_accepted unless reservations_accepted == SKIP
|
|
200
|
+
@reservations_rejected = reservations_rejected unless reservations_rejected == SKIP
|
|
201
|
+
@reservations_timed_out = reservations_timed_out unless reservations_timed_out == SKIP
|
|
202
|
+
@reservations_canceled = reservations_canceled unless reservations_canceled == SKIP
|
|
203
|
+
@reservations_rescinded = reservations_rescinded unless reservations_rescinded == SKIP
|
|
204
|
+
@split_by_wait_time = split_by_wait_time unless split_by_wait_time == SKIP
|
|
205
|
+
unless wait_duration_until_accepted == SKIP
|
|
206
|
+
@wait_duration_until_accepted =
|
|
207
|
+
wait_duration_until_accepted
|
|
208
|
+
end
|
|
209
|
+
unless wait_duration_until_canceled == SKIP
|
|
210
|
+
@wait_duration_until_canceled =
|
|
211
|
+
wait_duration_until_canceled
|
|
212
|
+
end
|
|
213
|
+
@tasks_canceled = tasks_canceled unless tasks_canceled == SKIP
|
|
214
|
+
@tasks_completed = tasks_completed unless tasks_completed == SKIP
|
|
215
|
+
@tasks_entered = tasks_entered unless tasks_entered == SKIP
|
|
216
|
+
@tasks_deleted = tasks_deleted unless tasks_deleted == SKIP
|
|
217
|
+
@tasks_moved = tasks_moved unless tasks_moved == SKIP
|
|
218
|
+
unless tasks_timed_out_in_workflow == SKIP
|
|
219
|
+
@tasks_timed_out_in_workflow =
|
|
220
|
+
tasks_timed_out_in_workflow
|
|
221
|
+
end
|
|
222
|
+
@workflow_sid = workflow_sid unless workflow_sid == SKIP
|
|
223
|
+
@workspace_sid = workspace_sid unless workspace_sid == SKIP
|
|
224
|
+
@url = url unless url == SKIP
|
|
225
|
+
@additional_properties = additional_properties
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Creates an instance of the object from a hash.
|
|
229
|
+
def self.from_hash(hash)
|
|
230
|
+
return nil unless hash
|
|
231
|
+
|
|
232
|
+
# Extract variables from the hash.
|
|
233
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
234
|
+
avg_task_acceptance_time = hash['avg_task_acceptance_time'] ||= 0
|
|
235
|
+
start_time = if hash.key?('start_time')
|
|
236
|
+
(DateTimeHelper.from_rfc3339(hash['start_time']) if hash['start_time'])
|
|
237
|
+
else
|
|
238
|
+
SKIP
|
|
239
|
+
end
|
|
240
|
+
end_time = if hash.key?('end_time')
|
|
241
|
+
(DateTimeHelper.from_rfc3339(hash['end_time']) if hash['end_time'])
|
|
242
|
+
else
|
|
243
|
+
SKIP
|
|
244
|
+
end
|
|
245
|
+
reservations_created = hash['reservations_created'] ||= 0
|
|
246
|
+
reservations_accepted = hash['reservations_accepted'] ||= 0
|
|
247
|
+
reservations_rejected = hash['reservations_rejected'] ||= 0
|
|
248
|
+
reservations_timed_out = hash['reservations_timed_out'] ||= 0
|
|
249
|
+
reservations_canceled = hash['reservations_canceled'] ||= 0
|
|
250
|
+
reservations_rescinded = hash['reservations_rescinded'] ||= 0
|
|
251
|
+
split_by_wait_time =
|
|
252
|
+
hash.key?('split_by_wait_time') ? hash['split_by_wait_time'] : SKIP
|
|
253
|
+
wait_duration_until_accepted =
|
|
254
|
+
hash.key?('wait_duration_until_accepted') ? hash['wait_duration_until_accepted'] : SKIP
|
|
255
|
+
wait_duration_until_canceled =
|
|
256
|
+
hash.key?('wait_duration_until_canceled') ? hash['wait_duration_until_canceled'] : SKIP
|
|
257
|
+
tasks_canceled = hash['tasks_canceled'] ||= 0
|
|
258
|
+
tasks_completed = hash['tasks_completed'] ||= 0
|
|
259
|
+
tasks_entered = hash['tasks_entered'] ||= 0
|
|
260
|
+
tasks_deleted = hash['tasks_deleted'] ||= 0
|
|
261
|
+
tasks_moved = hash['tasks_moved'] ||= 0
|
|
262
|
+
tasks_timed_out_in_workflow = hash['tasks_timed_out_in_workflow'] ||= 0
|
|
263
|
+
workflow_sid = hash.key?('workflow_sid') ? hash['workflow_sid'] : SKIP
|
|
264
|
+
workspace_sid = hash.key?('workspace_sid') ? hash['workspace_sid'] : SKIP
|
|
265
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
266
|
+
|
|
267
|
+
# Create a new hash for additional properties, removing known properties.
|
|
268
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
269
|
+
|
|
270
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
271
|
+
new_hash, proc { |value| value }
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
# Create object from extracted values.
|
|
275
|
+
WorkflowCumulativeStatistics.new(account_sid: account_sid,
|
|
276
|
+
avg_task_acceptance_time: avg_task_acceptance_time,
|
|
277
|
+
start_time: start_time,
|
|
278
|
+
end_time: end_time,
|
|
279
|
+
reservations_created: reservations_created,
|
|
280
|
+
reservations_accepted: reservations_accepted,
|
|
281
|
+
reservations_rejected: reservations_rejected,
|
|
282
|
+
reservations_timed_out: reservations_timed_out,
|
|
283
|
+
reservations_canceled: reservations_canceled,
|
|
284
|
+
reservations_rescinded: reservations_rescinded,
|
|
285
|
+
split_by_wait_time: split_by_wait_time,
|
|
286
|
+
wait_duration_until_accepted: wait_duration_until_accepted,
|
|
287
|
+
wait_duration_until_canceled: wait_duration_until_canceled,
|
|
288
|
+
tasks_canceled: tasks_canceled,
|
|
289
|
+
tasks_completed: tasks_completed,
|
|
290
|
+
tasks_entered: tasks_entered,
|
|
291
|
+
tasks_deleted: tasks_deleted,
|
|
292
|
+
tasks_moved: tasks_moved,
|
|
293
|
+
tasks_timed_out_in_workflow: tasks_timed_out_in_workflow,
|
|
294
|
+
workflow_sid: workflow_sid,
|
|
295
|
+
workspace_sid: workspace_sid,
|
|
296
|
+
url: url,
|
|
297
|
+
additional_properties: additional_properties)
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
def to_custom_start_time
|
|
301
|
+
DateTimeHelper.to_rfc3339(start_time)
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
def to_custom_end_time
|
|
305
|
+
DateTimeHelper.to_rfc3339(end_time)
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Provides a human-readable string representation of the object.
|
|
309
|
+
def to_s
|
|
310
|
+
class_name = self.class.name.split('::').last
|
|
311
|
+
"<#{class_name} account_sid: #{@account_sid}, avg_task_acceptance_time:"\
|
|
312
|
+
" #{@avg_task_acceptance_time}, start_time: #{@start_time}, end_time: #{@end_time},"\
|
|
313
|
+
" reservations_created: #{@reservations_created}, reservations_accepted:"\
|
|
314
|
+
" #{@reservations_accepted}, reservations_rejected: #{@reservations_rejected},"\
|
|
315
|
+
" reservations_timed_out: #{@reservations_timed_out}, reservations_canceled:"\
|
|
316
|
+
" #{@reservations_canceled}, reservations_rescinded: #{@reservations_rescinded},"\
|
|
317
|
+
" split_by_wait_time: #{@split_by_wait_time}, wait_duration_until_accepted:"\
|
|
318
|
+
" #{@wait_duration_until_accepted}, wait_duration_until_canceled:"\
|
|
319
|
+
" #{@wait_duration_until_canceled}, tasks_canceled: #{@tasks_canceled}, tasks_completed:"\
|
|
320
|
+
" #{@tasks_completed}, tasks_entered: #{@tasks_entered}, tasks_deleted: #{@tasks_deleted},"\
|
|
321
|
+
" tasks_moved: #{@tasks_moved}, tasks_timed_out_in_workflow:"\
|
|
322
|
+
" #{@tasks_timed_out_in_workflow}, workflow_sid: #{@workflow_sid}, workspace_sid:"\
|
|
323
|
+
" #{@workspace_sid}, url: #{@url}, additional_properties: #{@additional_properties}>"
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
327
|
+
def inspect
|
|
328
|
+
class_name = self.class.name.split('::').last
|
|
329
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, avg_task_acceptance_time:"\
|
|
330
|
+
" #{@avg_task_acceptance_time.inspect}, start_time: #{@start_time.inspect}, end_time:"\
|
|
331
|
+
" #{@end_time.inspect}, reservations_created: #{@reservations_created.inspect},"\
|
|
332
|
+
" reservations_accepted: #{@reservations_accepted.inspect}, reservations_rejected:"\
|
|
333
|
+
" #{@reservations_rejected.inspect}, reservations_timed_out:"\
|
|
334
|
+
" #{@reservations_timed_out.inspect}, reservations_canceled:"\
|
|
335
|
+
" #{@reservations_canceled.inspect}, reservations_rescinded:"\
|
|
336
|
+
" #{@reservations_rescinded.inspect}, split_by_wait_time: #{@split_by_wait_time.inspect},"\
|
|
337
|
+
" wait_duration_until_accepted: #{@wait_duration_until_accepted.inspect},"\
|
|
338
|
+
" wait_duration_until_canceled: #{@wait_duration_until_canceled.inspect}, tasks_canceled:"\
|
|
339
|
+
" #{@tasks_canceled.inspect}, tasks_completed: #{@tasks_completed.inspect}, tasks_entered:"\
|
|
340
|
+
" #{@tasks_entered.inspect}, tasks_deleted: #{@tasks_deleted.inspect}, tasks_moved:"\
|
|
341
|
+
" #{@tasks_moved.inspect}, tasks_timed_out_in_workflow:"\
|
|
342
|
+
" #{@tasks_timed_out_in_workflow.inspect}, workflow_sid: #{@workflow_sid.inspect},"\
|
|
343
|
+
" workspace_sid: #{@workspace_sid.inspect}, url: #{@url.inspect}, additional_properties:"\
|
|
344
|
+
" #{@additional_properties}>"
|
|
345
|
+
end
|
|
346
|
+
end
|
|
347
|
+
end
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# WorkflowRealTimeStatistics Model.
|
|
8
|
+
class WorkflowRealTimeStatistics < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that
|
|
13
|
+
# created the Workflow resource.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :account_sid
|
|
16
|
+
|
|
17
|
+
# The age of the longest waiting Task.
|
|
18
|
+
# @return [Integer]
|
|
19
|
+
attr_accessor :longest_task_waiting_age
|
|
20
|
+
|
|
21
|
+
# The SID of the longest waiting Task.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :longest_task_waiting_sid
|
|
24
|
+
|
|
25
|
+
# The number of Tasks by priority. For example: `{"0": "10", "99": "5"}`
|
|
26
|
+
# shows 10 Tasks at priority 0 and 5 at priority 99.
|
|
27
|
+
# @return [Object]
|
|
28
|
+
attr_accessor :tasks_by_priority
|
|
29
|
+
|
|
30
|
+
# The number of Tasks by their current status. For example: `{"pending":
|
|
31
|
+
# "1", "reserved": "3", "assigned": "2", "completed": "5"}`.
|
|
32
|
+
# @return [Object]
|
|
33
|
+
attr_accessor :tasks_by_status
|
|
34
|
+
|
|
35
|
+
# The total number of Tasks.
|
|
36
|
+
# @return [Integer]
|
|
37
|
+
attr_accessor :total_tasks
|
|
38
|
+
|
|
39
|
+
# Returns the list of Tasks that are being controlled by the Workflow with
|
|
40
|
+
# the specified SID value.
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :workflow_sid
|
|
43
|
+
|
|
44
|
+
# The SID of the Workspace that contains the Workflow.
|
|
45
|
+
# @return [String]
|
|
46
|
+
attr_accessor :workspace_sid
|
|
47
|
+
|
|
48
|
+
# The absolute URL of the Workflow statistics resource.
|
|
49
|
+
# @return [String]
|
|
50
|
+
attr_accessor :url
|
|
51
|
+
|
|
52
|
+
# A mapping from model property names to API property names.
|
|
53
|
+
def self.names
|
|
54
|
+
@_hash = {} if @_hash.nil?
|
|
55
|
+
@_hash['account_sid'] = 'account_sid'
|
|
56
|
+
@_hash['longest_task_waiting_age'] = 'longest_task_waiting_age'
|
|
57
|
+
@_hash['longest_task_waiting_sid'] = 'longest_task_waiting_sid'
|
|
58
|
+
@_hash['tasks_by_priority'] = 'tasks_by_priority'
|
|
59
|
+
@_hash['tasks_by_status'] = 'tasks_by_status'
|
|
60
|
+
@_hash['total_tasks'] = 'total_tasks'
|
|
61
|
+
@_hash['workflow_sid'] = 'workflow_sid'
|
|
62
|
+
@_hash['workspace_sid'] = 'workspace_sid'
|
|
63
|
+
@_hash['url'] = 'url'
|
|
64
|
+
@_hash
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# An array for optional fields
|
|
68
|
+
def self.optionals
|
|
69
|
+
%w[
|
|
70
|
+
account_sid
|
|
71
|
+
longest_task_waiting_age
|
|
72
|
+
longest_task_waiting_sid
|
|
73
|
+
tasks_by_priority
|
|
74
|
+
tasks_by_status
|
|
75
|
+
total_tasks
|
|
76
|
+
workflow_sid
|
|
77
|
+
workspace_sid
|
|
78
|
+
url
|
|
79
|
+
]
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# An array for nullable fields
|
|
83
|
+
def self.nullables
|
|
84
|
+
%w[
|
|
85
|
+
account_sid
|
|
86
|
+
longest_task_waiting_sid
|
|
87
|
+
tasks_by_priority
|
|
88
|
+
tasks_by_status
|
|
89
|
+
workflow_sid
|
|
90
|
+
workspace_sid
|
|
91
|
+
url
|
|
92
|
+
]
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def initialize(account_sid: SKIP, longest_task_waiting_age: 0,
|
|
96
|
+
longest_task_waiting_sid: SKIP, tasks_by_priority: SKIP,
|
|
97
|
+
tasks_by_status: SKIP, total_tasks: 0, workflow_sid: SKIP,
|
|
98
|
+
workspace_sid: SKIP, url: SKIP, additional_properties: nil)
|
|
99
|
+
# Add additional model properties to the instance
|
|
100
|
+
additional_properties = {} if additional_properties.nil?
|
|
101
|
+
|
|
102
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
103
|
+
@longest_task_waiting_age = longest_task_waiting_age unless longest_task_waiting_age == SKIP
|
|
104
|
+
@longest_task_waiting_sid = longest_task_waiting_sid unless longest_task_waiting_sid == SKIP
|
|
105
|
+
@tasks_by_priority = tasks_by_priority unless tasks_by_priority == SKIP
|
|
106
|
+
@tasks_by_status = tasks_by_status unless tasks_by_status == SKIP
|
|
107
|
+
@total_tasks = total_tasks unless total_tasks == SKIP
|
|
108
|
+
@workflow_sid = workflow_sid unless workflow_sid == SKIP
|
|
109
|
+
@workspace_sid = workspace_sid unless workspace_sid == SKIP
|
|
110
|
+
@url = url unless url == SKIP
|
|
111
|
+
@additional_properties = additional_properties
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Creates an instance of the object from a hash.
|
|
115
|
+
def self.from_hash(hash)
|
|
116
|
+
return nil unless hash
|
|
117
|
+
|
|
118
|
+
# Extract variables from the hash.
|
|
119
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
120
|
+
longest_task_waiting_age = hash['longest_task_waiting_age'] ||= 0
|
|
121
|
+
longest_task_waiting_sid =
|
|
122
|
+
hash.key?('longest_task_waiting_sid') ? hash['longest_task_waiting_sid'] : SKIP
|
|
123
|
+
tasks_by_priority =
|
|
124
|
+
hash.key?('tasks_by_priority') ? hash['tasks_by_priority'] : SKIP
|
|
125
|
+
tasks_by_status =
|
|
126
|
+
hash.key?('tasks_by_status') ? hash['tasks_by_status'] : SKIP
|
|
127
|
+
total_tasks = hash['total_tasks'] ||= 0
|
|
128
|
+
workflow_sid = hash.key?('workflow_sid') ? hash['workflow_sid'] : SKIP
|
|
129
|
+
workspace_sid = hash.key?('workspace_sid') ? hash['workspace_sid'] : SKIP
|
|
130
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
131
|
+
|
|
132
|
+
# Create a new hash for additional properties, removing known properties.
|
|
133
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
134
|
+
|
|
135
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
136
|
+
new_hash, proc { |value| value }
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
# Create object from extracted values.
|
|
140
|
+
WorkflowRealTimeStatistics.new(account_sid: account_sid,
|
|
141
|
+
longest_task_waiting_age: longest_task_waiting_age,
|
|
142
|
+
longest_task_waiting_sid: longest_task_waiting_sid,
|
|
143
|
+
tasks_by_priority: tasks_by_priority,
|
|
144
|
+
tasks_by_status: tasks_by_status,
|
|
145
|
+
total_tasks: total_tasks,
|
|
146
|
+
workflow_sid: workflow_sid,
|
|
147
|
+
workspace_sid: workspace_sid,
|
|
148
|
+
url: url,
|
|
149
|
+
additional_properties: additional_properties)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Provides a human-readable string representation of the object.
|
|
153
|
+
def to_s
|
|
154
|
+
class_name = self.class.name.split('::').last
|
|
155
|
+
"<#{class_name} account_sid: #{@account_sid}, longest_task_waiting_age:"\
|
|
156
|
+
" #{@longest_task_waiting_age}, longest_task_waiting_sid: #{@longest_task_waiting_sid},"\
|
|
157
|
+
" tasks_by_priority: #{@tasks_by_priority}, tasks_by_status: #{@tasks_by_status},"\
|
|
158
|
+
" total_tasks: #{@total_tasks}, workflow_sid: #{@workflow_sid}, workspace_sid:"\
|
|
159
|
+
" #{@workspace_sid}, url: #{@url}, additional_properties: #{@additional_properties}>"
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
163
|
+
def inspect
|
|
164
|
+
class_name = self.class.name.split('::').last
|
|
165
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, longest_task_waiting_age:"\
|
|
166
|
+
" #{@longest_task_waiting_age.inspect}, longest_task_waiting_sid:"\
|
|
167
|
+
" #{@longest_task_waiting_sid.inspect}, tasks_by_priority: #{@tasks_by_priority.inspect},"\
|
|
168
|
+
" tasks_by_status: #{@tasks_by_status.inspect}, total_tasks: #{@total_tasks.inspect},"\
|
|
169
|
+
" workflow_sid: #{@workflow_sid.inspect}, workspace_sid: #{@workspace_sid.inspect}, url:"\
|
|
170
|
+
" #{@url.inspect}, additional_properties: #{@additional_properties}>"
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
end
|
|
@@ -0,0 +1,135 @@
|
|
|
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
|
+
# WorkflowStatistics Model.
|
|
8
|
+
class WorkflowStatistics < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that
|
|
13
|
+
# created the Workflow resource.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :account_sid
|
|
16
|
+
|
|
17
|
+
# An object that contains the cumulative statistics for the Workflow.
|
|
18
|
+
# @return [Object]
|
|
19
|
+
attr_accessor :cumulative
|
|
20
|
+
|
|
21
|
+
# An object that contains the real-time statistics for the Workflow.
|
|
22
|
+
# @return [Object]
|
|
23
|
+
attr_accessor :realtime
|
|
24
|
+
|
|
25
|
+
# Returns the list of Tasks that are being controlled by the Workflow with
|
|
26
|
+
# the specified SID value.
|
|
27
|
+
# @return [String]
|
|
28
|
+
attr_accessor :workflow_sid
|
|
29
|
+
|
|
30
|
+
# The SID of the Workspace that contains the Workflow.
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :workspace_sid
|
|
33
|
+
|
|
34
|
+
# The absolute URL of the Workflow statistics resource.
|
|
35
|
+
# @return [String]
|
|
36
|
+
attr_accessor :url
|
|
37
|
+
|
|
38
|
+
# A mapping from model property names to API property names.
|
|
39
|
+
def self.names
|
|
40
|
+
@_hash = {} if @_hash.nil?
|
|
41
|
+
@_hash['account_sid'] = 'account_sid'
|
|
42
|
+
@_hash['cumulative'] = 'cumulative'
|
|
43
|
+
@_hash['realtime'] = 'realtime'
|
|
44
|
+
@_hash['workflow_sid'] = 'workflow_sid'
|
|
45
|
+
@_hash['workspace_sid'] = 'workspace_sid'
|
|
46
|
+
@_hash['url'] = 'url'
|
|
47
|
+
@_hash
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# An array for optional fields
|
|
51
|
+
def self.optionals
|
|
52
|
+
%w[
|
|
53
|
+
account_sid
|
|
54
|
+
cumulative
|
|
55
|
+
realtime
|
|
56
|
+
workflow_sid
|
|
57
|
+
workspace_sid
|
|
58
|
+
url
|
|
59
|
+
]
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# An array for nullable fields
|
|
63
|
+
def self.nullables
|
|
64
|
+
%w[
|
|
65
|
+
account_sid
|
|
66
|
+
cumulative
|
|
67
|
+
realtime
|
|
68
|
+
workflow_sid
|
|
69
|
+
workspace_sid
|
|
70
|
+
url
|
|
71
|
+
]
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def initialize(account_sid: SKIP, cumulative: SKIP, realtime: SKIP,
|
|
75
|
+
workflow_sid: SKIP, workspace_sid: SKIP, url: SKIP,
|
|
76
|
+
additional_properties: nil)
|
|
77
|
+
# Add additional model properties to the instance
|
|
78
|
+
additional_properties = {} if additional_properties.nil?
|
|
79
|
+
|
|
80
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
81
|
+
@cumulative = cumulative unless cumulative == SKIP
|
|
82
|
+
@realtime = realtime unless realtime == SKIP
|
|
83
|
+
@workflow_sid = workflow_sid unless workflow_sid == SKIP
|
|
84
|
+
@workspace_sid = workspace_sid unless workspace_sid == SKIP
|
|
85
|
+
@url = url unless url == SKIP
|
|
86
|
+
@additional_properties = additional_properties
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Creates an instance of the object from a hash.
|
|
90
|
+
def self.from_hash(hash)
|
|
91
|
+
return nil unless hash
|
|
92
|
+
|
|
93
|
+
# Extract variables from the hash.
|
|
94
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
95
|
+
cumulative = hash.key?('cumulative') ? hash['cumulative'] : SKIP
|
|
96
|
+
realtime = hash.key?('realtime') ? hash['realtime'] : SKIP
|
|
97
|
+
workflow_sid = hash.key?('workflow_sid') ? hash['workflow_sid'] : SKIP
|
|
98
|
+
workspace_sid = hash.key?('workspace_sid') ? hash['workspace_sid'] : SKIP
|
|
99
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
100
|
+
|
|
101
|
+
# Create a new hash for additional properties, removing known properties.
|
|
102
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
103
|
+
|
|
104
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
105
|
+
new_hash, proc { |value| value }
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
# Create object from extracted values.
|
|
109
|
+
WorkflowStatistics.new(account_sid: account_sid,
|
|
110
|
+
cumulative: cumulative,
|
|
111
|
+
realtime: realtime,
|
|
112
|
+
workflow_sid: workflow_sid,
|
|
113
|
+
workspace_sid: workspace_sid,
|
|
114
|
+
url: url,
|
|
115
|
+
additional_properties: additional_properties)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Provides a human-readable string representation of the object.
|
|
119
|
+
def to_s
|
|
120
|
+
class_name = self.class.name.split('::').last
|
|
121
|
+
"<#{class_name} account_sid: #{@account_sid}, cumulative: #{@cumulative}, realtime:"\
|
|
122
|
+
" #{@realtime}, workflow_sid: #{@workflow_sid}, workspace_sid: #{@workspace_sid}, url:"\
|
|
123
|
+
" #{@url}, additional_properties: #{@additional_properties}>"
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
127
|
+
def inspect
|
|
128
|
+
class_name = self.class.name.split('::').last
|
|
129
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, cumulative: #{@cumulative.inspect},"\
|
|
130
|
+
" realtime: #{@realtime.inspect}, workflow_sid: #{@workflow_sid.inspect}, workspace_sid:"\
|
|
131
|
+
" #{@workspace_sid.inspect}, url: #{@url.inspect}, additional_properties:"\
|
|
132
|
+
" #{@additional_properties}>"
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
end
|