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,40 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# TaskReservationSupervisorMode.
|
|
8
|
+
class TaskReservationSupervisorMode
|
|
9
|
+
TASK_RESERVATION_SUPERVISOR_MODE = [
|
|
10
|
+
# TODO: Write general description for MONITOR
|
|
11
|
+
MONITOR = 'monitor'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for WHISPER
|
|
14
|
+
WHISPER = 'whisper'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for BARGE
|
|
17
|
+
BARGE = 'barge'.freeze
|
|
18
|
+
].freeze
|
|
19
|
+
|
|
20
|
+
def self.validate(value)
|
|
21
|
+
return false if value.nil?
|
|
22
|
+
|
|
23
|
+
TASK_RESERVATION_SUPERVISOR_MODE.include?(value)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from_value(value, default_value = MONITOR)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'monitor' then MONITOR
|
|
33
|
+
when 'whisper' then WHISPER
|
|
34
|
+
when 'barge' then BARGE
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,394 @@
|
|
|
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
|
+
# TaskRouterTask Model.
|
|
9
|
+
class TaskRouterTask < 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 Task resource.
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :account_sid
|
|
17
|
+
|
|
18
|
+
# The number of seconds since the Task was created.
|
|
19
|
+
# @return [Integer]
|
|
20
|
+
attr_accessor :age
|
|
21
|
+
|
|
22
|
+
# The current status of the Task's assignment. Can be: `pending`,
|
|
23
|
+
# `reserved`, `assigned`, `canceled`, `wrapping`, or `completed`.
|
|
24
|
+
# @return [TaskStatus]
|
|
25
|
+
attr_accessor :assignment_status
|
|
26
|
+
|
|
27
|
+
# The JSON string with custom attributes of the work. **Note** If this
|
|
28
|
+
# property has been assigned a value, it will only be displayed in FETCH
|
|
29
|
+
# action that returns a single resource. Otherwise, it will be null.
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :attributes
|
|
32
|
+
|
|
33
|
+
# An object that contains the [Add-on](https://www.twilio.com/docs/add-ons)
|
|
34
|
+
# data for all installed Add-ons.
|
|
35
|
+
# @return [String]
|
|
36
|
+
attr_accessor :addons
|
|
37
|
+
|
|
38
|
+
# The date and time in GMT when the resource was created specified in [ISO
|
|
39
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
40
|
+
# @return [DateTime]
|
|
41
|
+
attr_accessor :date_created
|
|
42
|
+
|
|
43
|
+
# The date and time in GMT when the resource was last updated specified in
|
|
44
|
+
# [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
45
|
+
# @return [DateTime]
|
|
46
|
+
attr_accessor :date_updated
|
|
47
|
+
|
|
48
|
+
# The date and time in GMT when the Task entered the TaskQueue, specified in
|
|
49
|
+
# [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
50
|
+
# @return [DateTime]
|
|
51
|
+
attr_accessor :task_queue_entered_date
|
|
52
|
+
|
|
53
|
+
# The current priority score of the Task as assigned to a Worker by the
|
|
54
|
+
# workflow. Tasks with higher priority values will be assigned before Tasks
|
|
55
|
+
# with lower values.
|
|
56
|
+
# @return [Integer]
|
|
57
|
+
attr_accessor :priority
|
|
58
|
+
|
|
59
|
+
# The reason the Task was canceled or completed, if applicable.
|
|
60
|
+
# @return [String]
|
|
61
|
+
attr_accessor :reason
|
|
62
|
+
|
|
63
|
+
# The unique string that we created to identify the Task resource.
|
|
64
|
+
# @return [String]
|
|
65
|
+
attr_accessor :sid
|
|
66
|
+
|
|
67
|
+
# The SID of the TaskQueue.
|
|
68
|
+
# @return [String]
|
|
69
|
+
attr_accessor :task_queue_sid
|
|
70
|
+
|
|
71
|
+
# The friendly name of the TaskQueue.
|
|
72
|
+
# @return [String]
|
|
73
|
+
attr_accessor :task_queue_friendly_name
|
|
74
|
+
|
|
75
|
+
# The SID of the TaskChannel.
|
|
76
|
+
# @return [String]
|
|
77
|
+
attr_accessor :task_channel_sid
|
|
78
|
+
|
|
79
|
+
# The unique name of the TaskChannel.
|
|
80
|
+
# @return [String]
|
|
81
|
+
attr_accessor :task_channel_unique_name
|
|
82
|
+
|
|
83
|
+
# The amount of time in seconds that the Task can live before being
|
|
84
|
+
# assigned.
|
|
85
|
+
# @return [Integer]
|
|
86
|
+
attr_accessor :timeout
|
|
87
|
+
|
|
88
|
+
# The SID of the Workflow that is controlling the Task.
|
|
89
|
+
# @return [String]
|
|
90
|
+
attr_accessor :workflow_sid
|
|
91
|
+
|
|
92
|
+
# The friendly name of the Workflow that is controlling the Task.
|
|
93
|
+
# @return [String]
|
|
94
|
+
attr_accessor :workflow_friendly_name
|
|
95
|
+
|
|
96
|
+
# The SID of the Workspace that contains the Task.
|
|
97
|
+
# @return [String]
|
|
98
|
+
attr_accessor :workspace_sid
|
|
99
|
+
|
|
100
|
+
# The absolute URL of the Task resource.
|
|
101
|
+
# @return [String]
|
|
102
|
+
attr_accessor :url
|
|
103
|
+
|
|
104
|
+
# The URLs of related resources.
|
|
105
|
+
# @return [Object]
|
|
106
|
+
attr_accessor :links
|
|
107
|
+
|
|
108
|
+
# The date and time in GMT indicating the ordering for routing of the Task
|
|
109
|
+
# specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
110
|
+
# @return [DateTime]
|
|
111
|
+
attr_accessor :virtual_start_time
|
|
112
|
+
|
|
113
|
+
# A boolean that indicates if the Task should respect a Worker's capacity
|
|
114
|
+
# and availability during assignment. This field can only be used when the
|
|
115
|
+
# `RoutingTarget` field is set to a Worker SID. By setting `IgnoreCapacity`
|
|
116
|
+
# to a value of `true`, `1`, or `yes`, the Task will be routed to the Worker
|
|
117
|
+
# without respecting their capacity and availability. Any other value will
|
|
118
|
+
# enforce the Worker's capacity and availability. The default value of
|
|
119
|
+
# `IgnoreCapacity` is `true` when the `RoutingTarget` is set to a Worker
|
|
120
|
+
# SID.
|
|
121
|
+
# @return [TrueClass | FalseClass]
|
|
122
|
+
attr_accessor :ignore_capacity
|
|
123
|
+
|
|
124
|
+
# A SID of a Worker, Queue, or Workflow to route a Task to
|
|
125
|
+
# @return [String]
|
|
126
|
+
attr_accessor :routing_target
|
|
127
|
+
|
|
128
|
+
# A mapping from model property names to API property names.
|
|
129
|
+
def self.names
|
|
130
|
+
@_hash = {} if @_hash.nil?
|
|
131
|
+
@_hash['account_sid'] = 'account_sid'
|
|
132
|
+
@_hash['age'] = 'age'
|
|
133
|
+
@_hash['assignment_status'] = 'assignment_status'
|
|
134
|
+
@_hash['attributes'] = 'attributes'
|
|
135
|
+
@_hash['addons'] = 'addons'
|
|
136
|
+
@_hash['date_created'] = 'date_created'
|
|
137
|
+
@_hash['date_updated'] = 'date_updated'
|
|
138
|
+
@_hash['task_queue_entered_date'] = 'task_queue_entered_date'
|
|
139
|
+
@_hash['priority'] = 'priority'
|
|
140
|
+
@_hash['reason'] = 'reason'
|
|
141
|
+
@_hash['sid'] = 'sid'
|
|
142
|
+
@_hash['task_queue_sid'] = 'task_queue_sid'
|
|
143
|
+
@_hash['task_queue_friendly_name'] = 'task_queue_friendly_name'
|
|
144
|
+
@_hash['task_channel_sid'] = 'task_channel_sid'
|
|
145
|
+
@_hash['task_channel_unique_name'] = 'task_channel_unique_name'
|
|
146
|
+
@_hash['timeout'] = 'timeout'
|
|
147
|
+
@_hash['workflow_sid'] = 'workflow_sid'
|
|
148
|
+
@_hash['workflow_friendly_name'] = 'workflow_friendly_name'
|
|
149
|
+
@_hash['workspace_sid'] = 'workspace_sid'
|
|
150
|
+
@_hash['url'] = 'url'
|
|
151
|
+
@_hash['links'] = 'links'
|
|
152
|
+
@_hash['virtual_start_time'] = 'virtual_start_time'
|
|
153
|
+
@_hash['ignore_capacity'] = 'ignore_capacity'
|
|
154
|
+
@_hash['routing_target'] = 'routing_target'
|
|
155
|
+
@_hash
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# An array for optional fields
|
|
159
|
+
def self.optionals
|
|
160
|
+
%w[
|
|
161
|
+
account_sid
|
|
162
|
+
age
|
|
163
|
+
assignment_status
|
|
164
|
+
attributes
|
|
165
|
+
addons
|
|
166
|
+
date_created
|
|
167
|
+
date_updated
|
|
168
|
+
task_queue_entered_date
|
|
169
|
+
priority
|
|
170
|
+
reason
|
|
171
|
+
sid
|
|
172
|
+
task_queue_sid
|
|
173
|
+
task_queue_friendly_name
|
|
174
|
+
task_channel_sid
|
|
175
|
+
task_channel_unique_name
|
|
176
|
+
timeout
|
|
177
|
+
workflow_sid
|
|
178
|
+
workflow_friendly_name
|
|
179
|
+
workspace_sid
|
|
180
|
+
url
|
|
181
|
+
links
|
|
182
|
+
virtual_start_time
|
|
183
|
+
ignore_capacity
|
|
184
|
+
routing_target
|
|
185
|
+
]
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# An array for nullable fields
|
|
189
|
+
def self.nullables
|
|
190
|
+
%w[
|
|
191
|
+
account_sid
|
|
192
|
+
attributes
|
|
193
|
+
addons
|
|
194
|
+
date_created
|
|
195
|
+
date_updated
|
|
196
|
+
task_queue_entered_date
|
|
197
|
+
reason
|
|
198
|
+
sid
|
|
199
|
+
task_queue_sid
|
|
200
|
+
task_queue_friendly_name
|
|
201
|
+
task_channel_sid
|
|
202
|
+
task_channel_unique_name
|
|
203
|
+
workflow_sid
|
|
204
|
+
workflow_friendly_name
|
|
205
|
+
workspace_sid
|
|
206
|
+
url
|
|
207
|
+
links
|
|
208
|
+
virtual_start_time
|
|
209
|
+
ignore_capacity
|
|
210
|
+
routing_target
|
|
211
|
+
]
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
def initialize(account_sid: SKIP, age: 0, assignment_status: SKIP,
|
|
215
|
+
attributes: SKIP, addons: SKIP, date_created: SKIP,
|
|
216
|
+
date_updated: SKIP, task_queue_entered_date: SKIP,
|
|
217
|
+
priority: 0, reason: SKIP, sid: SKIP, task_queue_sid: SKIP,
|
|
218
|
+
task_queue_friendly_name: SKIP, task_channel_sid: SKIP,
|
|
219
|
+
task_channel_unique_name: SKIP, timeout: 0,
|
|
220
|
+
workflow_sid: SKIP, workflow_friendly_name: SKIP,
|
|
221
|
+
workspace_sid: SKIP, url: SKIP, links: SKIP,
|
|
222
|
+
virtual_start_time: SKIP, ignore_capacity: SKIP,
|
|
223
|
+
routing_target: SKIP, additional_properties: nil)
|
|
224
|
+
# Add additional model properties to the instance
|
|
225
|
+
additional_properties = {} if additional_properties.nil?
|
|
226
|
+
|
|
227
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
228
|
+
@age = age unless age == SKIP
|
|
229
|
+
@assignment_status = assignment_status unless assignment_status == SKIP
|
|
230
|
+
@attributes = attributes unless attributes == SKIP
|
|
231
|
+
@addons = addons unless addons == SKIP
|
|
232
|
+
@date_created = date_created unless date_created == SKIP
|
|
233
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
234
|
+
@task_queue_entered_date = task_queue_entered_date unless task_queue_entered_date == SKIP
|
|
235
|
+
@priority = priority unless priority == SKIP
|
|
236
|
+
@reason = reason unless reason == SKIP
|
|
237
|
+
@sid = sid unless sid == SKIP
|
|
238
|
+
@task_queue_sid = task_queue_sid unless task_queue_sid == SKIP
|
|
239
|
+
@task_queue_friendly_name = task_queue_friendly_name unless task_queue_friendly_name == SKIP
|
|
240
|
+
@task_channel_sid = task_channel_sid unless task_channel_sid == SKIP
|
|
241
|
+
@task_channel_unique_name = task_channel_unique_name unless task_channel_unique_name == SKIP
|
|
242
|
+
@timeout = timeout unless timeout == SKIP
|
|
243
|
+
@workflow_sid = workflow_sid unless workflow_sid == SKIP
|
|
244
|
+
@workflow_friendly_name = workflow_friendly_name unless workflow_friendly_name == SKIP
|
|
245
|
+
@workspace_sid = workspace_sid unless workspace_sid == SKIP
|
|
246
|
+
@url = url unless url == SKIP
|
|
247
|
+
@links = links unless links == SKIP
|
|
248
|
+
@virtual_start_time = virtual_start_time unless virtual_start_time == SKIP
|
|
249
|
+
@ignore_capacity = ignore_capacity unless ignore_capacity == SKIP
|
|
250
|
+
@routing_target = routing_target unless routing_target == SKIP
|
|
251
|
+
@additional_properties = additional_properties
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Creates an instance of the object from a hash.
|
|
255
|
+
def self.from_hash(hash)
|
|
256
|
+
return nil unless hash
|
|
257
|
+
|
|
258
|
+
# Extract variables from the hash.
|
|
259
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
260
|
+
age = hash['age'] ||= 0
|
|
261
|
+
assignment_status =
|
|
262
|
+
hash.key?('assignment_status') ? hash['assignment_status'] : SKIP
|
|
263
|
+
attributes = hash.key?('attributes') ? hash['attributes'] : SKIP
|
|
264
|
+
addons = hash.key?('addons') ? hash['addons'] : SKIP
|
|
265
|
+
date_created = if hash.key?('date_created')
|
|
266
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
267
|
+
else
|
|
268
|
+
SKIP
|
|
269
|
+
end
|
|
270
|
+
date_updated = if hash.key?('date_updated')
|
|
271
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
272
|
+
else
|
|
273
|
+
SKIP
|
|
274
|
+
end
|
|
275
|
+
task_queue_entered_date = if hash.key?('task_queue_entered_date')
|
|
276
|
+
(DateTimeHelper.from_rfc3339(hash['task_queue_entered_date']) if hash['task_queue_entered_date'])
|
|
277
|
+
else
|
|
278
|
+
SKIP
|
|
279
|
+
end
|
|
280
|
+
priority = hash['priority'] ||= 0
|
|
281
|
+
reason = hash.key?('reason') ? hash['reason'] : SKIP
|
|
282
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
283
|
+
task_queue_sid =
|
|
284
|
+
hash.key?('task_queue_sid') ? hash['task_queue_sid'] : SKIP
|
|
285
|
+
task_queue_friendly_name =
|
|
286
|
+
hash.key?('task_queue_friendly_name') ? hash['task_queue_friendly_name'] : SKIP
|
|
287
|
+
task_channel_sid =
|
|
288
|
+
hash.key?('task_channel_sid') ? hash['task_channel_sid'] : SKIP
|
|
289
|
+
task_channel_unique_name =
|
|
290
|
+
hash.key?('task_channel_unique_name') ? hash['task_channel_unique_name'] : SKIP
|
|
291
|
+
timeout = hash['timeout'] ||= 0
|
|
292
|
+
workflow_sid = hash.key?('workflow_sid') ? hash['workflow_sid'] : SKIP
|
|
293
|
+
workflow_friendly_name =
|
|
294
|
+
hash.key?('workflow_friendly_name') ? hash['workflow_friendly_name'] : SKIP
|
|
295
|
+
workspace_sid = hash.key?('workspace_sid') ? hash['workspace_sid'] : SKIP
|
|
296
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
297
|
+
links = hash.key?('links') ? hash['links'] : SKIP
|
|
298
|
+
virtual_start_time = if hash.key?('virtual_start_time')
|
|
299
|
+
(DateTimeHelper.from_rfc3339(hash['virtual_start_time']) if hash['virtual_start_time'])
|
|
300
|
+
else
|
|
301
|
+
SKIP
|
|
302
|
+
end
|
|
303
|
+
ignore_capacity =
|
|
304
|
+
hash.key?('ignore_capacity') ? hash['ignore_capacity'] : SKIP
|
|
305
|
+
routing_target =
|
|
306
|
+
hash.key?('routing_target') ? hash['routing_target'] : SKIP
|
|
307
|
+
|
|
308
|
+
# Create a new hash for additional properties, removing known properties.
|
|
309
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
310
|
+
|
|
311
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
312
|
+
new_hash, proc { |value| value }
|
|
313
|
+
)
|
|
314
|
+
|
|
315
|
+
# Create object from extracted values.
|
|
316
|
+
TaskRouterTask.new(account_sid: account_sid,
|
|
317
|
+
age: age,
|
|
318
|
+
assignment_status: assignment_status,
|
|
319
|
+
attributes: attributes,
|
|
320
|
+
addons: addons,
|
|
321
|
+
date_created: date_created,
|
|
322
|
+
date_updated: date_updated,
|
|
323
|
+
task_queue_entered_date: task_queue_entered_date,
|
|
324
|
+
priority: priority,
|
|
325
|
+
reason: reason,
|
|
326
|
+
sid: sid,
|
|
327
|
+
task_queue_sid: task_queue_sid,
|
|
328
|
+
task_queue_friendly_name: task_queue_friendly_name,
|
|
329
|
+
task_channel_sid: task_channel_sid,
|
|
330
|
+
task_channel_unique_name: task_channel_unique_name,
|
|
331
|
+
timeout: timeout,
|
|
332
|
+
workflow_sid: workflow_sid,
|
|
333
|
+
workflow_friendly_name: workflow_friendly_name,
|
|
334
|
+
workspace_sid: workspace_sid,
|
|
335
|
+
url: url,
|
|
336
|
+
links: links,
|
|
337
|
+
virtual_start_time: virtual_start_time,
|
|
338
|
+
ignore_capacity: ignore_capacity,
|
|
339
|
+
routing_target: routing_target,
|
|
340
|
+
additional_properties: additional_properties)
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
def to_custom_date_created
|
|
344
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
def to_custom_date_updated
|
|
348
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
def to_custom_task_queue_entered_date
|
|
352
|
+
DateTimeHelper.to_rfc3339(task_queue_entered_date)
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
def to_custom_virtual_start_time
|
|
356
|
+
DateTimeHelper.to_rfc3339(virtual_start_time)
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
# Provides a human-readable string representation of the object.
|
|
360
|
+
def to_s
|
|
361
|
+
class_name = self.class.name.split('::').last
|
|
362
|
+
"<#{class_name} account_sid: #{@account_sid}, age: #{@age}, assignment_status:"\
|
|
363
|
+
" #{@assignment_status}, attributes: #{@attributes}, addons: #{@addons}, date_created:"\
|
|
364
|
+
" #{@date_created}, date_updated: #{@date_updated}, task_queue_entered_date:"\
|
|
365
|
+
" #{@task_queue_entered_date}, priority: #{@priority}, reason: #{@reason}, sid: #{@sid},"\
|
|
366
|
+
" task_queue_sid: #{@task_queue_sid}, task_queue_friendly_name:"\
|
|
367
|
+
" #{@task_queue_friendly_name}, task_channel_sid: #{@task_channel_sid},"\
|
|
368
|
+
" task_channel_unique_name: #{@task_channel_unique_name}, timeout: #{@timeout},"\
|
|
369
|
+
" workflow_sid: #{@workflow_sid}, workflow_friendly_name: #{@workflow_friendly_name},"\
|
|
370
|
+
" workspace_sid: #{@workspace_sid}, url: #{@url}, links: #{@links}, virtual_start_time:"\
|
|
371
|
+
" #{@virtual_start_time}, ignore_capacity: #{@ignore_capacity}, routing_target:"\
|
|
372
|
+
" #{@routing_target}, additional_properties: #{@additional_properties}>"
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
376
|
+
def inspect
|
|
377
|
+
class_name = self.class.name.split('::').last
|
|
378
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, age: #{@age.inspect},"\
|
|
379
|
+
" assignment_status: #{@assignment_status.inspect}, attributes: #{@attributes.inspect},"\
|
|
380
|
+
" addons: #{@addons.inspect}, date_created: #{@date_created.inspect}, date_updated:"\
|
|
381
|
+
" #{@date_updated.inspect}, task_queue_entered_date: #{@task_queue_entered_date.inspect},"\
|
|
382
|
+
" priority: #{@priority.inspect}, reason: #{@reason.inspect}, sid: #{@sid.inspect},"\
|
|
383
|
+
" task_queue_sid: #{@task_queue_sid.inspect}, task_queue_friendly_name:"\
|
|
384
|
+
" #{@task_queue_friendly_name.inspect}, task_channel_sid: #{@task_channel_sid.inspect},"\
|
|
385
|
+
" task_channel_unique_name: #{@task_channel_unique_name.inspect}, timeout:"\
|
|
386
|
+
" #{@timeout.inspect}, workflow_sid: #{@workflow_sid.inspect}, workflow_friendly_name:"\
|
|
387
|
+
" #{@workflow_friendly_name.inspect}, workspace_sid: #{@workspace_sid.inspect}, url:"\
|
|
388
|
+
" #{@url.inspect}, links: #{@links.inspect}, virtual_start_time:"\
|
|
389
|
+
" #{@virtual_start_time.inspect}, ignore_capacity: #{@ignore_capacity.inspect},"\
|
|
390
|
+
" routing_target: #{@routing_target.inspect}, additional_properties:"\
|
|
391
|
+
" #{@additional_properties}>"
|
|
392
|
+
end
|
|
393
|
+
end
|
|
394
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# The current status of the Task's assignment. Can be: `pending`, `reserved`,
|
|
8
|
+
# `assigned`, `canceled`, `wrapping`, or `completed`.
|
|
9
|
+
class TaskStatus
|
|
10
|
+
TASK_STATUS = [
|
|
11
|
+
# TODO: Write general description for PENDING
|
|
12
|
+
PENDING = 'pending'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for RESERVED
|
|
15
|
+
RESERVED = 'reserved'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for ASSIGNED
|
|
18
|
+
ASSIGNED = 'assigned'.freeze,
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for CANCELED
|
|
21
|
+
CANCELED = 'canceled'.freeze,
|
|
22
|
+
|
|
23
|
+
# TODO: Write general description for COMPLETED
|
|
24
|
+
COMPLETED = 'completed'.freeze,
|
|
25
|
+
|
|
26
|
+
# TODO: Write general description for WRAPPING
|
|
27
|
+
WRAPPING = 'wrapping'.freeze
|
|
28
|
+
].freeze
|
|
29
|
+
|
|
30
|
+
def self.validate(value)
|
|
31
|
+
return false if value.nil?
|
|
32
|
+
|
|
33
|
+
TASK_STATUS.include?(value)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def self.from_value(value, default_value = PENDING)
|
|
37
|
+
return default_value if value.nil?
|
|
38
|
+
|
|
39
|
+
str = value.to_s.strip
|
|
40
|
+
|
|
41
|
+
case str.downcase
|
|
42
|
+
when 'pending' then PENDING
|
|
43
|
+
when 'reserved' then RESERVED
|
|
44
|
+
when 'assigned' then ASSIGNED
|
|
45
|
+
when 'canceled' then CANCELED
|
|
46
|
+
when 'completed' then COMPLETED
|
|
47
|
+
when 'wrapping' then WRAPPING
|
|
48
|
+
else
|
|
49
|
+
default_value
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|