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,221 @@
|
|
|
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
|
+
# WorkersCumulativeStatistics Model.
|
|
9
|
+
class WorkersCumulativeStatistics < 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 Worker resource.
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :account_sid
|
|
17
|
+
|
|
18
|
+
# The beginning of the interval during which these statistics were
|
|
19
|
+
# calculated, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
20
|
+
# @return [DateTime]
|
|
21
|
+
attr_accessor :start_time
|
|
22
|
+
|
|
23
|
+
# The end of the interval during which these statistics were calculated, in
|
|
24
|
+
# [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
25
|
+
# @return [DateTime]
|
|
26
|
+
attr_accessor :end_time
|
|
27
|
+
|
|
28
|
+
# The minimum, average, maximum, and total time (in seconds) that Workers
|
|
29
|
+
# spent in each Activity.
|
|
30
|
+
# @return [Array[Object]]
|
|
31
|
+
attr_accessor :activity_durations
|
|
32
|
+
|
|
33
|
+
# The total number of Reservations that were created.
|
|
34
|
+
# @return [Integer]
|
|
35
|
+
attr_accessor :reservations_created
|
|
36
|
+
|
|
37
|
+
# The total number of Reservations that were accepted.
|
|
38
|
+
# @return [Integer]
|
|
39
|
+
attr_accessor :reservations_accepted
|
|
40
|
+
|
|
41
|
+
# The total number of Reservations that were rejected.
|
|
42
|
+
# @return [Integer]
|
|
43
|
+
attr_accessor :reservations_rejected
|
|
44
|
+
|
|
45
|
+
# The total number of Reservations that were timed out.
|
|
46
|
+
# @return [Integer]
|
|
47
|
+
attr_accessor :reservations_timed_out
|
|
48
|
+
|
|
49
|
+
# The total number of Reservations that were canceled.
|
|
50
|
+
# @return [Integer]
|
|
51
|
+
attr_accessor :reservations_canceled
|
|
52
|
+
|
|
53
|
+
# The total number of Reservations that were rescinded.
|
|
54
|
+
# @return [Integer]
|
|
55
|
+
attr_accessor :reservations_rescinded
|
|
56
|
+
|
|
57
|
+
# The SID of the Workspace that contains the Workers.
|
|
58
|
+
# @return [String]
|
|
59
|
+
attr_accessor :workspace_sid
|
|
60
|
+
|
|
61
|
+
# The absolute URL of the Workers statistics resource.
|
|
62
|
+
# @return [String]
|
|
63
|
+
attr_accessor :url
|
|
64
|
+
|
|
65
|
+
# A mapping from model property names to API property names.
|
|
66
|
+
def self.names
|
|
67
|
+
@_hash = {} if @_hash.nil?
|
|
68
|
+
@_hash['account_sid'] = 'account_sid'
|
|
69
|
+
@_hash['start_time'] = 'start_time'
|
|
70
|
+
@_hash['end_time'] = 'end_time'
|
|
71
|
+
@_hash['activity_durations'] = 'activity_durations'
|
|
72
|
+
@_hash['reservations_created'] = 'reservations_created'
|
|
73
|
+
@_hash['reservations_accepted'] = 'reservations_accepted'
|
|
74
|
+
@_hash['reservations_rejected'] = 'reservations_rejected'
|
|
75
|
+
@_hash['reservations_timed_out'] = 'reservations_timed_out'
|
|
76
|
+
@_hash['reservations_canceled'] = 'reservations_canceled'
|
|
77
|
+
@_hash['reservations_rescinded'] = 'reservations_rescinded'
|
|
78
|
+
@_hash['workspace_sid'] = 'workspace_sid'
|
|
79
|
+
@_hash['url'] = 'url'
|
|
80
|
+
@_hash
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# An array for optional fields
|
|
84
|
+
def self.optionals
|
|
85
|
+
%w[
|
|
86
|
+
account_sid
|
|
87
|
+
start_time
|
|
88
|
+
end_time
|
|
89
|
+
activity_durations
|
|
90
|
+
reservations_created
|
|
91
|
+
reservations_accepted
|
|
92
|
+
reservations_rejected
|
|
93
|
+
reservations_timed_out
|
|
94
|
+
reservations_canceled
|
|
95
|
+
reservations_rescinded
|
|
96
|
+
workspace_sid
|
|
97
|
+
url
|
|
98
|
+
]
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# An array for nullable fields
|
|
102
|
+
def self.nullables
|
|
103
|
+
%w[
|
|
104
|
+
account_sid
|
|
105
|
+
start_time
|
|
106
|
+
end_time
|
|
107
|
+
activity_durations
|
|
108
|
+
workspace_sid
|
|
109
|
+
url
|
|
110
|
+
]
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def initialize(account_sid: SKIP, start_time: SKIP, end_time: SKIP,
|
|
114
|
+
activity_durations: SKIP, reservations_created: 0,
|
|
115
|
+
reservations_accepted: 0, reservations_rejected: 0,
|
|
116
|
+
reservations_timed_out: 0, reservations_canceled: 0,
|
|
117
|
+
reservations_rescinded: 0, workspace_sid: SKIP, url: SKIP,
|
|
118
|
+
additional_properties: nil)
|
|
119
|
+
# Add additional model properties to the instance
|
|
120
|
+
additional_properties = {} if additional_properties.nil?
|
|
121
|
+
|
|
122
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
123
|
+
@start_time = start_time unless start_time == SKIP
|
|
124
|
+
@end_time = end_time unless end_time == SKIP
|
|
125
|
+
@activity_durations = activity_durations unless activity_durations == SKIP
|
|
126
|
+
@reservations_created = reservations_created unless reservations_created == SKIP
|
|
127
|
+
@reservations_accepted = reservations_accepted unless reservations_accepted == SKIP
|
|
128
|
+
@reservations_rejected = reservations_rejected unless reservations_rejected == SKIP
|
|
129
|
+
@reservations_timed_out = reservations_timed_out unless reservations_timed_out == SKIP
|
|
130
|
+
@reservations_canceled = reservations_canceled unless reservations_canceled == SKIP
|
|
131
|
+
@reservations_rescinded = reservations_rescinded unless reservations_rescinded == SKIP
|
|
132
|
+
@workspace_sid = workspace_sid unless workspace_sid == SKIP
|
|
133
|
+
@url = url unless url == SKIP
|
|
134
|
+
@additional_properties = additional_properties
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Creates an instance of the object from a hash.
|
|
138
|
+
def self.from_hash(hash)
|
|
139
|
+
return nil unless hash
|
|
140
|
+
|
|
141
|
+
# Extract variables from the hash.
|
|
142
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
143
|
+
start_time = if hash.key?('start_time')
|
|
144
|
+
(DateTimeHelper.from_rfc3339(hash['start_time']) if hash['start_time'])
|
|
145
|
+
else
|
|
146
|
+
SKIP
|
|
147
|
+
end
|
|
148
|
+
end_time = if hash.key?('end_time')
|
|
149
|
+
(DateTimeHelper.from_rfc3339(hash['end_time']) if hash['end_time'])
|
|
150
|
+
else
|
|
151
|
+
SKIP
|
|
152
|
+
end
|
|
153
|
+
activity_durations =
|
|
154
|
+
hash.key?('activity_durations') ? hash['activity_durations'] : SKIP
|
|
155
|
+
reservations_created = hash['reservations_created'] ||= 0
|
|
156
|
+
reservations_accepted = hash['reservations_accepted'] ||= 0
|
|
157
|
+
reservations_rejected = hash['reservations_rejected'] ||= 0
|
|
158
|
+
reservations_timed_out = hash['reservations_timed_out'] ||= 0
|
|
159
|
+
reservations_canceled = hash['reservations_canceled'] ||= 0
|
|
160
|
+
reservations_rescinded = hash['reservations_rescinded'] ||= 0
|
|
161
|
+
workspace_sid = hash.key?('workspace_sid') ? hash['workspace_sid'] : SKIP
|
|
162
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
163
|
+
|
|
164
|
+
# Create a new hash for additional properties, removing known properties.
|
|
165
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
166
|
+
|
|
167
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
168
|
+
new_hash, proc { |value| value }
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
# Create object from extracted values.
|
|
172
|
+
WorkersCumulativeStatistics.new(account_sid: account_sid,
|
|
173
|
+
start_time: start_time,
|
|
174
|
+
end_time: end_time,
|
|
175
|
+
activity_durations: activity_durations,
|
|
176
|
+
reservations_created: reservations_created,
|
|
177
|
+
reservations_accepted: reservations_accepted,
|
|
178
|
+
reservations_rejected: reservations_rejected,
|
|
179
|
+
reservations_timed_out: reservations_timed_out,
|
|
180
|
+
reservations_canceled: reservations_canceled,
|
|
181
|
+
reservations_rescinded: reservations_rescinded,
|
|
182
|
+
workspace_sid: workspace_sid,
|
|
183
|
+
url: url,
|
|
184
|
+
additional_properties: additional_properties)
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
def to_custom_start_time
|
|
188
|
+
DateTimeHelper.to_rfc3339(start_time)
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
def to_custom_end_time
|
|
192
|
+
DateTimeHelper.to_rfc3339(end_time)
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Provides a human-readable string representation of the object.
|
|
196
|
+
def to_s
|
|
197
|
+
class_name = self.class.name.split('::').last
|
|
198
|
+
"<#{class_name} account_sid: #{@account_sid}, start_time: #{@start_time}, end_time:"\
|
|
199
|
+
" #{@end_time}, activity_durations: #{@activity_durations}, reservations_created:"\
|
|
200
|
+
" #{@reservations_created}, reservations_accepted: #{@reservations_accepted},"\
|
|
201
|
+
" reservations_rejected: #{@reservations_rejected}, reservations_timed_out:"\
|
|
202
|
+
" #{@reservations_timed_out}, reservations_canceled: #{@reservations_canceled},"\
|
|
203
|
+
" reservations_rescinded: #{@reservations_rescinded}, workspace_sid: #{@workspace_sid}, url:"\
|
|
204
|
+
" #{@url}, additional_properties: #{@additional_properties}>"
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
208
|
+
def inspect
|
|
209
|
+
class_name = self.class.name.split('::').last
|
|
210
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, start_time: #{@start_time.inspect},"\
|
|
211
|
+
" end_time: #{@end_time.inspect}, activity_durations: #{@activity_durations.inspect},"\
|
|
212
|
+
" reservations_created: #{@reservations_created.inspect}, reservations_accepted:"\
|
|
213
|
+
" #{@reservations_accepted.inspect}, reservations_rejected:"\
|
|
214
|
+
" #{@reservations_rejected.inspect}, reservations_timed_out:"\
|
|
215
|
+
" #{@reservations_timed_out.inspect}, reservations_canceled:"\
|
|
216
|
+
" #{@reservations_canceled.inspect}, reservations_rescinded:"\
|
|
217
|
+
" #{@reservations_rescinded.inspect}, workspace_sid: #{@workspace_sid.inspect}, url:"\
|
|
218
|
+
" #{@url.inspect}, additional_properties: #{@additional_properties}>"
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
end
|
|
@@ -0,0 +1,124 @@
|
|
|
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
|
+
# WorkersRealTimeStatistics Model.
|
|
8
|
+
class WorkersRealTimeStatistics < 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 Worker resource.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :account_sid
|
|
16
|
+
|
|
17
|
+
# The number of current Workers by Activity.
|
|
18
|
+
# @return [Array[Object]]
|
|
19
|
+
attr_accessor :activity_statistics
|
|
20
|
+
|
|
21
|
+
# The total number of Workers.
|
|
22
|
+
# @return [Integer]
|
|
23
|
+
attr_accessor :total_workers
|
|
24
|
+
|
|
25
|
+
# The SID of the Workspace that contains the Workers.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :workspace_sid
|
|
28
|
+
|
|
29
|
+
# The absolute URL of the Workers statistics resource.
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :url
|
|
32
|
+
|
|
33
|
+
# A mapping from model property names to API property names.
|
|
34
|
+
def self.names
|
|
35
|
+
@_hash = {} if @_hash.nil?
|
|
36
|
+
@_hash['account_sid'] = 'account_sid'
|
|
37
|
+
@_hash['activity_statistics'] = 'activity_statistics'
|
|
38
|
+
@_hash['total_workers'] = 'total_workers'
|
|
39
|
+
@_hash['workspace_sid'] = 'workspace_sid'
|
|
40
|
+
@_hash['url'] = 'url'
|
|
41
|
+
@_hash
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# An array for optional fields
|
|
45
|
+
def self.optionals
|
|
46
|
+
%w[
|
|
47
|
+
account_sid
|
|
48
|
+
activity_statistics
|
|
49
|
+
total_workers
|
|
50
|
+
workspace_sid
|
|
51
|
+
url
|
|
52
|
+
]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# An array for nullable fields
|
|
56
|
+
def self.nullables
|
|
57
|
+
%w[
|
|
58
|
+
account_sid
|
|
59
|
+
activity_statistics
|
|
60
|
+
workspace_sid
|
|
61
|
+
url
|
|
62
|
+
]
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def initialize(account_sid: SKIP, activity_statistics: SKIP,
|
|
66
|
+
total_workers: 0, workspace_sid: SKIP, url: SKIP,
|
|
67
|
+
additional_properties: nil)
|
|
68
|
+
# Add additional model properties to the instance
|
|
69
|
+
additional_properties = {} if additional_properties.nil?
|
|
70
|
+
|
|
71
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
72
|
+
@activity_statistics = activity_statistics unless activity_statistics == SKIP
|
|
73
|
+
@total_workers = total_workers unless total_workers == SKIP
|
|
74
|
+
@workspace_sid = workspace_sid unless workspace_sid == SKIP
|
|
75
|
+
@url = url unless url == SKIP
|
|
76
|
+
@additional_properties = additional_properties
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Creates an instance of the object from a hash.
|
|
80
|
+
def self.from_hash(hash)
|
|
81
|
+
return nil unless hash
|
|
82
|
+
|
|
83
|
+
# Extract variables from the hash.
|
|
84
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
85
|
+
activity_statistics =
|
|
86
|
+
hash.key?('activity_statistics') ? hash['activity_statistics'] : SKIP
|
|
87
|
+
total_workers = hash['total_workers'] ||= 0
|
|
88
|
+
workspace_sid = hash.key?('workspace_sid') ? hash['workspace_sid'] : SKIP
|
|
89
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
90
|
+
|
|
91
|
+
# Create a new hash for additional properties, removing known properties.
|
|
92
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
93
|
+
|
|
94
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
95
|
+
new_hash, proc { |value| value }
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
# Create object from extracted values.
|
|
99
|
+
WorkersRealTimeStatistics.new(account_sid: account_sid,
|
|
100
|
+
activity_statistics: activity_statistics,
|
|
101
|
+
total_workers: total_workers,
|
|
102
|
+
workspace_sid: workspace_sid,
|
|
103
|
+
url: url,
|
|
104
|
+
additional_properties: additional_properties)
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Provides a human-readable string representation of the object.
|
|
108
|
+
def to_s
|
|
109
|
+
class_name = self.class.name.split('::').last
|
|
110
|
+
"<#{class_name} account_sid: #{@account_sid}, activity_statistics: #{@activity_statistics},"\
|
|
111
|
+
" total_workers: #{@total_workers}, workspace_sid: #{@workspace_sid}, url: #{@url},"\
|
|
112
|
+
" additional_properties: #{@additional_properties}>"
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
116
|
+
def inspect
|
|
117
|
+
class_name = self.class.name.split('::').last
|
|
118
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, activity_statistics:"\
|
|
119
|
+
" #{@activity_statistics.inspect}, total_workers: #{@total_workers.inspect}, workspace_sid:"\
|
|
120
|
+
" #{@workspace_sid.inspect}, url: #{@url.inspect}, additional_properties:"\
|
|
121
|
+
" #{@additional_properties}>"
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
end
|
|
@@ -0,0 +1,247 @@
|
|
|
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
|
+
# Workflow Model.
|
|
9
|
+
class Workflow < 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 URL that we call when a task managed by the Workflow is assigned to a
|
|
19
|
+
# Worker. See Assignment Callback URL for more information.
|
|
20
|
+
# @return [String]
|
|
21
|
+
attr_accessor :assignment_callback_url
|
|
22
|
+
|
|
23
|
+
# A JSON string that contains the Workflow's configuration. See [Configuring
|
|
24
|
+
# Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration)
|
|
25
|
+
# for more information.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :configuration
|
|
28
|
+
|
|
29
|
+
# The date and time in GMT when the resource was created specified in [RFC
|
|
30
|
+
# 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
31
|
+
# @return [DateTime]
|
|
32
|
+
attr_accessor :date_created
|
|
33
|
+
|
|
34
|
+
# The date and time in GMT when the resource was last updated specified in
|
|
35
|
+
# [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
36
|
+
# @return [DateTime]
|
|
37
|
+
attr_accessor :date_updated
|
|
38
|
+
|
|
39
|
+
# The MIME type of the document.
|
|
40
|
+
# @return [String]
|
|
41
|
+
attr_accessor :document_content_type
|
|
42
|
+
|
|
43
|
+
# The URL that we call when a call to the `assignment_callback_url` fails.
|
|
44
|
+
# @return [String]
|
|
45
|
+
attr_accessor :fallback_assignment_callback_url
|
|
46
|
+
|
|
47
|
+
# The string that you assigned to describe the Workflow resource. For
|
|
48
|
+
# example, `Customer Support` or `2014 Election Campaign`.
|
|
49
|
+
# @return [String]
|
|
50
|
+
attr_accessor :friendly_name
|
|
51
|
+
|
|
52
|
+
# The unique string that we created to identify the Workflow resource.
|
|
53
|
+
# @return [String]
|
|
54
|
+
attr_accessor :sid
|
|
55
|
+
|
|
56
|
+
# How long TaskRouter will wait for a confirmation response from your
|
|
57
|
+
# application after it assigns a Task to a Worker. Can be up to `86,400` (24
|
|
58
|
+
# hours) and the default is `120`.
|
|
59
|
+
# @return [Integer]
|
|
60
|
+
attr_accessor :task_reservation_timeout
|
|
61
|
+
|
|
62
|
+
# The SID of the Workspace that contains the Workflow.
|
|
63
|
+
# @return [String]
|
|
64
|
+
attr_accessor :workspace_sid
|
|
65
|
+
|
|
66
|
+
# The absolute URL of the Workflow resource.
|
|
67
|
+
# @return [String]
|
|
68
|
+
attr_accessor :url
|
|
69
|
+
|
|
70
|
+
# The URLs of related resources.
|
|
71
|
+
# @return [Object]
|
|
72
|
+
attr_accessor :links
|
|
73
|
+
|
|
74
|
+
# A mapping from model property names to API property names.
|
|
75
|
+
def self.names
|
|
76
|
+
@_hash = {} if @_hash.nil?
|
|
77
|
+
@_hash['account_sid'] = 'account_sid'
|
|
78
|
+
@_hash['assignment_callback_url'] = 'assignment_callback_url'
|
|
79
|
+
@_hash['configuration'] = 'configuration'
|
|
80
|
+
@_hash['date_created'] = 'date_created'
|
|
81
|
+
@_hash['date_updated'] = 'date_updated'
|
|
82
|
+
@_hash['document_content_type'] = 'document_content_type'
|
|
83
|
+
@_hash['fallback_assignment_callback_url'] =
|
|
84
|
+
'fallback_assignment_callback_url'
|
|
85
|
+
@_hash['friendly_name'] = 'friendly_name'
|
|
86
|
+
@_hash['sid'] = 'sid'
|
|
87
|
+
@_hash['task_reservation_timeout'] = 'task_reservation_timeout'
|
|
88
|
+
@_hash['workspace_sid'] = 'workspace_sid'
|
|
89
|
+
@_hash['url'] = 'url'
|
|
90
|
+
@_hash['links'] = 'links'
|
|
91
|
+
@_hash
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# An array for optional fields
|
|
95
|
+
def self.optionals
|
|
96
|
+
%w[
|
|
97
|
+
account_sid
|
|
98
|
+
assignment_callback_url
|
|
99
|
+
configuration
|
|
100
|
+
date_created
|
|
101
|
+
date_updated
|
|
102
|
+
document_content_type
|
|
103
|
+
fallback_assignment_callback_url
|
|
104
|
+
friendly_name
|
|
105
|
+
sid
|
|
106
|
+
task_reservation_timeout
|
|
107
|
+
workspace_sid
|
|
108
|
+
url
|
|
109
|
+
links
|
|
110
|
+
]
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# An array for nullable fields
|
|
114
|
+
def self.nullables
|
|
115
|
+
%w[
|
|
116
|
+
account_sid
|
|
117
|
+
assignment_callback_url
|
|
118
|
+
configuration
|
|
119
|
+
date_created
|
|
120
|
+
date_updated
|
|
121
|
+
document_content_type
|
|
122
|
+
fallback_assignment_callback_url
|
|
123
|
+
friendly_name
|
|
124
|
+
sid
|
|
125
|
+
workspace_sid
|
|
126
|
+
url
|
|
127
|
+
links
|
|
128
|
+
]
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
def initialize(account_sid: SKIP, assignment_callback_url: SKIP,
|
|
132
|
+
configuration: SKIP, date_created: SKIP, date_updated: SKIP,
|
|
133
|
+
document_content_type: SKIP,
|
|
134
|
+
fallback_assignment_callback_url: SKIP, friendly_name: SKIP,
|
|
135
|
+
sid: SKIP, task_reservation_timeout: 0, workspace_sid: SKIP,
|
|
136
|
+
url: SKIP, links: SKIP, additional_properties: nil)
|
|
137
|
+
# Add additional model properties to the instance
|
|
138
|
+
additional_properties = {} if additional_properties.nil?
|
|
139
|
+
|
|
140
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
141
|
+
@assignment_callback_url = assignment_callback_url unless assignment_callback_url == SKIP
|
|
142
|
+
@configuration = configuration unless configuration == SKIP
|
|
143
|
+
@date_created = date_created unless date_created == SKIP
|
|
144
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
145
|
+
@document_content_type = document_content_type unless document_content_type == SKIP
|
|
146
|
+
unless fallback_assignment_callback_url == SKIP
|
|
147
|
+
@fallback_assignment_callback_url =
|
|
148
|
+
fallback_assignment_callback_url
|
|
149
|
+
end
|
|
150
|
+
@friendly_name = friendly_name unless friendly_name == SKIP
|
|
151
|
+
@sid = sid unless sid == SKIP
|
|
152
|
+
@task_reservation_timeout = task_reservation_timeout unless task_reservation_timeout == SKIP
|
|
153
|
+
@workspace_sid = workspace_sid unless workspace_sid == SKIP
|
|
154
|
+
@url = url unless url == SKIP
|
|
155
|
+
@links = links unless links == SKIP
|
|
156
|
+
@additional_properties = additional_properties
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Creates an instance of the object from a hash.
|
|
160
|
+
def self.from_hash(hash)
|
|
161
|
+
return nil unless hash
|
|
162
|
+
|
|
163
|
+
# Extract variables from the hash.
|
|
164
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
165
|
+
assignment_callback_url =
|
|
166
|
+
hash.key?('assignment_callback_url') ? hash['assignment_callback_url'] : SKIP
|
|
167
|
+
configuration = hash.key?('configuration') ? hash['configuration'] : SKIP
|
|
168
|
+
date_created = if hash.key?('date_created')
|
|
169
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
170
|
+
else
|
|
171
|
+
SKIP
|
|
172
|
+
end
|
|
173
|
+
date_updated = if hash.key?('date_updated')
|
|
174
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
175
|
+
else
|
|
176
|
+
SKIP
|
|
177
|
+
end
|
|
178
|
+
document_content_type =
|
|
179
|
+
hash.key?('document_content_type') ? hash['document_content_type'] : SKIP
|
|
180
|
+
fallback_assignment_callback_url =
|
|
181
|
+
hash.key?('fallback_assignment_callback_url') ? hash['fallback_assignment_callback_url'] : SKIP
|
|
182
|
+
friendly_name = hash.key?('friendly_name') ? hash['friendly_name'] : SKIP
|
|
183
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
184
|
+
task_reservation_timeout = hash['task_reservation_timeout'] ||= 0
|
|
185
|
+
workspace_sid = hash.key?('workspace_sid') ? hash['workspace_sid'] : SKIP
|
|
186
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
187
|
+
links = hash.key?('links') ? hash['links'] : SKIP
|
|
188
|
+
|
|
189
|
+
# Create a new hash for additional properties, removing known properties.
|
|
190
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
191
|
+
|
|
192
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
193
|
+
new_hash, proc { |value| value }
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
# Create object from extracted values.
|
|
197
|
+
Workflow.new(account_sid: account_sid,
|
|
198
|
+
assignment_callback_url: assignment_callback_url,
|
|
199
|
+
configuration: configuration,
|
|
200
|
+
date_created: date_created,
|
|
201
|
+
date_updated: date_updated,
|
|
202
|
+
document_content_type: document_content_type,
|
|
203
|
+
fallback_assignment_callback_url: fallback_assignment_callback_url,
|
|
204
|
+
friendly_name: friendly_name,
|
|
205
|
+
sid: sid,
|
|
206
|
+
task_reservation_timeout: task_reservation_timeout,
|
|
207
|
+
workspace_sid: workspace_sid,
|
|
208
|
+
url: url,
|
|
209
|
+
links: links,
|
|
210
|
+
additional_properties: additional_properties)
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
def to_custom_date_created
|
|
214
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
def to_custom_date_updated
|
|
218
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Provides a human-readable string representation of the object.
|
|
222
|
+
def to_s
|
|
223
|
+
class_name = self.class.name.split('::').last
|
|
224
|
+
"<#{class_name} account_sid: #{@account_sid}, assignment_callback_url:"\
|
|
225
|
+
" #{@assignment_callback_url}, configuration: #{@configuration}, date_created:"\
|
|
226
|
+
" #{@date_created}, date_updated: #{@date_updated}, document_content_type:"\
|
|
227
|
+
" #{@document_content_type}, fallback_assignment_callback_url:"\
|
|
228
|
+
" #{@fallback_assignment_callback_url}, friendly_name: #{@friendly_name}, sid: #{@sid},"\
|
|
229
|
+
" task_reservation_timeout: #{@task_reservation_timeout}, workspace_sid: #{@workspace_sid},"\
|
|
230
|
+
" url: #{@url}, links: #{@links}, additional_properties: #{@additional_properties}>"
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
234
|
+
def inspect
|
|
235
|
+
class_name = self.class.name.split('::').last
|
|
236
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, assignment_callback_url:"\
|
|
237
|
+
" #{@assignment_callback_url.inspect}, configuration: #{@configuration.inspect},"\
|
|
238
|
+
" date_created: #{@date_created.inspect}, date_updated: #{@date_updated.inspect},"\
|
|
239
|
+
" document_content_type: #{@document_content_type.inspect},"\
|
|
240
|
+
" fallback_assignment_callback_url: #{@fallback_assignment_callback_url.inspect},"\
|
|
241
|
+
" friendly_name: #{@friendly_name.inspect}, sid: #{@sid.inspect}, task_reservation_timeout:"\
|
|
242
|
+
" #{@task_reservation_timeout.inspect}, workspace_sid: #{@workspace_sid.inspect}, url:"\
|
|
243
|
+
" #{@url.inspect}, links: #{@links.inspect}, additional_properties:"\
|
|
244
|
+
" #{@additional_properties}>"
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
end
|