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,225 @@
|
|
|
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
|
+
# TaskrouterV1WorkspaceApi
|
|
8
|
+
class TaskrouterV1WorkspaceApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] sid Required parameter: The SID of the Workspace resource
|
|
11
|
+
# to fetch.
|
|
12
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
13
|
+
def fetch_workspace(sid)
|
|
14
|
+
@api_call
|
|
15
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
16
|
+
'/v1/Workspaces/{Sid}',
|
|
17
|
+
Server::DEFAULT4)
|
|
18
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
19
|
+
.is_required(true)
|
|
20
|
+
.should_encode(true))
|
|
21
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
22
|
+
.auth(Single.new('accountSid_authToken')))
|
|
23
|
+
.response(new_response_handler
|
|
24
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
25
|
+
.deserialize_into(Workspace.method(:from_hash))
|
|
26
|
+
.is_api_response(true))
|
|
27
|
+
.execute
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# TODO: type endpoint description here
|
|
31
|
+
# @param [String] sid Required parameter: The SID of the Workspace resource
|
|
32
|
+
# to update.
|
|
33
|
+
# @param [String] default_activity_sid Optional parameter: The SID of the
|
|
34
|
+
# Activity that will be used when new Workers are created in the
|
|
35
|
+
# Workspace.
|
|
36
|
+
# @param [String] event_callback_url Optional parameter: The URL we should
|
|
37
|
+
# call when an event occurs. See [Workspace
|
|
38
|
+
# Events](https://www.twilio.com/docs/taskrouter/api/event) for more
|
|
39
|
+
# information. This parameter supports Twilio's [Webhooks (HTTP callbacks)
|
|
40
|
+
# Connection
|
|
41
|
+
# Overrides](https://www.twilio.com/docs/usage/webhooks/webhooks-connection-
|
|
42
|
+
# overrides).
|
|
43
|
+
# @param [String] events_filter Optional parameter: The list of Workspace
|
|
44
|
+
# events for which to call event_callback_url. For example if
|
|
45
|
+
# `EventsFilter=task.created,task.canceled,worker.activity.update`, then
|
|
46
|
+
# TaskRouter will call event_callback_url only when a task is created,
|
|
47
|
+
# canceled, or a Worker activity is updated.
|
|
48
|
+
# @param [String] friendly_name Optional parameter: A descriptive string
|
|
49
|
+
# that you create to describe the Workspace resource. For example: `Sales
|
|
50
|
+
# Call Center` or `Customer Support Team`.
|
|
51
|
+
# @param [TrueClass | FalseClass] multi_task_enabled Optional parameter:
|
|
52
|
+
# Whether to enable multi-tasking. Can be: `true` to enable multi-tasking,
|
|
53
|
+
# or `false` to disable it. However, all workspaces should be maintained as
|
|
54
|
+
# multi-tasking. There is no default when omitting this parameter. A
|
|
55
|
+
# multi-tasking Workspace can't be updated to single-tasking unless it is
|
|
56
|
+
# not a Flex Project and another (legacy) single-tasking Workspace exists.
|
|
57
|
+
# Multi-tasking allows Workers to handle multiple Tasks simultaneously. In
|
|
58
|
+
# multi-tasking mode, each Worker can receive parallel reservations up to
|
|
59
|
+
# the per-channel maximums defined in the Workers section. In single-tasking
|
|
60
|
+
# mode (legacy mode), each Worker will only receive a new reservation when
|
|
61
|
+
# the previous task is completed. Learn more at
|
|
62
|
+
# [Multitasking](https://www.twilio.com/docs/taskrouter/multitasking).
|
|
63
|
+
# @param [String] timeout_activity_sid Optional parameter: The SID of the
|
|
64
|
+
# Activity that will be assigned to a Worker when a Task reservation times
|
|
65
|
+
# out without a response.
|
|
66
|
+
# @param [WorkspaceQueueOrder] prioritize_queue_order Optional parameter:
|
|
67
|
+
# The type of TaskQueue to prioritize when Workers are receiving Tasks from
|
|
68
|
+
# both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is
|
|
69
|
+
# `FIFO`. For more information, see [Queue
|
|
70
|
+
# Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first
|
|
71
|
+
# -out-lifo).
|
|
72
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
73
|
+
def update_workspace(sid,
|
|
74
|
+
default_activity_sid: nil,
|
|
75
|
+
event_callback_url: nil,
|
|
76
|
+
events_filter: nil,
|
|
77
|
+
friendly_name: nil,
|
|
78
|
+
multi_task_enabled: nil,
|
|
79
|
+
timeout_activity_sid: nil,
|
|
80
|
+
prioritize_queue_order: nil)
|
|
81
|
+
@api_call
|
|
82
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
83
|
+
'/v1/Workspaces/{Sid}',
|
|
84
|
+
Server::DEFAULT4)
|
|
85
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
86
|
+
.is_required(true)
|
|
87
|
+
.should_encode(true))
|
|
88
|
+
.form_param(new_parameter(default_activity_sid, key: 'DefaultActivitySid'))
|
|
89
|
+
.form_param(new_parameter(event_callback_url, key: 'EventCallbackUrl'))
|
|
90
|
+
.form_param(new_parameter(events_filter, key: 'EventsFilter'))
|
|
91
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
92
|
+
.form_param(new_parameter(multi_task_enabled, key: 'MultiTaskEnabled'))
|
|
93
|
+
.form_param(new_parameter(timeout_activity_sid, key: 'TimeoutActivitySid'))
|
|
94
|
+
.form_param(new_parameter(prioritize_queue_order, key: 'PrioritizeQueueOrder'))
|
|
95
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
96
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
97
|
+
.auth(Single.new('accountSid_authToken')))
|
|
98
|
+
.response(new_response_handler
|
|
99
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
100
|
+
.deserialize_into(Workspace.method(:from_hash))
|
|
101
|
+
.is_api_response(true))
|
|
102
|
+
.execute
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# TODO: type endpoint description here
|
|
106
|
+
# @param [String] sid Required parameter: The SID of the Workspace resource
|
|
107
|
+
# to delete.
|
|
108
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
109
|
+
def delete_workspace(sid)
|
|
110
|
+
@api_call
|
|
111
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
112
|
+
'/v1/Workspaces/{Sid}',
|
|
113
|
+
Server::DEFAULT4)
|
|
114
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
115
|
+
.is_required(true)
|
|
116
|
+
.should_encode(true))
|
|
117
|
+
.auth(Single.new('accountSid_authToken')))
|
|
118
|
+
.response(new_response_handler
|
|
119
|
+
.is_response_void(true)
|
|
120
|
+
.is_api_response(true))
|
|
121
|
+
.execute
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# TODO: type endpoint description here
|
|
125
|
+
# @param [String] friendly_name Optional parameter: The `friendly_name` of
|
|
126
|
+
# the Workspace resources to read. For example `Customer Support` or `2014
|
|
127
|
+
# Election Campaign`.
|
|
128
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
129
|
+
# return in each list page. The default is 50, and the maximum is 1000.
|
|
130
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
131
|
+
# simply for client state.
|
|
132
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
133
|
+
# provided by the API.
|
|
134
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
135
|
+
def list_workspace(friendly_name: nil,
|
|
136
|
+
page_size: nil,
|
|
137
|
+
page: nil,
|
|
138
|
+
page_token: nil)
|
|
139
|
+
@api_call
|
|
140
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
141
|
+
'/v1/Workspaces',
|
|
142
|
+
Server::DEFAULT4)
|
|
143
|
+
.query_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
144
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
145
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
146
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
147
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
148
|
+
.auth(Single.new('accountSid_authToken')))
|
|
149
|
+
.response(new_response_handler
|
|
150
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
151
|
+
.deserialize_into(ListWorkspaceResponse.method(:from_hash))
|
|
152
|
+
.is_api_response(true))
|
|
153
|
+
.execute
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# TODO: type endpoint description here
|
|
157
|
+
# @param [String] friendly_name Required parameter: A descriptive string
|
|
158
|
+
# that you create to describe the Workspace resource. It can be up to 64
|
|
159
|
+
# characters long. For example: `Customer Support` or `2014 Election
|
|
160
|
+
# Campaign`.
|
|
161
|
+
# @param [String] event_callback_url Optional parameter: The URL we should
|
|
162
|
+
# call when an event occurs. If provided, the Workspace will publish events
|
|
163
|
+
# to this URL, for example, to collect data for reporting. See [Workspace
|
|
164
|
+
# Events](https://www.twilio.com/docs/taskrouter/api/event) for more
|
|
165
|
+
# information. This parameter supports Twilio's [Webhooks (HTTP callbacks)
|
|
166
|
+
# Connection
|
|
167
|
+
# Overrides](https://www.twilio.com/docs/usage/webhooks/webhooks-connection-
|
|
168
|
+
# overrides).
|
|
169
|
+
# @param [String] events_filter Optional parameter: The list of Workspace
|
|
170
|
+
# events for which to call event_callback_url. For example, if
|
|
171
|
+
# `EventsFilter=task.created, task.canceled, worker.activity.update`, then
|
|
172
|
+
# TaskRouter will call event_callback_url only when a task is created,
|
|
173
|
+
# canceled, or a Worker activity is updated.
|
|
174
|
+
# @param [TrueClass | FalseClass] multi_task_enabled Optional parameter:
|
|
175
|
+
# Whether to enable multi-tasking. Can be: `true` to enable multi-tasking,
|
|
176
|
+
# or `false` to disable it. However, all workspaces should be created as
|
|
177
|
+
# multi-tasking. The default is `true`. Multi-tasking allows Workers to
|
|
178
|
+
# handle multiple Tasks simultaneously. When enabled (`true`), each Worker
|
|
179
|
+
# can receive parallel reservations up to the per-channel maximums defined
|
|
180
|
+
# in the Workers section. In single-tasking mode (legacy mode), each Worker
|
|
181
|
+
# will only receive a new reservation when the previous task is completed.
|
|
182
|
+
# Learn more at
|
|
183
|
+
# [Multitasking](https://www.twilio.com/docs/taskrouter/multitasking).
|
|
184
|
+
# @param [String] template Optional parameter: An available template name.
|
|
185
|
+
# Can be: `NONE` or `FIFO` and the default is `NONE`. Pre-configures the
|
|
186
|
+
# Workspace with the Workflow and Activities specified in the template.
|
|
187
|
+
# `NONE` will create a Workspace with only a set of default activities.
|
|
188
|
+
# `FIFO` will configure TaskRouter with a set of default activities and a
|
|
189
|
+
# single TaskQueue for first-in, first-out distribution, which can be useful
|
|
190
|
+
# when you are getting started with TaskRouter.
|
|
191
|
+
# @param [WorkspaceQueueOrder] prioritize_queue_order Optional parameter:
|
|
192
|
+
# The type of TaskQueue to prioritize when Workers are receiving Tasks from
|
|
193
|
+
# both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is
|
|
194
|
+
# `FIFO`. For more information, see [Queue
|
|
195
|
+
# Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first
|
|
196
|
+
# -out-lifo).
|
|
197
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
198
|
+
def create_workspace(friendly_name,
|
|
199
|
+
event_callback_url: nil,
|
|
200
|
+
events_filter: nil,
|
|
201
|
+
multi_task_enabled: nil,
|
|
202
|
+
template: nil,
|
|
203
|
+
prioritize_queue_order: nil)
|
|
204
|
+
@api_call
|
|
205
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
206
|
+
'/v1/Workspaces',
|
|
207
|
+
Server::DEFAULT4)
|
|
208
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName')
|
|
209
|
+
.is_required(true))
|
|
210
|
+
.form_param(new_parameter(event_callback_url, key: 'EventCallbackUrl'))
|
|
211
|
+
.form_param(new_parameter(events_filter, key: 'EventsFilter'))
|
|
212
|
+
.form_param(new_parameter(multi_task_enabled, key: 'MultiTaskEnabled'))
|
|
213
|
+
.form_param(new_parameter(template, key: 'Template'))
|
|
214
|
+
.form_param(new_parameter(prioritize_queue_order, key: 'PrioritizeQueueOrder'))
|
|
215
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
216
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
217
|
+
.auth(Single.new('accountSid_authToken')))
|
|
218
|
+
.response(new_response_handler
|
|
219
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
220
|
+
.deserialize_into(Workspace.method(:from_hash))
|
|
221
|
+
.is_api_response(true))
|
|
222
|
+
.execute
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
# TaskrouterV1WorkspaceCumulativeStatisticsApi
|
|
8
|
+
class TaskrouterV1WorkspaceCumulativeStatisticsApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# to fetch.
|
|
12
|
+
# @param [DateTime] end_date Optional parameter: Only include usage that
|
|
13
|
+
# occurred on or before this date, specified in GMT as an [ISO
|
|
14
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
|
|
15
|
+
# @param [Integer] minutes Optional parameter: Only calculate statistics
|
|
16
|
+
# since this many minutes in the past. The default 15 minutes. This is
|
|
17
|
+
# helpful for displaying statistics for the last 15 minutes, 240 minutes (4
|
|
18
|
+
# hours), and 480 minutes (8 hours) to see trends.
|
|
19
|
+
# @param [DateTime] start_date Optional parameter: Only calculate statistics
|
|
20
|
+
# from this date and time and later, specified in [ISO
|
|
21
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
22
|
+
# @param [String] task_channel Optional parameter: Only calculate cumulative
|
|
23
|
+
# statistics on this TaskChannel. Can be the TaskChannel's SID or its
|
|
24
|
+
# `unique_name`, such as `voice`, `sms`, or `default`.
|
|
25
|
+
# @param [String] split_by_wait_time Optional parameter: A comma separated
|
|
26
|
+
# list of values that describes the thresholds, in seconds, to calculate
|
|
27
|
+
# statistics on. For each threshold specified, the number of Tasks canceled
|
|
28
|
+
# and reservations accepted above and below the specified thresholds in
|
|
29
|
+
# seconds are computed. For example, `5,30` would show splits of Tasks that
|
|
30
|
+
# were canceled or accepted before and after 5 seconds and before and after
|
|
31
|
+
# 30 seconds. This can be used to show short abandoned Tasks or Tasks that
|
|
32
|
+
# failed to meet an SLA. TaskRouter will calculate statistics on up to
|
|
33
|
+
# 10,000 Tasks for any given threshold.
|
|
34
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
35
|
+
def fetch_workspace_cumulative_statistics(workspace_sid,
|
|
36
|
+
end_date: nil,
|
|
37
|
+
minutes: nil,
|
|
38
|
+
start_date: nil,
|
|
39
|
+
task_channel: nil,
|
|
40
|
+
split_by_wait_time: nil)
|
|
41
|
+
@api_call
|
|
42
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
43
|
+
'/v1/Workspaces/{WorkspaceSid}/CumulativeStatistics',
|
|
44
|
+
Server::DEFAULT4)
|
|
45
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
46
|
+
.is_required(true)
|
|
47
|
+
.should_encode(true))
|
|
48
|
+
.query_param(new_parameter(end_date, key: 'EndDate'))
|
|
49
|
+
.query_param(new_parameter(minutes, key: 'Minutes'))
|
|
50
|
+
.query_param(new_parameter(start_date, key: 'StartDate'))
|
|
51
|
+
.query_param(new_parameter(task_channel, key: 'TaskChannel'))
|
|
52
|
+
.query_param(new_parameter(split_by_wait_time, key: 'SplitByWaitTime'))
|
|
53
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
54
|
+
.auth(Single.new('accountSid_authToken')))
|
|
55
|
+
.response(new_response_handler
|
|
56
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
57
|
+
.deserialize_into(WorkspaceCumulativeStatistics.method(:from_hash))
|
|
58
|
+
.is_api_response(true))
|
|
59
|
+
.execute
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
# TaskrouterV1WorkspaceRealTimeStatisticsApi
|
|
8
|
+
class TaskrouterV1WorkspaceRealTimeStatisticsApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# to fetch.
|
|
12
|
+
# @param [String] task_channel Optional parameter: Only calculate real-time
|
|
13
|
+
# statistics on this TaskChannel. Can be the TaskChannel's SID or its
|
|
14
|
+
# `unique_name`, such as `voice`, `sms`, or `default`.
|
|
15
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
16
|
+
def fetch_workspace_real_time_statistics(workspace_sid,
|
|
17
|
+
task_channel: nil)
|
|
18
|
+
@api_call
|
|
19
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
20
|
+
'/v1/Workspaces/{WorkspaceSid}/RealTimeStatistics',
|
|
21
|
+
Server::DEFAULT4)
|
|
22
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
23
|
+
.is_required(true)
|
|
24
|
+
.should_encode(true))
|
|
25
|
+
.query_param(new_parameter(task_channel, key: 'TaskChannel'))
|
|
26
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
27
|
+
.auth(Single.new('accountSid_authToken')))
|
|
28
|
+
.response(new_response_handler
|
|
29
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
30
|
+
.deserialize_into(WorkspaceRealTimeStatistics.method(:from_hash))
|
|
31
|
+
.is_api_response(true))
|
|
32
|
+
.execute
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
# TaskrouterV1WorkspaceStatisticsApi
|
|
8
|
+
class TaskrouterV1WorkspaceStatisticsApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# to fetch.
|
|
12
|
+
# @param [Integer] minutes Optional parameter: Only calculate statistics
|
|
13
|
+
# since this many minutes in the past. The default 15 minutes. This is
|
|
14
|
+
# helpful for displaying statistics for the last 15 minutes, 240 minutes (4
|
|
15
|
+
# hours), and 480 minutes (8 hours) to see trends.
|
|
16
|
+
# @param [DateTime] start_date Optional parameter: Only calculate statistics
|
|
17
|
+
# from this date and time and later, specified in [ISO
|
|
18
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
19
|
+
# @param [DateTime] end_date Optional parameter: Only calculate statistics
|
|
20
|
+
# from this date and time and earlier, specified in GMT as an [ISO
|
|
21
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
|
|
22
|
+
# @param [String] task_channel Optional parameter: Only calculate statistics
|
|
23
|
+
# on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`,
|
|
24
|
+
# such as `voice`, `sms`, or `default`.
|
|
25
|
+
# @param [String] split_by_wait_time Optional parameter: A comma separated
|
|
26
|
+
# list of values that describes the thresholds, in seconds, to calculate
|
|
27
|
+
# statistics on. For each threshold specified, the number of Tasks canceled
|
|
28
|
+
# and reservations accepted above and below the specified thresholds in
|
|
29
|
+
# seconds are computed. For example, `5,30` would show splits of Tasks that
|
|
30
|
+
# were canceled or accepted before and after 5 seconds and before and after
|
|
31
|
+
# 30 seconds. This can be used to show short abandoned Tasks or Tasks that
|
|
32
|
+
# failed to meet an SLA.
|
|
33
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
34
|
+
def fetch_workspace_statistics(workspace_sid,
|
|
35
|
+
minutes: nil,
|
|
36
|
+
start_date: nil,
|
|
37
|
+
end_date: nil,
|
|
38
|
+
task_channel: nil,
|
|
39
|
+
split_by_wait_time: nil)
|
|
40
|
+
@api_call
|
|
41
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
42
|
+
'/v1/Workspaces/{WorkspaceSid}/Statistics',
|
|
43
|
+
Server::DEFAULT4)
|
|
44
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
45
|
+
.is_required(true)
|
|
46
|
+
.should_encode(true))
|
|
47
|
+
.query_param(new_parameter(minutes, key: 'Minutes'))
|
|
48
|
+
.query_param(new_parameter(start_date, key: 'StartDate'))
|
|
49
|
+
.query_param(new_parameter(end_date, key: 'EndDate'))
|
|
50
|
+
.query_param(new_parameter(task_channel, key: 'TaskChannel'))
|
|
51
|
+
.query_param(new_parameter(split_by_wait_time, key: 'SplitByWaitTime'))
|
|
52
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
53
|
+
.auth(Single.new('accountSid_authToken')))
|
|
54
|
+
.response(new_response_handler
|
|
55
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
56
|
+
.deserialize_into(WorkspaceStatistics.method(:from_hash))
|
|
57
|
+
.is_api_response(true))
|
|
58
|
+
.execute
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,178 @@
|
|
|
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
|
+
# VerifyV2ServiceApi
|
|
8
|
+
class VerifyV2ServiceApi < BaseApi
|
|
9
|
+
# Create a new Verification Service.
|
|
10
|
+
# @param [String] friendly_name Required parameter: A descriptive string
|
|
11
|
+
# that you create to describe the verification service. It can be up to 32
|
|
12
|
+
# characters long. **This value should not contain PII.**
|
|
13
|
+
# @param [Integer] code_length Optional parameter: The length of the
|
|
14
|
+
# verification code to generate. Must be an integer value between 4 and 10,
|
|
15
|
+
# inclusive.
|
|
16
|
+
# @param [TrueClass | FalseClass] lookup_enabled Optional parameter: Whether
|
|
17
|
+
# to perform a lookup with each verification started and return info about
|
|
18
|
+
# the phone number.
|
|
19
|
+
# @param [TrueClass | FalseClass] skip_sms_to_landlines Optional parameter:
|
|
20
|
+
# Whether to skip sending SMS verifications to landlines. Requires
|
|
21
|
+
# `lookup_enabled`.
|
|
22
|
+
# @param [TrueClass | FalseClass] dtmf_input_required Optional parameter:
|
|
23
|
+
# Whether to ask the user to press a number before delivering the verify
|
|
24
|
+
# code in a phone call.
|
|
25
|
+
# @param [String] tts_name Optional parameter: The name of an alternative
|
|
26
|
+
# text-to-speech service to use in phone calls. Applies only to TTS
|
|
27
|
+
# languages.
|
|
28
|
+
# @param [TrueClass | FalseClass] psd2_enabled Optional parameter: Whether
|
|
29
|
+
# to pass PSD2 transaction parameters when starting a verification.
|
|
30
|
+
# @param [TrueClass | FalseClass] do_not_share_warning_enabled Optional
|
|
31
|
+
# parameter: Whether to add a security warning at the end of an SMS
|
|
32
|
+
# verification body. Disabled by default and applies only to SMS. Example
|
|
33
|
+
# SMS body: `Your AppName verification code is: 1234. Don’t share this code
|
|
34
|
+
# with anyone; our employees will never ask for the code`
|
|
35
|
+
# @param [TrueClass | FalseClass] custom_code_enabled Optional parameter:
|
|
36
|
+
# Whether to allow sending verifications with a custom code instead of a
|
|
37
|
+
# randomly generated one.
|
|
38
|
+
# @param [TrueClass | FalseClass] push_include_date Optional parameter:
|
|
39
|
+
# Optional configuration for the Push factors. If true, include the date in
|
|
40
|
+
# the Challenge's response. Otherwise, the date is omitted from the
|
|
41
|
+
# response. See
|
|
42
|
+
# [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s
|
|
43
|
+
# details parameter for more info. Default: false. **Deprecated** do not use
|
|
44
|
+
# this parameter. This timestamp value is the same one as the one found in
|
|
45
|
+
# `date_created`, please use that one instead.
|
|
46
|
+
# @param [String] push_apn_credential_sid Optional parameter: Optional
|
|
47
|
+
# configuration for the Push factors. Set the APN Credential for this
|
|
48
|
+
# service. This will allow to send push notifications to iOS devices. See
|
|
49
|
+
# [Credential
|
|
50
|
+
# Resource](https://www.twilio.com/docs/notify/api/credential-resource)
|
|
51
|
+
# @param [String] push_fcm_credential_sid Optional parameter: Optional
|
|
52
|
+
# configuration for the Push factors. Set the FCM Credential for this
|
|
53
|
+
# service. This will allow to send push notifications to Android devices.
|
|
54
|
+
# See [Credential
|
|
55
|
+
# Resource](https://www.twilio.com/docs/notify/api/credential-resource)
|
|
56
|
+
# @param [String] totp_issuer Optional parameter: Optional configuration for
|
|
57
|
+
# the TOTP factors. Set TOTP Issuer for this service. This will allow to
|
|
58
|
+
# configure the issuer of the TOTP URI. Defaults to the service friendly
|
|
59
|
+
# name if not provided.
|
|
60
|
+
# @param [Integer] totp_time_step Optional parameter: Optional configuration
|
|
61
|
+
# for the TOTP factors. Defines how often, in seconds, are TOTP codes
|
|
62
|
+
# generated. i.e, a new TOTP code is generated every time_step seconds. Must
|
|
63
|
+
# be between 20 and 60 seconds, inclusive. Defaults to 30 seconds
|
|
64
|
+
# @param [Integer] totp_code_length Optional parameter: Optional
|
|
65
|
+
# configuration for the TOTP factors. Number of digits for generated TOTP
|
|
66
|
+
# codes. Must be between 3 and 8, inclusive. Defaults to 6
|
|
67
|
+
# @param [Integer] totp_skew Optional parameter: Optional configuration for
|
|
68
|
+
# the TOTP factors. The number of time-steps, past and future, that are
|
|
69
|
+
# valid for validation of TOTP codes. Must be between 0 and 2, inclusive.
|
|
70
|
+
# Defaults to 1
|
|
71
|
+
# @param [String] default_template_sid Optional parameter: The default
|
|
72
|
+
# message [template](https://www.twilio.com/docs/verify/api/templates). Will
|
|
73
|
+
# be used for all SMS verifications unless explicitly overriden. SMS channel
|
|
74
|
+
# only.
|
|
75
|
+
# @param [String] whatsapp_msg_service_sid Optional parameter: The SID of
|
|
76
|
+
# the Messaging Service containing WhatsApp Sender(s) that Verify will use
|
|
77
|
+
# to send WhatsApp messages to your users.
|
|
78
|
+
# @param [String] whatsapp_from Optional parameter: The number to use as the
|
|
79
|
+
# WhatsApp Sender that Verify will use to send WhatsApp messages to your
|
|
80
|
+
# users.This WhatsApp Sender must be associated with a Messaging Service
|
|
81
|
+
# SID.
|
|
82
|
+
# @param [String] passkeys_relying_party_id Optional parameter: The Relying
|
|
83
|
+
# Party ID for Passkeys. This is the domain of your application, e.g.
|
|
84
|
+
# `example.com`. It is used to identify your application when creating
|
|
85
|
+
# Passkeys.
|
|
86
|
+
# @param [String] passkeys_relying_party_name Optional parameter: The
|
|
87
|
+
# Relying Party Name for Passkeys. This is the name of your application,
|
|
88
|
+
# e.g. `Example App`. It is used to identify your application when creating
|
|
89
|
+
# Passkeys.
|
|
90
|
+
# @param [String] passkeys_relying_party_origins Optional parameter: The
|
|
91
|
+
# Relying Party Origins for Passkeys. This is the origin of your
|
|
92
|
+
# application, e.g. `login.example.com,www.example.com`. It is used to
|
|
93
|
+
# identify your application when creating Passkeys, it can have multiple
|
|
94
|
+
# origins split by `,`.
|
|
95
|
+
# @param [String] passkeys_authenticator_attachment Optional parameter: The
|
|
96
|
+
# Authenticator Attachment for Passkeys. This is the type of authenticator
|
|
97
|
+
# that will be used to create Passkeys. It can be empty or it can have the
|
|
98
|
+
# values `platform`, `cross-platform` or `any`.
|
|
99
|
+
# @param [String] passkeys_discoverable_credentials Optional parameter:
|
|
100
|
+
# Indicates whether credentials must be discoverable by the authenticator.
|
|
101
|
+
# It can be empty or it can have the values `required`, `preferred` or
|
|
102
|
+
# `discouraged`.
|
|
103
|
+
# @param [String] passkeys_user_verification Optional parameter: The User
|
|
104
|
+
# Verification for Passkeys. This is the type of user verification that will
|
|
105
|
+
# be used to create Passkeys. It can be empty or it can have the values
|
|
106
|
+
# `required`, `preferred` or `discouraged`.
|
|
107
|
+
# @param [TrueClass | FalseClass] verify_event_subscription_enabled Optional
|
|
108
|
+
# parameter: Whether to allow verifications from the service to reach the
|
|
109
|
+
# stream-events sinks if configured
|
|
110
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
111
|
+
def create_service(friendly_name,
|
|
112
|
+
code_length: nil,
|
|
113
|
+
lookup_enabled: nil,
|
|
114
|
+
skip_sms_to_landlines: nil,
|
|
115
|
+
dtmf_input_required: nil,
|
|
116
|
+
tts_name: nil,
|
|
117
|
+
psd2_enabled: nil,
|
|
118
|
+
do_not_share_warning_enabled: nil,
|
|
119
|
+
custom_code_enabled: nil,
|
|
120
|
+
push_include_date: nil,
|
|
121
|
+
push_apn_credential_sid: nil,
|
|
122
|
+
push_fcm_credential_sid: nil,
|
|
123
|
+
totp_issuer: nil,
|
|
124
|
+
totp_time_step: nil,
|
|
125
|
+
totp_code_length: nil,
|
|
126
|
+
totp_skew: nil,
|
|
127
|
+
default_template_sid: nil,
|
|
128
|
+
whatsapp_msg_service_sid: nil,
|
|
129
|
+
whatsapp_from: nil,
|
|
130
|
+
passkeys_relying_party_id: nil,
|
|
131
|
+
passkeys_relying_party_name: nil,
|
|
132
|
+
passkeys_relying_party_origins: nil,
|
|
133
|
+
passkeys_authenticator_attachment: nil,
|
|
134
|
+
passkeys_discoverable_credentials: nil,
|
|
135
|
+
passkeys_user_verification: nil,
|
|
136
|
+
verify_event_subscription_enabled: nil)
|
|
137
|
+
@api_call
|
|
138
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
139
|
+
'/v2/Services',
|
|
140
|
+
Server::DEFAULT5)
|
|
141
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName')
|
|
142
|
+
.is_required(true))
|
|
143
|
+
.form_param(new_parameter(code_length, key: 'CodeLength'))
|
|
144
|
+
.form_param(new_parameter(lookup_enabled, key: 'LookupEnabled'))
|
|
145
|
+
.form_param(new_parameter(skip_sms_to_landlines, key: 'SkipSmsToLandlines'))
|
|
146
|
+
.form_param(new_parameter(dtmf_input_required, key: 'DtmfInputRequired'))
|
|
147
|
+
.form_param(new_parameter(tts_name, key: 'TtsName'))
|
|
148
|
+
.form_param(new_parameter(psd2_enabled, key: 'Psd2Enabled'))
|
|
149
|
+
.form_param(new_parameter(do_not_share_warning_enabled, key: 'DoNotShareWarningEnabled'))
|
|
150
|
+
.form_param(new_parameter(custom_code_enabled, key: 'CustomCodeEnabled'))
|
|
151
|
+
.form_param(new_parameter(push_include_date, key: 'Push.IncludeDate'))
|
|
152
|
+
.form_param(new_parameter(push_apn_credential_sid, key: 'Push.ApnCredentialSid'))
|
|
153
|
+
.form_param(new_parameter(push_fcm_credential_sid, key: 'Push.FcmCredentialSid'))
|
|
154
|
+
.form_param(new_parameter(totp_issuer, key: 'Totp.Issuer'))
|
|
155
|
+
.form_param(new_parameter(totp_time_step, key: 'Totp.TimeStep'))
|
|
156
|
+
.form_param(new_parameter(totp_code_length, key: 'Totp.CodeLength'))
|
|
157
|
+
.form_param(new_parameter(totp_skew, key: 'Totp.Skew'))
|
|
158
|
+
.form_param(new_parameter(default_template_sid, key: 'DefaultTemplateSid'))
|
|
159
|
+
.form_param(new_parameter(whatsapp_msg_service_sid, key: 'Whatsapp.MsgServiceSid'))
|
|
160
|
+
.form_param(new_parameter(whatsapp_from, key: 'Whatsapp.From'))
|
|
161
|
+
.form_param(new_parameter(passkeys_relying_party_id, key: 'Passkeys.RelyingParty.Id'))
|
|
162
|
+
.form_param(new_parameter(passkeys_relying_party_name, key: 'Passkeys.RelyingParty.Name'))
|
|
163
|
+
.form_param(new_parameter(passkeys_relying_party_origins, key: 'Passkeys.RelyingParty.Origins'))
|
|
164
|
+
.form_param(new_parameter(passkeys_authenticator_attachment, key: 'Passkeys.AuthenticatorAttachment'))
|
|
165
|
+
.form_param(new_parameter(passkeys_discoverable_credentials, key: 'Passkeys.DiscoverableCredentials'))
|
|
166
|
+
.form_param(new_parameter(passkeys_user_verification, key: 'Passkeys.UserVerification'))
|
|
167
|
+
.form_param(new_parameter(verify_event_subscription_enabled, key: 'VerifyEventSubscriptionEnabled'))
|
|
168
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
169
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
170
|
+
.auth(Single.new('accountSid_authToken')))
|
|
171
|
+
.response(new_response_handler
|
|
172
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
173
|
+
.deserialize_into(Service2.method(:from_hash))
|
|
174
|
+
.is_api_response(true))
|
|
175
|
+
.execute
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
end
|