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,396 @@
|
|
|
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
|
+
# TaskrouterV1TaskReservationApi
|
|
8
|
+
class TaskrouterV1TaskReservationApi < BaseApi
|
|
9
|
+
# Tasks reserved for workers
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# with the TaskReservation resources to read.
|
|
12
|
+
# @param [String] task_sid Required parameter: The SID of the reserved Task
|
|
13
|
+
# resource with the TaskReservation resources to read.
|
|
14
|
+
# @param [TaskReservationStatus] reservation_status Optional parameter:
|
|
15
|
+
# Returns the list of reservations for a task with a specified
|
|
16
|
+
# ReservationStatus. Can be: `pending`, `accepted`, `rejected`, or
|
|
17
|
+
# `timeout`.
|
|
18
|
+
# @param [String] worker_sid Optional parameter: The SID of the reserved
|
|
19
|
+
# Worker resource to read.
|
|
20
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
21
|
+
# return in each list page. The default is 50, and the maximum is 1000.
|
|
22
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
23
|
+
# simply for client state.
|
|
24
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
25
|
+
# provided by the API.
|
|
26
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
27
|
+
def list_task_reservation(workspace_sid,
|
|
28
|
+
task_sid,
|
|
29
|
+
reservation_status: nil,
|
|
30
|
+
worker_sid: nil,
|
|
31
|
+
page_size: nil,
|
|
32
|
+
page: nil,
|
|
33
|
+
page_token: nil)
|
|
34
|
+
@api_call
|
|
35
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
36
|
+
'/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations',
|
|
37
|
+
Server::DEFAULT4)
|
|
38
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
39
|
+
.is_required(true)
|
|
40
|
+
.should_encode(true))
|
|
41
|
+
.template_param(new_parameter(task_sid, key: 'TaskSid')
|
|
42
|
+
.is_required(true)
|
|
43
|
+
.should_encode(true))
|
|
44
|
+
.query_param(new_parameter(reservation_status, key: 'ReservationStatus'))
|
|
45
|
+
.query_param(new_parameter(worker_sid, key: 'WorkerSid'))
|
|
46
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
47
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
48
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
49
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
50
|
+
.auth(Single.new('accountSid_authToken')))
|
|
51
|
+
.response(new_response_handler
|
|
52
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
53
|
+
.deserialize_into(ListTaskReservationResponse.method(:from_hash))
|
|
54
|
+
.is_api_response(true))
|
|
55
|
+
.execute
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Tasks reserved for workers
|
|
59
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
60
|
+
# with the TaskReservation resource to fetch.
|
|
61
|
+
# @param [String] task_sid Required parameter: The SID of the reserved Task
|
|
62
|
+
# resource with the TaskReservation resource to fetch.
|
|
63
|
+
# @param [String] sid Required parameter: The SID of the TaskReservation
|
|
64
|
+
# resource to fetch.
|
|
65
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
66
|
+
def fetch_task_reservation(workspace_sid,
|
|
67
|
+
task_sid,
|
|
68
|
+
sid)
|
|
69
|
+
@api_call
|
|
70
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
71
|
+
'/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}',
|
|
72
|
+
Server::DEFAULT4)
|
|
73
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
74
|
+
.is_required(true)
|
|
75
|
+
.should_encode(true))
|
|
76
|
+
.template_param(new_parameter(task_sid, key: 'TaskSid')
|
|
77
|
+
.is_required(true)
|
|
78
|
+
.should_encode(true))
|
|
79
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
80
|
+
.is_required(true)
|
|
81
|
+
.should_encode(true))
|
|
82
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
83
|
+
.auth(Single.new('accountSid_authToken')))
|
|
84
|
+
.response(new_response_handler
|
|
85
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
86
|
+
.deserialize_into(TaskReservation.method(:from_hash))
|
|
87
|
+
.is_api_response(true))
|
|
88
|
+
.execute
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Tasks reserved for workers
|
|
92
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
93
|
+
# with the TaskReservation resources to update.
|
|
94
|
+
# @param [String] task_sid Required parameter: The SID of the reserved Task
|
|
95
|
+
# resource with the TaskReservation resources to update.
|
|
96
|
+
# @param [String] sid Required parameter: The SID of the TaskReservation
|
|
97
|
+
# resource to update.
|
|
98
|
+
# @param [String] if_match Optional parameter: The If-Match HTTP request
|
|
99
|
+
# header
|
|
100
|
+
# @param [TaskReservationStatus] reservation_status Optional parameter: The
|
|
101
|
+
# current status of the reservation. Can be: `pending`, `accepted`,
|
|
102
|
+
# `rejected`, or `timeout`.
|
|
103
|
+
# @param [String] worker_activity_sid Optional parameter: The new worker
|
|
104
|
+
# activity SID if rejecting a reservation.
|
|
105
|
+
# @param [String] instruction Optional parameter: The assignment instruction
|
|
106
|
+
# for reservation.
|
|
107
|
+
# @param [String] dequeue_post_work_activity_sid Optional parameter: The SID
|
|
108
|
+
# of the Activity resource to start after executing a Dequeue instruction.
|
|
109
|
+
# @param [String] dequeue_from Optional parameter: The Caller ID of the call
|
|
110
|
+
# to the worker when executing a Dequeue instruction.
|
|
111
|
+
# @param [String] dequeue_record Optional parameter: Whether to record both
|
|
112
|
+
# legs of a call when executing a Dequeue instruction or which leg to
|
|
113
|
+
# record.
|
|
114
|
+
# @param [Integer] dequeue_timeout Optional parameter: Timeout for call when
|
|
115
|
+
# executing a Dequeue instruction.
|
|
116
|
+
# @param [String] dequeue_to Optional parameter: The Contact URI of the
|
|
117
|
+
# worker when executing a Dequeue instruction. Can be the URI of the Twilio
|
|
118
|
+
# Client, the SIP URI for Programmable SIP, or the
|
|
119
|
+
# [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone
|
|
120
|
+
# number, depending on the destination.
|
|
121
|
+
# @param [String] dequeue_status_callback_url Optional parameter: The
|
|
122
|
+
# Callback URL for completed call event when executing a Dequeue
|
|
123
|
+
# instruction.
|
|
124
|
+
# @param [String] call_from Optional parameter: The Caller ID of the
|
|
125
|
+
# outbound call when executing a Call instruction.
|
|
126
|
+
# @param [String] call_record Optional parameter: Whether to record both
|
|
127
|
+
# legs of a call when executing a Call instruction or which leg to record.
|
|
128
|
+
# @param [Integer] call_timeout Optional parameter: Timeout for call when
|
|
129
|
+
# executing a Call instruction.
|
|
130
|
+
# @param [String] call_to Optional parameter: The Contact URI of the worker
|
|
131
|
+
# when executing a Call instruction. Can be the URI of the Twilio Client,
|
|
132
|
+
# the SIP URI for Programmable SIP, or the
|
|
133
|
+
# [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone
|
|
134
|
+
# number, depending on the destination.
|
|
135
|
+
# @param [String] call_url Optional parameter: TwiML URI executed on
|
|
136
|
+
# answering the worker's leg as a result of the Call instruction.
|
|
137
|
+
# @param [String] call_status_callback_url Optional parameter: The URL to
|
|
138
|
+
# call for the completed call event when executing a Call instruction.
|
|
139
|
+
# @param [TrueClass | FalseClass] call_accept Optional parameter: Whether to
|
|
140
|
+
# accept a reservation when executing a Call instruction.
|
|
141
|
+
# @param [String] redirect_call_sid Optional parameter: The Call SID of the
|
|
142
|
+
# call parked in the queue when executing a Redirect instruction.
|
|
143
|
+
# @param [TrueClass | FalseClass] redirect_accept Optional parameter:
|
|
144
|
+
# Whether the reservation should be accepted when executing a Redirect
|
|
145
|
+
# instruction.
|
|
146
|
+
# @param [String] redirect_url Optional parameter: TwiML URI to redirect the
|
|
147
|
+
# call to when executing the Redirect instruction.
|
|
148
|
+
# @param [String] to Optional parameter: The Contact URI of the worker when
|
|
149
|
+
# executing a Conference instruction. Can be the URI of the Twilio Client,
|
|
150
|
+
# the SIP URI for Programmable SIP, or the
|
|
151
|
+
# [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone
|
|
152
|
+
# number, depending on the destination.
|
|
153
|
+
# @param [String] from Optional parameter: The Caller ID of the call to the
|
|
154
|
+
# worker when executing a Conference instruction.
|
|
155
|
+
# @param [String] status_callback Optional parameter: The URL we should call
|
|
156
|
+
# using the `status_callback_method` to send status information to your
|
|
157
|
+
# application.
|
|
158
|
+
# @param [ConfigurationWebhookMethod] status_callback_method Optional
|
|
159
|
+
# parameter: The HTTP method we should use to call `status_callback`. Can
|
|
160
|
+
# be: `POST` or `GET` and the default is `POST`.
|
|
161
|
+
# @param [Array[TaskReservationCallStatus]] status_callback_event Optional
|
|
162
|
+
# parameter: The call progress events that we will send to
|
|
163
|
+
# `status_callback`. Can be: `initiated`, `ringing`, `answered`, or
|
|
164
|
+
# `completed`.
|
|
165
|
+
# @param [Integer] timeout Optional parameter: Timeout for call when
|
|
166
|
+
# executing a Conference instruction.
|
|
167
|
+
# @param [TrueClass | FalseClass] record Optional parameter: Whether to
|
|
168
|
+
# record the participant and their conferences, including the time between
|
|
169
|
+
# conferences. The default is `false`.
|
|
170
|
+
# @param [TrueClass | FalseClass] muted Optional parameter: Whether the
|
|
171
|
+
# agent is muted in the conference. The default is `false`.
|
|
172
|
+
# @param [String] beep Optional parameter: Whether to play a notification
|
|
173
|
+
# beep when the participant joins or when to play a beep. Can be: `true`,
|
|
174
|
+
# `false`, `onEnter`, or `onExit`. The default value is `true`.
|
|
175
|
+
# @param [TrueClass | FalseClass] start_conference_on_enter Optional
|
|
176
|
+
# parameter: Whether to start the conference when the participant joins, if
|
|
177
|
+
# it has not already started. The default is `true`. If `false` and the
|
|
178
|
+
# conference has not started, the participant is muted and hears background
|
|
179
|
+
# music until another participant starts the conference.
|
|
180
|
+
# @param [TrueClass | FalseClass] end_conference_on_exit Optional parameter:
|
|
181
|
+
# Whether to end the conference when the agent leaves.
|
|
182
|
+
# @param [String] wait_url Optional parameter: The URL we should call using
|
|
183
|
+
# the `wait_method` for the music to play while participants are waiting for
|
|
184
|
+
# the conference to start. The default value is the URL of our standard hold
|
|
185
|
+
# music. [Learn more about hold
|
|
186
|
+
# music](https://www.twilio.com/labs/twimlets/holdmusic).
|
|
187
|
+
# @param [ConfigurationWebhookMethod] wait_method Optional parameter: The
|
|
188
|
+
# HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and
|
|
189
|
+
# the default is `POST`. When using a static audio file, this should be
|
|
190
|
+
# `GET` so that we can cache the file.
|
|
191
|
+
# @param [TrueClass | FalseClass] early_media Optional parameter: Whether to
|
|
192
|
+
# allow an agent to hear the state of the outbound call, including ringing
|
|
193
|
+
# or disconnect messages. The default is `true`.
|
|
194
|
+
# @param [Integer] max_participants Optional parameter: The maximum number
|
|
195
|
+
# of participants in the conference. Can be a positive integer from `2` to
|
|
196
|
+
# `250`. The default value is `250`.
|
|
197
|
+
# @param [String] conference_status_callback Optional parameter: The URL we
|
|
198
|
+
# should call using the `conference_status_callback_method` when the
|
|
199
|
+
# conference events in `conference_status_callback_event` occur. Only the
|
|
200
|
+
# value set by the first participant to join the conference is used.
|
|
201
|
+
# Subsequent `conference_status_callback` values are ignored.
|
|
202
|
+
# @param [ConfigurationWebhookMethod] conference_status_callback_method
|
|
203
|
+
# Optional parameter: The HTTP method we should use to call
|
|
204
|
+
# `conference_status_callback`. Can be: `GET` or `POST` and defaults to
|
|
205
|
+
# `POST`.
|
|
206
|
+
# @param [Array[TaskReservationConferenceEvent]]
|
|
207
|
+
# conference_status_callback_event Optional parameter: The conference status
|
|
208
|
+
# events that we will send to `conference_status_callback`. Can be: `start`,
|
|
209
|
+
# `end`, `join`, `leave`, `mute`, `hold`, `speaker`.
|
|
210
|
+
# @param [String] conference_record Optional parameter: Whether to record
|
|
211
|
+
# the conference the participant is joining or when to record the
|
|
212
|
+
# conference. Can be: `true`, `false`, `record-from-start`, and
|
|
213
|
+
# `do-not-record`. The default value is `false`.
|
|
214
|
+
# @param [String] conference_trim Optional parameter: How to trim the
|
|
215
|
+
# leading and trailing silence from your recorded conference audio files.
|
|
216
|
+
# Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
|
|
217
|
+
# @param [String] recording_channels Optional parameter: The recording
|
|
218
|
+
# channels for the final recording. Can be: `mono` or `dual` and the default
|
|
219
|
+
# is `mono`.
|
|
220
|
+
# @param [String] recording_status_callback Optional parameter: The URL that
|
|
221
|
+
# we should call using the `recording_status_callback_method` when the
|
|
222
|
+
# recording status changes.
|
|
223
|
+
# @param [ConfigurationWebhookMethod] recording_status_callback_method
|
|
224
|
+
# Optional parameter: The HTTP method we should use when we call
|
|
225
|
+
# `recording_status_callback`. Can be: `GET` or `POST` and defaults to
|
|
226
|
+
# `POST`.
|
|
227
|
+
# @param [String] conference_recording_status_callback Optional parameter:
|
|
228
|
+
# The URL we should call using the
|
|
229
|
+
# `conference_recording_status_callback_method` when the conference
|
|
230
|
+
# recording is available.
|
|
231
|
+
# @param [ConfigurationWebhookMethod]
|
|
232
|
+
# conference_recording_status_callback_method Optional parameter: The HTTP
|
|
233
|
+
# method we should use to call `conference_recording_status_callback`. Can
|
|
234
|
+
# be: `GET` or `POST` and defaults to `POST`.
|
|
235
|
+
# @param [String] region Optional parameter: The
|
|
236
|
+
# [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global
|
|
237
|
+
# -low-latency-routing-and-region-selection-work-for-conferences-and-Client-
|
|
238
|
+
# calls) where we should mix the recorded audio. Can be:`us1`, `us2`, `ie1`,
|
|
239
|
+
# `de1`, `sg1`, `br1`, `au1`, or `jp1`.
|
|
240
|
+
# @param [String] sip_auth_username Optional parameter: The SIP username
|
|
241
|
+
# used for authentication.
|
|
242
|
+
# @param [String] sip_auth_password Optional parameter: The SIP password for
|
|
243
|
+
# authentication.
|
|
244
|
+
# @param [Array[String]] dequeue_status_callback_event Optional parameter:
|
|
245
|
+
# The Call progress events sent via webhooks as a result of a Dequeue
|
|
246
|
+
# instruction.
|
|
247
|
+
# @param [String] post_work_activity_sid Optional parameter: The new worker
|
|
248
|
+
# activity SID after executing a Conference instruction.
|
|
249
|
+
# @param [TaskReservationSupervisorMode] supervisor_mode Optional parameter:
|
|
250
|
+
# TODO: type description here
|
|
251
|
+
# @param [String] supervisor Optional parameter: The Supervisor SID/URI when
|
|
252
|
+
# executing the Supervise instruction.
|
|
253
|
+
# @param [TrueClass | FalseClass] end_conference_on_customer_exit Optional
|
|
254
|
+
# parameter: Whether to end the conference when the customer leaves.
|
|
255
|
+
# @param [TrueClass | FalseClass] beep_on_customer_entrance Optional
|
|
256
|
+
# parameter: Whether to play a notification beep when the customer joins.
|
|
257
|
+
# @param [String] jitter_buffer_size Optional parameter: The jitter buffer
|
|
258
|
+
# size for conference. Can be: `small`, `medium`, `large`, `off`.
|
|
259
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
260
|
+
def update_task_reservation(workspace_sid,
|
|
261
|
+
task_sid,
|
|
262
|
+
sid,
|
|
263
|
+
if_match: nil,
|
|
264
|
+
reservation_status: nil,
|
|
265
|
+
worker_activity_sid: nil,
|
|
266
|
+
instruction: nil,
|
|
267
|
+
dequeue_post_work_activity_sid: nil,
|
|
268
|
+
dequeue_from: nil,
|
|
269
|
+
dequeue_record: nil,
|
|
270
|
+
dequeue_timeout: nil,
|
|
271
|
+
dequeue_to: nil,
|
|
272
|
+
dequeue_status_callback_url: nil,
|
|
273
|
+
call_from: nil,
|
|
274
|
+
call_record: nil,
|
|
275
|
+
call_timeout: nil,
|
|
276
|
+
call_to: nil,
|
|
277
|
+
call_url: nil,
|
|
278
|
+
call_status_callback_url: nil,
|
|
279
|
+
call_accept: nil,
|
|
280
|
+
redirect_call_sid: nil,
|
|
281
|
+
redirect_accept: nil,
|
|
282
|
+
redirect_url: nil,
|
|
283
|
+
to: nil,
|
|
284
|
+
from: nil,
|
|
285
|
+
status_callback: nil,
|
|
286
|
+
status_callback_method: nil,
|
|
287
|
+
status_callback_event: nil,
|
|
288
|
+
timeout: nil,
|
|
289
|
+
record: nil,
|
|
290
|
+
muted: nil,
|
|
291
|
+
beep: nil,
|
|
292
|
+
start_conference_on_enter: nil,
|
|
293
|
+
end_conference_on_exit: nil,
|
|
294
|
+
wait_url: nil,
|
|
295
|
+
wait_method: nil,
|
|
296
|
+
early_media: nil,
|
|
297
|
+
max_participants: nil,
|
|
298
|
+
conference_status_callback: nil,
|
|
299
|
+
conference_status_callback_method: nil,
|
|
300
|
+
conference_status_callback_event: nil,
|
|
301
|
+
conference_record: nil,
|
|
302
|
+
conference_trim: nil,
|
|
303
|
+
recording_channels: nil,
|
|
304
|
+
recording_status_callback: nil,
|
|
305
|
+
recording_status_callback_method: nil,
|
|
306
|
+
conference_recording_status_callback: nil,
|
|
307
|
+
conference_recording_status_callback_method: nil,
|
|
308
|
+
region: nil,
|
|
309
|
+
sip_auth_username: nil,
|
|
310
|
+
sip_auth_password: nil,
|
|
311
|
+
dequeue_status_callback_event: nil,
|
|
312
|
+
post_work_activity_sid: nil,
|
|
313
|
+
supervisor_mode: nil,
|
|
314
|
+
supervisor: nil,
|
|
315
|
+
end_conference_on_customer_exit: nil,
|
|
316
|
+
beep_on_customer_entrance: nil,
|
|
317
|
+
jitter_buffer_size: nil)
|
|
318
|
+
@api_call
|
|
319
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
320
|
+
'/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}',
|
|
321
|
+
Server::DEFAULT4)
|
|
322
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
323
|
+
.is_required(true)
|
|
324
|
+
.should_encode(true))
|
|
325
|
+
.template_param(new_parameter(task_sid, key: 'TaskSid')
|
|
326
|
+
.is_required(true)
|
|
327
|
+
.should_encode(true))
|
|
328
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
329
|
+
.is_required(true)
|
|
330
|
+
.should_encode(true))
|
|
331
|
+
.header_param(new_parameter(if_match, key: 'If-Match'))
|
|
332
|
+
.form_param(new_parameter(reservation_status, key: 'ReservationStatus'))
|
|
333
|
+
.form_param(new_parameter(worker_activity_sid, key: 'WorkerActivitySid'))
|
|
334
|
+
.form_param(new_parameter(instruction, key: 'Instruction'))
|
|
335
|
+
.form_param(new_parameter(dequeue_post_work_activity_sid, key: 'DequeuePostWorkActivitySid'))
|
|
336
|
+
.form_param(new_parameter(dequeue_from, key: 'DequeueFrom'))
|
|
337
|
+
.form_param(new_parameter(dequeue_record, key: 'DequeueRecord'))
|
|
338
|
+
.form_param(new_parameter(dequeue_timeout, key: 'DequeueTimeout'))
|
|
339
|
+
.form_param(new_parameter(dequeue_to, key: 'DequeueTo'))
|
|
340
|
+
.form_param(new_parameter(dequeue_status_callback_url, key: 'DequeueStatusCallbackUrl'))
|
|
341
|
+
.form_param(new_parameter(call_from, key: 'CallFrom'))
|
|
342
|
+
.form_param(new_parameter(call_record, key: 'CallRecord'))
|
|
343
|
+
.form_param(new_parameter(call_timeout, key: 'CallTimeout'))
|
|
344
|
+
.form_param(new_parameter(call_to, key: 'CallTo'))
|
|
345
|
+
.form_param(new_parameter(call_url, key: 'CallUrl'))
|
|
346
|
+
.form_param(new_parameter(call_status_callback_url, key: 'CallStatusCallbackUrl'))
|
|
347
|
+
.form_param(new_parameter(call_accept, key: 'CallAccept'))
|
|
348
|
+
.form_param(new_parameter(redirect_call_sid, key: 'RedirectCallSid'))
|
|
349
|
+
.form_param(new_parameter(redirect_accept, key: 'RedirectAccept'))
|
|
350
|
+
.form_param(new_parameter(redirect_url, key: 'RedirectUrl'))
|
|
351
|
+
.form_param(new_parameter(to, key: 'To'))
|
|
352
|
+
.form_param(new_parameter(from, key: 'From'))
|
|
353
|
+
.form_param(new_parameter(status_callback, key: 'StatusCallback'))
|
|
354
|
+
.form_param(new_parameter(status_callback_method, key: 'StatusCallbackMethod'))
|
|
355
|
+
.form_param(new_parameter(status_callback_event, key: 'StatusCallbackEvent'))
|
|
356
|
+
.form_param(new_parameter(timeout, key: 'Timeout'))
|
|
357
|
+
.form_param(new_parameter(record, key: 'Record'))
|
|
358
|
+
.form_param(new_parameter(muted, key: 'Muted'))
|
|
359
|
+
.form_param(new_parameter(beep, key: 'Beep'))
|
|
360
|
+
.form_param(new_parameter(start_conference_on_enter, key: 'StartConferenceOnEnter'))
|
|
361
|
+
.form_param(new_parameter(end_conference_on_exit, key: 'EndConferenceOnExit'))
|
|
362
|
+
.form_param(new_parameter(wait_url, key: 'WaitUrl'))
|
|
363
|
+
.form_param(new_parameter(wait_method, key: 'WaitMethod'))
|
|
364
|
+
.form_param(new_parameter(early_media, key: 'EarlyMedia'))
|
|
365
|
+
.form_param(new_parameter(max_participants, key: 'MaxParticipants'))
|
|
366
|
+
.form_param(new_parameter(conference_status_callback, key: 'ConferenceStatusCallback'))
|
|
367
|
+
.form_param(new_parameter(conference_status_callback_method, key: 'ConferenceStatusCallbackMethod'))
|
|
368
|
+
.form_param(new_parameter(conference_status_callback_event, key: 'ConferenceStatusCallbackEvent'))
|
|
369
|
+
.form_param(new_parameter(conference_record, key: 'ConferenceRecord'))
|
|
370
|
+
.form_param(new_parameter(conference_trim, key: 'ConferenceTrim'))
|
|
371
|
+
.form_param(new_parameter(recording_channels, key: 'RecordingChannels'))
|
|
372
|
+
.form_param(new_parameter(recording_status_callback, key: 'RecordingStatusCallback'))
|
|
373
|
+
.form_param(new_parameter(recording_status_callback_method, key: 'RecordingStatusCallbackMethod'))
|
|
374
|
+
.form_param(new_parameter(conference_recording_status_callback, key: 'ConferenceRecordingStatusCallback'))
|
|
375
|
+
.form_param(new_parameter(conference_recording_status_callback_method, key: 'ConferenceRecordingStatusCallbackMethod'))
|
|
376
|
+
.form_param(new_parameter(region, key: 'Region'))
|
|
377
|
+
.form_param(new_parameter(sip_auth_username, key: 'SipAuthUsername'))
|
|
378
|
+
.form_param(new_parameter(sip_auth_password, key: 'SipAuthPassword'))
|
|
379
|
+
.form_param(new_parameter(dequeue_status_callback_event, key: 'DequeueStatusCallbackEvent'))
|
|
380
|
+
.form_param(new_parameter(post_work_activity_sid, key: 'PostWorkActivitySid'))
|
|
381
|
+
.form_param(new_parameter(supervisor_mode, key: 'SupervisorMode'))
|
|
382
|
+
.form_param(new_parameter(supervisor, key: 'Supervisor'))
|
|
383
|
+
.form_param(new_parameter(end_conference_on_customer_exit, key: 'EndConferenceOnCustomerExit'))
|
|
384
|
+
.form_param(new_parameter(beep_on_customer_entrance, key: 'BeepOnCustomerEntrance'))
|
|
385
|
+
.form_param(new_parameter(jitter_buffer_size, key: 'JitterBufferSize'))
|
|
386
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
387
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
388
|
+
.auth(Single.new('accountSid_authToken')))
|
|
389
|
+
.response(new_response_handler
|
|
390
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
391
|
+
.deserialize_into(TaskReservation.method(:from_hash))
|
|
392
|
+
.is_api_response(true))
|
|
393
|
+
.execute
|
|
394
|
+
end
|
|
395
|
+
end
|
|
396
|
+
end
|
|
@@ -0,0 +1,232 @@
|
|
|
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
|
+
# TaskrouterV1WorkerApi
|
|
8
|
+
class TaskrouterV1WorkerApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# with the Workers to read.
|
|
12
|
+
# @param [String] activity_name Optional parameter: The `activity_name` of
|
|
13
|
+
# the Worker resources to read.
|
|
14
|
+
# @param [String] activity_sid Optional parameter: The `activity_sid` of the
|
|
15
|
+
# Worker resources to read.
|
|
16
|
+
# @param [String] available Optional parameter: Whether to return only
|
|
17
|
+
# Worker resources that are available or unavailable. Can be `true`, `1`, or
|
|
18
|
+
# `yes` to return Worker resources that are available, and `false`, or any
|
|
19
|
+
# value returns the Worker resources that are not available.
|
|
20
|
+
# @param [String] friendly_name Optional parameter: The `friendly_name` of
|
|
21
|
+
# the Worker resources to read.
|
|
22
|
+
# @param [String] target_workers_expression Optional parameter: Filter by
|
|
23
|
+
# Workers that would match an expression. In addition to fields in the
|
|
24
|
+
# workers' attributes, the expression can include the following worker
|
|
25
|
+
# fields: `sid`, `friendly_name`, `activity_sid`, or `activity_name`
|
|
26
|
+
# @param [String] task_queue_name Optional parameter: The `friendly_name` of
|
|
27
|
+
# the TaskQueue that the Workers to read are eligible for.
|
|
28
|
+
# @param [String] task_queue_sid Optional parameter: The SID of the
|
|
29
|
+
# TaskQueue that the Workers to read are eligible for.
|
|
30
|
+
# @param [String] ordering Optional parameter: Sorting parameter for
|
|
31
|
+
# Workers
|
|
32
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
33
|
+
# return in each list page. The default is 50, and the maximum is 1000.
|
|
34
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
35
|
+
# simply for client state.
|
|
36
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
37
|
+
# provided by the API.
|
|
38
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
39
|
+
def list_worker(workspace_sid,
|
|
40
|
+
activity_name: nil,
|
|
41
|
+
activity_sid: nil,
|
|
42
|
+
available: nil,
|
|
43
|
+
friendly_name: nil,
|
|
44
|
+
target_workers_expression: nil,
|
|
45
|
+
task_queue_name: nil,
|
|
46
|
+
task_queue_sid: nil,
|
|
47
|
+
ordering: nil,
|
|
48
|
+
page_size: nil,
|
|
49
|
+
page: nil,
|
|
50
|
+
page_token: nil)
|
|
51
|
+
@api_call
|
|
52
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
53
|
+
'/v1/Workspaces/{WorkspaceSid}/Workers',
|
|
54
|
+
Server::DEFAULT4)
|
|
55
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
56
|
+
.is_required(true)
|
|
57
|
+
.should_encode(true))
|
|
58
|
+
.query_param(new_parameter(activity_name, key: 'ActivityName'))
|
|
59
|
+
.query_param(new_parameter(activity_sid, key: 'ActivitySid'))
|
|
60
|
+
.query_param(new_parameter(available, key: 'Available'))
|
|
61
|
+
.query_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
62
|
+
.query_param(new_parameter(target_workers_expression, key: 'TargetWorkersExpression'))
|
|
63
|
+
.query_param(new_parameter(task_queue_name, key: 'TaskQueueName'))
|
|
64
|
+
.query_param(new_parameter(task_queue_sid, key: 'TaskQueueSid'))
|
|
65
|
+
.query_param(new_parameter(ordering, key: 'Ordering'))
|
|
66
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
67
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
68
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
69
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
70
|
+
.auth(Single.new('accountSid_authToken')))
|
|
71
|
+
.response(new_response_handler
|
|
72
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
73
|
+
.deserialize_into(ListWorkerResponse.method(:from_hash))
|
|
74
|
+
.is_api_response(true))
|
|
75
|
+
.execute
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# TODO: type endpoint description here
|
|
79
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
80
|
+
# that the new Worker belongs to.
|
|
81
|
+
# @param [String] friendly_name Required parameter: A descriptive string
|
|
82
|
+
# that you create to describe the new Worker. It can be up to 64 characters
|
|
83
|
+
# long.
|
|
84
|
+
# @param [String] activity_sid Optional parameter: The SID of a valid
|
|
85
|
+
# Activity that will describe the new Worker's initial state. See
|
|
86
|
+
# [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more
|
|
87
|
+
# information. If not provided, the new Worker's initial state is the
|
|
88
|
+
# `default_activity_sid` configured on the Workspace.
|
|
89
|
+
# @param [String] attributes Optional parameter: A valid JSON string that
|
|
90
|
+
# describes the new Worker. For example: `{ "email": "Bob@example.com",
|
|
91
|
+
# "phone": "+5095551234" }`. This data is passed to the
|
|
92
|
+
# `assignment_callback_url` when TaskRouter assigns a Task to the Worker.
|
|
93
|
+
# Defaults to {}.
|
|
94
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
95
|
+
def create_worker(workspace_sid,
|
|
96
|
+
friendly_name,
|
|
97
|
+
activity_sid: nil,
|
|
98
|
+
attributes: nil)
|
|
99
|
+
@api_call
|
|
100
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
101
|
+
'/v1/Workspaces/{WorkspaceSid}/Workers',
|
|
102
|
+
Server::DEFAULT4)
|
|
103
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
104
|
+
.is_required(true)
|
|
105
|
+
.should_encode(true))
|
|
106
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName')
|
|
107
|
+
.is_required(true))
|
|
108
|
+
.form_param(new_parameter(activity_sid, key: 'ActivitySid'))
|
|
109
|
+
.form_param(new_parameter(attributes, key: 'Attributes'))
|
|
110
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
111
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
112
|
+
.auth(Single.new('accountSid_authToken')))
|
|
113
|
+
.response(new_response_handler
|
|
114
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
115
|
+
.deserialize_into(Worker.method(:from_hash))
|
|
116
|
+
.is_api_response(true))
|
|
117
|
+
.execute
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# TODO: type endpoint description here
|
|
121
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
122
|
+
# with the Worker to fetch.
|
|
123
|
+
# @param [String] sid Required parameter: The SID of the Worker resource to
|
|
124
|
+
# fetch.
|
|
125
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
126
|
+
def fetch_worker(workspace_sid,
|
|
127
|
+
sid)
|
|
128
|
+
@api_call
|
|
129
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
130
|
+
'/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}',
|
|
131
|
+
Server::DEFAULT4)
|
|
132
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
133
|
+
.is_required(true)
|
|
134
|
+
.should_encode(true))
|
|
135
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
136
|
+
.is_required(true)
|
|
137
|
+
.should_encode(true))
|
|
138
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
139
|
+
.auth(Single.new('accountSid_authToken')))
|
|
140
|
+
.response(new_response_handler
|
|
141
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
142
|
+
.deserialize_into(Worker.method(:from_hash))
|
|
143
|
+
.is_api_response(true))
|
|
144
|
+
.execute
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# TODO: type endpoint description here
|
|
148
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
149
|
+
# with the Worker to update.
|
|
150
|
+
# @param [String] sid Required parameter: The SID of the Worker resource to
|
|
151
|
+
# update.
|
|
152
|
+
# @param [String] if_match Optional parameter: The If-Match HTTP request
|
|
153
|
+
# header
|
|
154
|
+
# @param [String] activity_sid Optional parameter: The SID of a valid
|
|
155
|
+
# Activity that will describe the Worker's initial state. See
|
|
156
|
+
# [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more
|
|
157
|
+
# information.
|
|
158
|
+
# @param [String] attributes Optional parameter: The JSON string that
|
|
159
|
+
# describes the Worker. For example: `{ "email": "Bob@example.com", "phone":
|
|
160
|
+
# "+5095551234" }`. This data is passed to the `assignment_callback_url`
|
|
161
|
+
# when TaskRouter assigns a Task to the Worker. Defaults to {}.
|
|
162
|
+
# @param [String] friendly_name Optional parameter: A descriptive string
|
|
163
|
+
# that you create to describe the Worker. It can be up to 64 characters
|
|
164
|
+
# long.
|
|
165
|
+
# @param [TrueClass | FalseClass] reject_pending_reservations Optional
|
|
166
|
+
# parameter: Whether to reject the Worker's pending reservations. This
|
|
167
|
+
# option is only valid if the Worker's new
|
|
168
|
+
# [Activity](https://www.twilio.com/docs/taskrouter/api/activity) resource
|
|
169
|
+
# has its `availability` property set to `False`.
|
|
170
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
171
|
+
def update_worker(workspace_sid,
|
|
172
|
+
sid,
|
|
173
|
+
if_match: nil,
|
|
174
|
+
activity_sid: nil,
|
|
175
|
+
attributes: nil,
|
|
176
|
+
friendly_name: nil,
|
|
177
|
+
reject_pending_reservations: nil)
|
|
178
|
+
@api_call
|
|
179
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
180
|
+
'/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}',
|
|
181
|
+
Server::DEFAULT4)
|
|
182
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
183
|
+
.is_required(true)
|
|
184
|
+
.should_encode(true))
|
|
185
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
186
|
+
.is_required(true)
|
|
187
|
+
.should_encode(true))
|
|
188
|
+
.header_param(new_parameter(if_match, key: 'If-Match'))
|
|
189
|
+
.form_param(new_parameter(activity_sid, key: 'ActivitySid'))
|
|
190
|
+
.form_param(new_parameter(attributes, key: 'Attributes'))
|
|
191
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
192
|
+
.form_param(new_parameter(reject_pending_reservations, key: 'RejectPendingReservations'))
|
|
193
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
194
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
195
|
+
.auth(Single.new('accountSid_authToken')))
|
|
196
|
+
.response(new_response_handler
|
|
197
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
198
|
+
.deserialize_into(Worker.method(:from_hash))
|
|
199
|
+
.is_api_response(true))
|
|
200
|
+
.execute
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# TODO: type endpoint description here
|
|
204
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
205
|
+
# with the Worker to delete.
|
|
206
|
+
# @param [String] sid Required parameter: The SID of the Worker resource to
|
|
207
|
+
# delete.
|
|
208
|
+
# @param [String] if_match Optional parameter: The If-Match HTTP request
|
|
209
|
+
# header
|
|
210
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
211
|
+
def delete_worker(workspace_sid,
|
|
212
|
+
sid,
|
|
213
|
+
if_match: nil)
|
|
214
|
+
@api_call
|
|
215
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
216
|
+
'/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}',
|
|
217
|
+
Server::DEFAULT4)
|
|
218
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
219
|
+
.is_required(true)
|
|
220
|
+
.should_encode(true))
|
|
221
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
222
|
+
.is_required(true)
|
|
223
|
+
.should_encode(true))
|
|
224
|
+
.header_param(new_parameter(if_match, key: 'If-Match'))
|
|
225
|
+
.auth(Single.new('accountSid_authToken')))
|
|
226
|
+
.response(new_response_handler
|
|
227
|
+
.is_response_void(true)
|
|
228
|
+
.is_api_response(true))
|
|
229
|
+
.execute
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
end
|