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,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
|
+
# Worker Model.
|
|
9
|
+
class Worker < 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 `friendly_name` of the Worker's current Activity.
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :activity_name
|
|
21
|
+
|
|
22
|
+
# The SID of the Worker's current Activity.
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :activity_sid
|
|
25
|
+
|
|
26
|
+
# The JSON string that describes the Worker. For example: `{ "email":
|
|
27
|
+
# "Bob@example.com", "phone": "+5095551234" }`. **Note** If this property
|
|
28
|
+
# has been assigned a value, it will only be displayed in FETCH actions that
|
|
29
|
+
# return a single resource. Otherwise, this property will be null, even if
|
|
30
|
+
# it has a value. This data is passed to the `assignment_callback_url` when
|
|
31
|
+
# TaskRouter assigns a Task to the Worker.
|
|
32
|
+
# @return [String]
|
|
33
|
+
attr_accessor :attributes
|
|
34
|
+
|
|
35
|
+
# Whether the Worker is available to perform tasks.
|
|
36
|
+
# @return [TrueClass | FalseClass]
|
|
37
|
+
attr_accessor :available
|
|
38
|
+
|
|
39
|
+
# The date and time in GMT when the resource was created specified in [ISO
|
|
40
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
41
|
+
# @return [DateTime]
|
|
42
|
+
attr_accessor :date_created
|
|
43
|
+
|
|
44
|
+
# The date and time in GMT of the last change to the Worker's activity
|
|
45
|
+
# specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
46
|
+
# Used to calculate Workflow statistics.
|
|
47
|
+
# @return [DateTime]
|
|
48
|
+
attr_accessor :date_status_changed
|
|
49
|
+
|
|
50
|
+
# The date and time in GMT when the resource was last updated specified in
|
|
51
|
+
# [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
52
|
+
# @return [DateTime]
|
|
53
|
+
attr_accessor :date_updated
|
|
54
|
+
|
|
55
|
+
# The string that you assigned to describe the resource. Friendly names are
|
|
56
|
+
# case insensitive, and unique within the TaskRouter Workspace.
|
|
57
|
+
# @return [String]
|
|
58
|
+
attr_accessor :friendly_name
|
|
59
|
+
|
|
60
|
+
# The unique string that we created to identify the Worker resource.
|
|
61
|
+
# @return [String]
|
|
62
|
+
attr_accessor :sid
|
|
63
|
+
|
|
64
|
+
# The SID of the Workspace that contains the Worker.
|
|
65
|
+
# @return [String]
|
|
66
|
+
attr_accessor :workspace_sid
|
|
67
|
+
|
|
68
|
+
# The absolute URL of the Worker resource.
|
|
69
|
+
# @return [String]
|
|
70
|
+
attr_accessor :url
|
|
71
|
+
|
|
72
|
+
# The URLs of related resources.
|
|
73
|
+
# @return [Object]
|
|
74
|
+
attr_accessor :links
|
|
75
|
+
|
|
76
|
+
# A mapping from model property names to API property names.
|
|
77
|
+
def self.names
|
|
78
|
+
@_hash = {} if @_hash.nil?
|
|
79
|
+
@_hash['account_sid'] = 'account_sid'
|
|
80
|
+
@_hash['activity_name'] = 'activity_name'
|
|
81
|
+
@_hash['activity_sid'] = 'activity_sid'
|
|
82
|
+
@_hash['attributes'] = 'attributes'
|
|
83
|
+
@_hash['available'] = 'available'
|
|
84
|
+
@_hash['date_created'] = 'date_created'
|
|
85
|
+
@_hash['date_status_changed'] = 'date_status_changed'
|
|
86
|
+
@_hash['date_updated'] = 'date_updated'
|
|
87
|
+
@_hash['friendly_name'] = 'friendly_name'
|
|
88
|
+
@_hash['sid'] = 'sid'
|
|
89
|
+
@_hash['workspace_sid'] = 'workspace_sid'
|
|
90
|
+
@_hash['url'] = 'url'
|
|
91
|
+
@_hash['links'] = 'links'
|
|
92
|
+
@_hash
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# An array for optional fields
|
|
96
|
+
def self.optionals
|
|
97
|
+
%w[
|
|
98
|
+
account_sid
|
|
99
|
+
activity_name
|
|
100
|
+
activity_sid
|
|
101
|
+
attributes
|
|
102
|
+
available
|
|
103
|
+
date_created
|
|
104
|
+
date_status_changed
|
|
105
|
+
date_updated
|
|
106
|
+
friendly_name
|
|
107
|
+
sid
|
|
108
|
+
workspace_sid
|
|
109
|
+
url
|
|
110
|
+
links
|
|
111
|
+
]
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# An array for nullable fields
|
|
115
|
+
def self.nullables
|
|
116
|
+
%w[
|
|
117
|
+
account_sid
|
|
118
|
+
activity_name
|
|
119
|
+
activity_sid
|
|
120
|
+
attributes
|
|
121
|
+
available
|
|
122
|
+
date_created
|
|
123
|
+
date_status_changed
|
|
124
|
+
date_updated
|
|
125
|
+
friendly_name
|
|
126
|
+
sid
|
|
127
|
+
workspace_sid
|
|
128
|
+
url
|
|
129
|
+
links
|
|
130
|
+
]
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
def initialize(account_sid: SKIP, activity_name: SKIP, activity_sid: SKIP,
|
|
134
|
+
attributes: SKIP, available: SKIP, date_created: SKIP,
|
|
135
|
+
date_status_changed: SKIP, date_updated: SKIP,
|
|
136
|
+
friendly_name: SKIP, sid: SKIP, workspace_sid: SKIP,
|
|
137
|
+
url: SKIP, links: SKIP, additional_properties: nil)
|
|
138
|
+
# Add additional model properties to the instance
|
|
139
|
+
additional_properties = {} if additional_properties.nil?
|
|
140
|
+
|
|
141
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
142
|
+
@activity_name = activity_name unless activity_name == SKIP
|
|
143
|
+
@activity_sid = activity_sid unless activity_sid == SKIP
|
|
144
|
+
@attributes = attributes unless attributes == SKIP
|
|
145
|
+
@available = available unless available == SKIP
|
|
146
|
+
@date_created = date_created unless date_created == SKIP
|
|
147
|
+
@date_status_changed = date_status_changed unless date_status_changed == SKIP
|
|
148
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
149
|
+
@friendly_name = friendly_name unless friendly_name == SKIP
|
|
150
|
+
@sid = sid unless sid == SKIP
|
|
151
|
+
@workspace_sid = workspace_sid unless workspace_sid == SKIP
|
|
152
|
+
@url = url unless url == SKIP
|
|
153
|
+
@links = links unless links == SKIP
|
|
154
|
+
@additional_properties = additional_properties
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Creates an instance of the object from a hash.
|
|
158
|
+
def self.from_hash(hash)
|
|
159
|
+
return nil unless hash
|
|
160
|
+
|
|
161
|
+
# Extract variables from the hash.
|
|
162
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
163
|
+
activity_name = hash.key?('activity_name') ? hash['activity_name'] : SKIP
|
|
164
|
+
activity_sid = hash.key?('activity_sid') ? hash['activity_sid'] : SKIP
|
|
165
|
+
attributes = hash.key?('attributes') ? hash['attributes'] : SKIP
|
|
166
|
+
available = hash.key?('available') ? hash['available'] : SKIP
|
|
167
|
+
date_created = if hash.key?('date_created')
|
|
168
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
169
|
+
else
|
|
170
|
+
SKIP
|
|
171
|
+
end
|
|
172
|
+
date_status_changed = if hash.key?('date_status_changed')
|
|
173
|
+
(DateTimeHelper.from_rfc3339(hash['date_status_changed']) if hash['date_status_changed'])
|
|
174
|
+
else
|
|
175
|
+
SKIP
|
|
176
|
+
end
|
|
177
|
+
date_updated = if hash.key?('date_updated')
|
|
178
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
179
|
+
else
|
|
180
|
+
SKIP
|
|
181
|
+
end
|
|
182
|
+
friendly_name = hash.key?('friendly_name') ? hash['friendly_name'] : SKIP
|
|
183
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
184
|
+
workspace_sid = hash.key?('workspace_sid') ? hash['workspace_sid'] : SKIP
|
|
185
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
186
|
+
links = hash.key?('links') ? hash['links'] : SKIP
|
|
187
|
+
|
|
188
|
+
# Create a new hash for additional properties, removing known properties.
|
|
189
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
190
|
+
|
|
191
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
192
|
+
new_hash, proc { |value| value }
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
# Create object from extracted values.
|
|
196
|
+
Worker.new(account_sid: account_sid,
|
|
197
|
+
activity_name: activity_name,
|
|
198
|
+
activity_sid: activity_sid,
|
|
199
|
+
attributes: attributes,
|
|
200
|
+
available: available,
|
|
201
|
+
date_created: date_created,
|
|
202
|
+
date_status_changed: date_status_changed,
|
|
203
|
+
date_updated: date_updated,
|
|
204
|
+
friendly_name: friendly_name,
|
|
205
|
+
sid: sid,
|
|
206
|
+
workspace_sid: workspace_sid,
|
|
207
|
+
url: url,
|
|
208
|
+
links: links,
|
|
209
|
+
additional_properties: additional_properties)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
def to_custom_date_created
|
|
213
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
def to_custom_date_status_changed
|
|
217
|
+
DateTimeHelper.to_rfc3339(date_status_changed)
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
def to_custom_date_updated
|
|
221
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Provides a human-readable string representation of the object.
|
|
225
|
+
def to_s
|
|
226
|
+
class_name = self.class.name.split('::').last
|
|
227
|
+
"<#{class_name} account_sid: #{@account_sid}, activity_name: #{@activity_name},"\
|
|
228
|
+
" activity_sid: #{@activity_sid}, attributes: #{@attributes}, available: #{@available},"\
|
|
229
|
+
" date_created: #{@date_created}, date_status_changed: #{@date_status_changed},"\
|
|
230
|
+
" date_updated: #{@date_updated}, friendly_name: #{@friendly_name}, sid: #{@sid},"\
|
|
231
|
+
" workspace_sid: #{@workspace_sid}, url: #{@url}, links: #{@links}, additional_properties:"\
|
|
232
|
+
" #{@additional_properties}>"
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
236
|
+
def inspect
|
|
237
|
+
class_name = self.class.name.split('::').last
|
|
238
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, activity_name:"\
|
|
239
|
+
" #{@activity_name.inspect}, activity_sid: #{@activity_sid.inspect}, attributes:"\
|
|
240
|
+
" #{@attributes.inspect}, available: #{@available.inspect}, date_created:"\
|
|
241
|
+
" #{@date_created.inspect}, date_status_changed: #{@date_status_changed.inspect},"\
|
|
242
|
+
" date_updated: #{@date_updated.inspect}, friendly_name: #{@friendly_name.inspect}, sid:"\
|
|
243
|
+
" #{@sid.inspect}, workspace_sid: #{@workspace_sid.inspect}, url: #{@url.inspect}, links:"\
|
|
244
|
+
" #{@links.inspect}, additional_properties: #{@additional_properties}>"
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
end
|
|
@@ -0,0 +1,244 @@
|
|
|
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
|
+
# WorkerChannel Model.
|
|
9
|
+
class WorkerChannel < 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 total number of Tasks assigned to Worker for the TaskChannel type.
|
|
19
|
+
# @return [Integer]
|
|
20
|
+
attr_accessor :assigned_tasks
|
|
21
|
+
|
|
22
|
+
# Whether the Worker should receive Tasks of the TaskChannel type.
|
|
23
|
+
# @return [TrueClass | FalseClass]
|
|
24
|
+
attr_accessor :available
|
|
25
|
+
|
|
26
|
+
# The current percentage of capacity the TaskChannel has available. Can be a
|
|
27
|
+
# number between `0` and `100`. A value of `0` indicates that TaskChannel
|
|
28
|
+
# has no capacity available and a value of `100` means the Worker is
|
|
29
|
+
# available to receive any Tasks of this TaskChannel type.
|
|
30
|
+
# @return [Integer]
|
|
31
|
+
attr_accessor :available_capacity_percentage
|
|
32
|
+
|
|
33
|
+
# The current configured capacity for the WorkerChannel. TaskRouter will not
|
|
34
|
+
# create any reservations after the assigned Tasks for the Worker reaches
|
|
35
|
+
# the value.
|
|
36
|
+
# @return [Integer]
|
|
37
|
+
attr_accessor :configured_capacity
|
|
38
|
+
|
|
39
|
+
# The date and time in GMT when the resource was created specified in [RFC
|
|
40
|
+
# 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
41
|
+
# @return [DateTime]
|
|
42
|
+
attr_accessor :date_created
|
|
43
|
+
|
|
44
|
+
# The date and time in GMT when the resource was last updated specified in
|
|
45
|
+
# [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
46
|
+
# @return [DateTime]
|
|
47
|
+
attr_accessor :date_updated
|
|
48
|
+
|
|
49
|
+
# The unique string that we created to identify the WorkerChannel resource.
|
|
50
|
+
# @return [String]
|
|
51
|
+
attr_accessor :sid
|
|
52
|
+
|
|
53
|
+
# The SID of the TaskChannel.
|
|
54
|
+
# @return [String]
|
|
55
|
+
attr_accessor :task_channel_sid
|
|
56
|
+
|
|
57
|
+
# The unique name of the TaskChannel, such as `voice` or `sms`.
|
|
58
|
+
# @return [String]
|
|
59
|
+
attr_accessor :task_channel_unique_name
|
|
60
|
+
|
|
61
|
+
# The SID of the Worker that contains the WorkerChannel.
|
|
62
|
+
# @return [String]
|
|
63
|
+
attr_accessor :worker_sid
|
|
64
|
+
|
|
65
|
+
# The SID of the Workspace that contains the WorkerChannel.
|
|
66
|
+
# @return [String]
|
|
67
|
+
attr_accessor :workspace_sid
|
|
68
|
+
|
|
69
|
+
# The absolute URL of the WorkerChannel resource.
|
|
70
|
+
# @return [String]
|
|
71
|
+
attr_accessor :url
|
|
72
|
+
|
|
73
|
+
# A mapping from model property names to API property names.
|
|
74
|
+
def self.names
|
|
75
|
+
@_hash = {} if @_hash.nil?
|
|
76
|
+
@_hash['account_sid'] = 'account_sid'
|
|
77
|
+
@_hash['assigned_tasks'] = 'assigned_tasks'
|
|
78
|
+
@_hash['available'] = 'available'
|
|
79
|
+
@_hash['available_capacity_percentage'] =
|
|
80
|
+
'available_capacity_percentage'
|
|
81
|
+
@_hash['configured_capacity'] = 'configured_capacity'
|
|
82
|
+
@_hash['date_created'] = 'date_created'
|
|
83
|
+
@_hash['date_updated'] = 'date_updated'
|
|
84
|
+
@_hash['sid'] = 'sid'
|
|
85
|
+
@_hash['task_channel_sid'] = 'task_channel_sid'
|
|
86
|
+
@_hash['task_channel_unique_name'] = 'task_channel_unique_name'
|
|
87
|
+
@_hash['worker_sid'] = 'worker_sid'
|
|
88
|
+
@_hash['workspace_sid'] = 'workspace_sid'
|
|
89
|
+
@_hash['url'] = 'url'
|
|
90
|
+
@_hash
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# An array for optional fields
|
|
94
|
+
def self.optionals
|
|
95
|
+
%w[
|
|
96
|
+
account_sid
|
|
97
|
+
assigned_tasks
|
|
98
|
+
available
|
|
99
|
+
available_capacity_percentage
|
|
100
|
+
configured_capacity
|
|
101
|
+
date_created
|
|
102
|
+
date_updated
|
|
103
|
+
sid
|
|
104
|
+
task_channel_sid
|
|
105
|
+
task_channel_unique_name
|
|
106
|
+
worker_sid
|
|
107
|
+
workspace_sid
|
|
108
|
+
url
|
|
109
|
+
]
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# An array for nullable fields
|
|
113
|
+
def self.nullables
|
|
114
|
+
%w[
|
|
115
|
+
account_sid
|
|
116
|
+
available
|
|
117
|
+
date_created
|
|
118
|
+
date_updated
|
|
119
|
+
sid
|
|
120
|
+
task_channel_sid
|
|
121
|
+
task_channel_unique_name
|
|
122
|
+
worker_sid
|
|
123
|
+
workspace_sid
|
|
124
|
+
url
|
|
125
|
+
]
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
def initialize(account_sid: SKIP, assigned_tasks: 0, available: SKIP,
|
|
129
|
+
available_capacity_percentage: 0, configured_capacity: 0,
|
|
130
|
+
date_created: SKIP, date_updated: SKIP, sid: SKIP,
|
|
131
|
+
task_channel_sid: SKIP, task_channel_unique_name: SKIP,
|
|
132
|
+
worker_sid: SKIP, workspace_sid: SKIP, url: SKIP,
|
|
133
|
+
additional_properties: nil)
|
|
134
|
+
# Add additional model properties to the instance
|
|
135
|
+
additional_properties = {} if additional_properties.nil?
|
|
136
|
+
|
|
137
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
138
|
+
@assigned_tasks = assigned_tasks unless assigned_tasks == SKIP
|
|
139
|
+
@available = available unless available == SKIP
|
|
140
|
+
unless available_capacity_percentage == SKIP
|
|
141
|
+
@available_capacity_percentage =
|
|
142
|
+
available_capacity_percentage
|
|
143
|
+
end
|
|
144
|
+
@configured_capacity = configured_capacity unless configured_capacity == SKIP
|
|
145
|
+
@date_created = date_created unless date_created == SKIP
|
|
146
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
147
|
+
@sid = sid unless sid == SKIP
|
|
148
|
+
@task_channel_sid = task_channel_sid unless task_channel_sid == SKIP
|
|
149
|
+
@task_channel_unique_name = task_channel_unique_name unless task_channel_unique_name == SKIP
|
|
150
|
+
@worker_sid = worker_sid unless worker_sid == SKIP
|
|
151
|
+
@workspace_sid = workspace_sid unless workspace_sid == SKIP
|
|
152
|
+
@url = url unless url == SKIP
|
|
153
|
+
@additional_properties = additional_properties
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Creates an instance of the object from a hash.
|
|
157
|
+
def self.from_hash(hash)
|
|
158
|
+
return nil unless hash
|
|
159
|
+
|
|
160
|
+
# Extract variables from the hash.
|
|
161
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
162
|
+
assigned_tasks = hash['assigned_tasks'] ||= 0
|
|
163
|
+
available = hash.key?('available') ? hash['available'] : SKIP
|
|
164
|
+
available_capacity_percentage =
|
|
165
|
+
hash['available_capacity_percentage'] ||= 0
|
|
166
|
+
configured_capacity = hash['configured_capacity'] ||= 0
|
|
167
|
+
date_created = if hash.key?('date_created')
|
|
168
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
169
|
+
else
|
|
170
|
+
SKIP
|
|
171
|
+
end
|
|
172
|
+
date_updated = if hash.key?('date_updated')
|
|
173
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
174
|
+
else
|
|
175
|
+
SKIP
|
|
176
|
+
end
|
|
177
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
178
|
+
task_channel_sid =
|
|
179
|
+
hash.key?('task_channel_sid') ? hash['task_channel_sid'] : SKIP
|
|
180
|
+
task_channel_unique_name =
|
|
181
|
+
hash.key?('task_channel_unique_name') ? hash['task_channel_unique_name'] : SKIP
|
|
182
|
+
worker_sid = hash.key?('worker_sid') ? hash['worker_sid'] : SKIP
|
|
183
|
+
workspace_sid = hash.key?('workspace_sid') ? hash['workspace_sid'] : SKIP
|
|
184
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
185
|
+
|
|
186
|
+
# Create a new hash for additional properties, removing known properties.
|
|
187
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
188
|
+
|
|
189
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
190
|
+
new_hash, proc { |value| value }
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
# Create object from extracted values.
|
|
194
|
+
WorkerChannel.new(account_sid: account_sid,
|
|
195
|
+
assigned_tasks: assigned_tasks,
|
|
196
|
+
available: available,
|
|
197
|
+
available_capacity_percentage: available_capacity_percentage,
|
|
198
|
+
configured_capacity: configured_capacity,
|
|
199
|
+
date_created: date_created,
|
|
200
|
+
date_updated: date_updated,
|
|
201
|
+
sid: sid,
|
|
202
|
+
task_channel_sid: task_channel_sid,
|
|
203
|
+
task_channel_unique_name: task_channel_unique_name,
|
|
204
|
+
worker_sid: worker_sid,
|
|
205
|
+
workspace_sid: workspace_sid,
|
|
206
|
+
url: url,
|
|
207
|
+
additional_properties: additional_properties)
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
def to_custom_date_created
|
|
211
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
def to_custom_date_updated
|
|
215
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Provides a human-readable string representation of the object.
|
|
219
|
+
def to_s
|
|
220
|
+
class_name = self.class.name.split('::').last
|
|
221
|
+
"<#{class_name} account_sid: #{@account_sid}, assigned_tasks: #{@assigned_tasks},"\
|
|
222
|
+
" available: #{@available}, available_capacity_percentage:"\
|
|
223
|
+
" #{@available_capacity_percentage}, configured_capacity: #{@configured_capacity},"\
|
|
224
|
+
" date_created: #{@date_created}, date_updated: #{@date_updated}, sid: #{@sid},"\
|
|
225
|
+
" task_channel_sid: #{@task_channel_sid}, task_channel_unique_name:"\
|
|
226
|
+
" #{@task_channel_unique_name}, worker_sid: #{@worker_sid}, workspace_sid:"\
|
|
227
|
+
" #{@workspace_sid}, url: #{@url}, additional_properties: #{@additional_properties}>"
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
231
|
+
def inspect
|
|
232
|
+
class_name = self.class.name.split('::').last
|
|
233
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, assigned_tasks:"\
|
|
234
|
+
" #{@assigned_tasks.inspect}, available: #{@available.inspect},"\
|
|
235
|
+
" available_capacity_percentage: #{@available_capacity_percentage.inspect},"\
|
|
236
|
+
" configured_capacity: #{@configured_capacity.inspect}, date_created:"\
|
|
237
|
+
" #{@date_created.inspect}, date_updated: #{@date_updated.inspect}, sid: #{@sid.inspect},"\
|
|
238
|
+
" task_channel_sid: #{@task_channel_sid.inspect}, task_channel_unique_name:"\
|
|
239
|
+
" #{@task_channel_unique_name.inspect}, worker_sid: #{@worker_sid.inspect}, workspace_sid:"\
|
|
240
|
+
" #{@workspace_sid.inspect}, url: #{@url.inspect}, additional_properties:"\
|
|
241
|
+
" #{@additional_properties}>"
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
end
|
|
@@ -0,0 +1,122 @@
|
|
|
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
|
+
# WorkerInstanceStatistics Model.
|
|
8
|
+
class WorkerInstanceStatistics < 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
|
+
# An object that contains the cumulative statistics for the Worker.
|
|
18
|
+
# @return [Object]
|
|
19
|
+
attr_accessor :cumulative
|
|
20
|
+
|
|
21
|
+
# The SID of the Worker that contains the WorkerChannel.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :worker_sid
|
|
24
|
+
|
|
25
|
+
# The SID of the Workspace that contains the WorkerChannel.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :workspace_sid
|
|
28
|
+
|
|
29
|
+
# The absolute URL of the WorkerChannel 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['cumulative'] = 'cumulative'
|
|
38
|
+
@_hash['worker_sid'] = 'worker_sid'
|
|
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
|
+
cumulative
|
|
49
|
+
worker_sid
|
|
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
|
+
cumulative
|
|
60
|
+
worker_sid
|
|
61
|
+
workspace_sid
|
|
62
|
+
url
|
|
63
|
+
]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def initialize(account_sid: SKIP, cumulative: SKIP, worker_sid: SKIP,
|
|
67
|
+
workspace_sid: SKIP, url: SKIP, 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
|
+
@cumulative = cumulative unless cumulative == SKIP
|
|
73
|
+
@worker_sid = worker_sid unless worker_sid == 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
|
+
cumulative = hash.key?('cumulative') ? hash['cumulative'] : SKIP
|
|
86
|
+
worker_sid = hash.key?('worker_sid') ? hash['worker_sid'] : SKIP
|
|
87
|
+
workspace_sid = hash.key?('workspace_sid') ? hash['workspace_sid'] : SKIP
|
|
88
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
89
|
+
|
|
90
|
+
# Create a new hash for additional properties, removing known properties.
|
|
91
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
92
|
+
|
|
93
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
94
|
+
new_hash, proc { |value| value }
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
# Create object from extracted values.
|
|
98
|
+
WorkerInstanceStatistics.new(account_sid: account_sid,
|
|
99
|
+
cumulative: cumulative,
|
|
100
|
+
worker_sid: worker_sid,
|
|
101
|
+
workspace_sid: workspace_sid,
|
|
102
|
+
url: url,
|
|
103
|
+
additional_properties: additional_properties)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Provides a human-readable string representation of the object.
|
|
107
|
+
def to_s
|
|
108
|
+
class_name = self.class.name.split('::').last
|
|
109
|
+
"<#{class_name} account_sid: #{@account_sid}, cumulative: #{@cumulative}, worker_sid:"\
|
|
110
|
+
" #{@worker_sid}, workspace_sid: #{@workspace_sid}, url: #{@url}, additional_properties:"\
|
|
111
|
+
" #{@additional_properties}>"
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
115
|
+
def inspect
|
|
116
|
+
class_name = self.class.name.split('::').last
|
|
117
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, cumulative: #{@cumulative.inspect},"\
|
|
118
|
+
" worker_sid: #{@worker_sid.inspect}, workspace_sid: #{@workspace_sid.inspect}, url:"\
|
|
119
|
+
" #{@url.inspect}, additional_properties: #{@additional_properties}>"
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
end
|