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,262 @@
|
|
|
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
|
+
# NotifyV1ServiceApi
|
|
8
|
+
class NotifyV1ServiceApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] friendly_name Optional parameter: A descriptive string
|
|
11
|
+
# that you create to describe the resource. It can be up to 64 characters
|
|
12
|
+
# long.
|
|
13
|
+
# @param [String] apn_credential_sid Optional parameter: The SID of the
|
|
14
|
+
# [Credential](https://www.twilio.com/docs/notify/api/credential-resource)
|
|
15
|
+
# to use for APN Bindings.
|
|
16
|
+
# @param [String] gcm_credential_sid Optional parameter: The SID of the
|
|
17
|
+
# [Credential](https://www.twilio.com/docs/notify/api/credential-resource)
|
|
18
|
+
# to use for GCM Bindings.
|
|
19
|
+
# @param [String] messaging_service_sid Optional parameter: The SID of the
|
|
20
|
+
# [Messaging
|
|
21
|
+
# Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to
|
|
22
|
+
# use for SMS Bindings. This parameter must be set in order to send SMS
|
|
23
|
+
# notifications.
|
|
24
|
+
# @param [String] facebook_messenger_page_id Optional parameter:
|
|
25
|
+
# Deprecated.
|
|
26
|
+
# @param [String] default_apn_notification_protocol_version Optional
|
|
27
|
+
# parameter: The protocol version to use for sending APNS notifications. Can
|
|
28
|
+
# be overridden on a Binding by Binding basis when creating a
|
|
29
|
+
# [Binding](https://www.twilio.com/docs/notify/api/binding-resource)
|
|
30
|
+
# resource.
|
|
31
|
+
# @param [String] default_gcm_notification_protocol_version Optional
|
|
32
|
+
# parameter: The protocol version to use for sending GCM notifications. Can
|
|
33
|
+
# be overridden on a Binding by Binding basis when creating a
|
|
34
|
+
# [Binding](https://www.twilio.com/docs/notify/api/binding-resource)
|
|
35
|
+
# resource.
|
|
36
|
+
# @param [String] fcm_credential_sid Optional parameter: The SID of the
|
|
37
|
+
# [Credential](https://www.twilio.com/docs/notify/api/credential-resource)
|
|
38
|
+
# to use for FCM Bindings.
|
|
39
|
+
# @param [String] default_fcm_notification_protocol_version Optional
|
|
40
|
+
# parameter: The protocol version to use for sending FCM notifications. Can
|
|
41
|
+
# be overridden on a Binding by Binding basis when creating a
|
|
42
|
+
# [Binding](https://www.twilio.com/docs/notify/api/binding-resource)
|
|
43
|
+
# resource.
|
|
44
|
+
# @param [TrueClass | FalseClass] log_enabled Optional parameter: Whether to
|
|
45
|
+
# log notifications. Can be: `true` or `false` and the default is `true`.
|
|
46
|
+
# @param [String] alexa_skill_id Optional parameter: Deprecated.
|
|
47
|
+
# @param [String] default_alexa_notification_protocol_version Optional
|
|
48
|
+
# parameter: Deprecated.
|
|
49
|
+
# @param [String] delivery_callback_url Optional parameter: URL to send
|
|
50
|
+
# delivery status callback.
|
|
51
|
+
# @param [TrueClass | FalseClass] delivery_callback_enabled Optional
|
|
52
|
+
# parameter: Callback configuration that enables delivery callbacks, default
|
|
53
|
+
# false
|
|
54
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
55
|
+
def create_service(friendly_name: nil,
|
|
56
|
+
apn_credential_sid: nil,
|
|
57
|
+
gcm_credential_sid: nil,
|
|
58
|
+
messaging_service_sid: nil,
|
|
59
|
+
facebook_messenger_page_id: nil,
|
|
60
|
+
default_apn_notification_protocol_version: nil,
|
|
61
|
+
default_gcm_notification_protocol_version: nil,
|
|
62
|
+
fcm_credential_sid: nil,
|
|
63
|
+
default_fcm_notification_protocol_version: nil,
|
|
64
|
+
log_enabled: nil,
|
|
65
|
+
alexa_skill_id: nil,
|
|
66
|
+
default_alexa_notification_protocol_version: nil,
|
|
67
|
+
delivery_callback_url: nil,
|
|
68
|
+
delivery_callback_enabled: nil)
|
|
69
|
+
@api_call
|
|
70
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
71
|
+
'/v1/Services',
|
|
72
|
+
Server::DEFAULT3)
|
|
73
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
74
|
+
.form_param(new_parameter(apn_credential_sid, key: 'ApnCredentialSid'))
|
|
75
|
+
.form_param(new_parameter(gcm_credential_sid, key: 'GcmCredentialSid'))
|
|
76
|
+
.form_param(new_parameter(messaging_service_sid, key: 'MessagingServiceSid'))
|
|
77
|
+
.form_param(new_parameter(facebook_messenger_page_id, key: 'FacebookMessengerPageId'))
|
|
78
|
+
.form_param(new_parameter(default_apn_notification_protocol_version, key: 'DefaultApnNotificationProtocolVersion'))
|
|
79
|
+
.form_param(new_parameter(default_gcm_notification_protocol_version, key: 'DefaultGcmNotificationProtocolVersion'))
|
|
80
|
+
.form_param(new_parameter(fcm_credential_sid, key: 'FcmCredentialSid'))
|
|
81
|
+
.form_param(new_parameter(default_fcm_notification_protocol_version, key: 'DefaultFcmNotificationProtocolVersion'))
|
|
82
|
+
.form_param(new_parameter(log_enabled, key: 'LogEnabled'))
|
|
83
|
+
.form_param(new_parameter(alexa_skill_id, key: 'AlexaSkillId'))
|
|
84
|
+
.form_param(new_parameter(default_alexa_notification_protocol_version, key: 'DefaultAlexaNotificationProtocolVersion'))
|
|
85
|
+
.form_param(new_parameter(delivery_callback_url, key: 'DeliveryCallbackUrl'))
|
|
86
|
+
.form_param(new_parameter(delivery_callback_enabled, key: 'DeliveryCallbackEnabled'))
|
|
87
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
88
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
89
|
+
.auth(Single.new('accountSid_authToken')))
|
|
90
|
+
.response(new_response_handler
|
|
91
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
92
|
+
.deserialize_into(Service1.method(:from_hash))
|
|
93
|
+
.is_api_response(true))
|
|
94
|
+
.execute
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# TODO: type endpoint description here
|
|
98
|
+
# @param [String] friendly_name Optional parameter: The string that
|
|
99
|
+
# identifies the Service resources to read.
|
|
100
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
101
|
+
# return in each list page. The default is 50, and the maximum is 1000.
|
|
102
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
103
|
+
# simply for client state.
|
|
104
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
105
|
+
# provided by the API.
|
|
106
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
107
|
+
def list_service(friendly_name: nil,
|
|
108
|
+
page_size: nil,
|
|
109
|
+
page: nil,
|
|
110
|
+
page_token: nil)
|
|
111
|
+
@api_call
|
|
112
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
113
|
+
'/v1/Services',
|
|
114
|
+
Server::DEFAULT3)
|
|
115
|
+
.query_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
116
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
117
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
118
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
119
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
120
|
+
.auth(Single.new('accountSid_authToken')))
|
|
121
|
+
.response(new_response_handler
|
|
122
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
123
|
+
.deserialize_into(ListServiceResponse.method(:from_hash))
|
|
124
|
+
.is_api_response(true))
|
|
125
|
+
.execute
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# TODO: type endpoint description here
|
|
129
|
+
# @param [String] sid Required parameter: The Twilio-provided string that
|
|
130
|
+
# uniquely identifies the Service resource to delete.
|
|
131
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
132
|
+
def delete_service(sid)
|
|
133
|
+
@api_call
|
|
134
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
135
|
+
'/v1/Services/{Sid}',
|
|
136
|
+
Server::DEFAULT3)
|
|
137
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
138
|
+
.is_required(true)
|
|
139
|
+
.should_encode(true))
|
|
140
|
+
.auth(Single.new('accountSid_authToken')))
|
|
141
|
+
.response(new_response_handler
|
|
142
|
+
.is_response_void(true)
|
|
143
|
+
.is_api_response(true))
|
|
144
|
+
.execute
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# TODO: type endpoint description here
|
|
148
|
+
# @param [String] sid Required parameter: The Twilio-provided string that
|
|
149
|
+
# uniquely identifies the Service resource to fetch.
|
|
150
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
151
|
+
def fetch_service(sid)
|
|
152
|
+
@api_call
|
|
153
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
154
|
+
'/v1/Services/{Sid}',
|
|
155
|
+
Server::DEFAULT3)
|
|
156
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
157
|
+
.is_required(true)
|
|
158
|
+
.should_encode(true))
|
|
159
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
160
|
+
.auth(Single.new('accountSid_authToken')))
|
|
161
|
+
.response(new_response_handler
|
|
162
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
163
|
+
.deserialize_into(Service1.method(:from_hash))
|
|
164
|
+
.is_api_response(true))
|
|
165
|
+
.execute
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# TODO: type endpoint description here
|
|
169
|
+
# @param [String] sid Required parameter: The Twilio-provided string that
|
|
170
|
+
# uniquely identifies the Service resource to update.
|
|
171
|
+
# @param [String] friendly_name Optional parameter: A descriptive string
|
|
172
|
+
# that you create to describe the resource. It can be up to 64 characters
|
|
173
|
+
# long.
|
|
174
|
+
# @param [String] apn_credential_sid Optional parameter: The SID of the
|
|
175
|
+
# [Credential](https://www.twilio.com/docs/notify/api/credential-resource)
|
|
176
|
+
# to use for APN Bindings.
|
|
177
|
+
# @param [String] gcm_credential_sid Optional parameter: The SID of the
|
|
178
|
+
# [Credential](https://www.twilio.com/docs/notify/api/credential-resource)
|
|
179
|
+
# to use for GCM Bindings.
|
|
180
|
+
# @param [String] messaging_service_sid Optional parameter: The SID of the
|
|
181
|
+
# [Messaging
|
|
182
|
+
# Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to
|
|
183
|
+
# use for SMS Bindings. This parameter must be set in order to send SMS
|
|
184
|
+
# notifications.
|
|
185
|
+
# @param [String] facebook_messenger_page_id Optional parameter:
|
|
186
|
+
# Deprecated.
|
|
187
|
+
# @param [String] default_apn_notification_protocol_version Optional
|
|
188
|
+
# parameter: The protocol version to use for sending APNS notifications. Can
|
|
189
|
+
# be overridden on a Binding by Binding basis when creating a
|
|
190
|
+
# [Binding](https://www.twilio.com/docs/notify/api/binding-resource)
|
|
191
|
+
# resource.
|
|
192
|
+
# @param [String] default_gcm_notification_protocol_version Optional
|
|
193
|
+
# parameter: The protocol version to use for sending GCM notifications. Can
|
|
194
|
+
# be overridden on a Binding by Binding basis when creating a
|
|
195
|
+
# [Binding](https://www.twilio.com/docs/notify/api/binding-resource)
|
|
196
|
+
# resource.
|
|
197
|
+
# @param [String] fcm_credential_sid Optional parameter: The SID of the
|
|
198
|
+
# [Credential](https://www.twilio.com/docs/notify/api/credential-resource)
|
|
199
|
+
# to use for FCM Bindings.
|
|
200
|
+
# @param [String] default_fcm_notification_protocol_version Optional
|
|
201
|
+
# parameter: The protocol version to use for sending FCM notifications. Can
|
|
202
|
+
# be overridden on a Binding by Binding basis when creating a
|
|
203
|
+
# [Binding](https://www.twilio.com/docs/notify/api/binding-resource)
|
|
204
|
+
# resource.
|
|
205
|
+
# @param [TrueClass | FalseClass] log_enabled Optional parameter: Whether to
|
|
206
|
+
# log notifications. Can be: `true` or `false` and the default is `true`.
|
|
207
|
+
# @param [String] alexa_skill_id Optional parameter: Deprecated.
|
|
208
|
+
# @param [String] default_alexa_notification_protocol_version Optional
|
|
209
|
+
# parameter: Deprecated.
|
|
210
|
+
# @param [String] delivery_callback_url Optional parameter: URL to send
|
|
211
|
+
# delivery status callback.
|
|
212
|
+
# @param [TrueClass | FalseClass] delivery_callback_enabled Optional
|
|
213
|
+
# parameter: Callback configuration that enables delivery callbacks, default
|
|
214
|
+
# false
|
|
215
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
216
|
+
def update_service(sid,
|
|
217
|
+
friendly_name: nil,
|
|
218
|
+
apn_credential_sid: nil,
|
|
219
|
+
gcm_credential_sid: nil,
|
|
220
|
+
messaging_service_sid: nil,
|
|
221
|
+
facebook_messenger_page_id: nil,
|
|
222
|
+
default_apn_notification_protocol_version: nil,
|
|
223
|
+
default_gcm_notification_protocol_version: nil,
|
|
224
|
+
fcm_credential_sid: nil,
|
|
225
|
+
default_fcm_notification_protocol_version: nil,
|
|
226
|
+
log_enabled: nil,
|
|
227
|
+
alexa_skill_id: nil,
|
|
228
|
+
default_alexa_notification_protocol_version: nil,
|
|
229
|
+
delivery_callback_url: nil,
|
|
230
|
+
delivery_callback_enabled: nil)
|
|
231
|
+
@api_call
|
|
232
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
233
|
+
'/v1/Services/{Sid}',
|
|
234
|
+
Server::DEFAULT3)
|
|
235
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
236
|
+
.is_required(true)
|
|
237
|
+
.should_encode(true))
|
|
238
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
239
|
+
.form_param(new_parameter(apn_credential_sid, key: 'ApnCredentialSid'))
|
|
240
|
+
.form_param(new_parameter(gcm_credential_sid, key: 'GcmCredentialSid'))
|
|
241
|
+
.form_param(new_parameter(messaging_service_sid, key: 'MessagingServiceSid'))
|
|
242
|
+
.form_param(new_parameter(facebook_messenger_page_id, key: 'FacebookMessengerPageId'))
|
|
243
|
+
.form_param(new_parameter(default_apn_notification_protocol_version, key: 'DefaultApnNotificationProtocolVersion'))
|
|
244
|
+
.form_param(new_parameter(default_gcm_notification_protocol_version, key: 'DefaultGcmNotificationProtocolVersion'))
|
|
245
|
+
.form_param(new_parameter(fcm_credential_sid, key: 'FcmCredentialSid'))
|
|
246
|
+
.form_param(new_parameter(default_fcm_notification_protocol_version, key: 'DefaultFcmNotificationProtocolVersion'))
|
|
247
|
+
.form_param(new_parameter(log_enabled, key: 'LogEnabled'))
|
|
248
|
+
.form_param(new_parameter(alexa_skill_id, key: 'AlexaSkillId'))
|
|
249
|
+
.form_param(new_parameter(default_alexa_notification_protocol_version, key: 'DefaultAlexaNotificationProtocolVersion'))
|
|
250
|
+
.form_param(new_parameter(delivery_callback_url, key: 'DeliveryCallbackUrl'))
|
|
251
|
+
.form_param(new_parameter(delivery_callback_enabled, key: 'DeliveryCallbackEnabled'))
|
|
252
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
253
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
254
|
+
.auth(Single.new('accountSid_authToken')))
|
|
255
|
+
.response(new_response_handler
|
|
256
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
257
|
+
.deserialize_into(Service1.method(:from_hash))
|
|
258
|
+
.is_api_response(true))
|
|
259
|
+
.execute
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
end
|
|
@@ -0,0 +1,177 @@
|
|
|
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
|
+
# TaskrouterV1ActivityApi
|
|
8
|
+
class TaskrouterV1ActivityApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# with the Activity resources to fetch.
|
|
12
|
+
# @param [String] sid Required parameter: The SID of the Activity resource
|
|
13
|
+
# to fetch.
|
|
14
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
15
|
+
def fetch_activity(workspace_sid,
|
|
16
|
+
sid)
|
|
17
|
+
@api_call
|
|
18
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
19
|
+
'/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}',
|
|
20
|
+
Server::DEFAULT4)
|
|
21
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
22
|
+
.is_required(true)
|
|
23
|
+
.should_encode(true))
|
|
24
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
25
|
+
.is_required(true)
|
|
26
|
+
.should_encode(true))
|
|
27
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
28
|
+
.auth(Single.new('accountSid_authToken')))
|
|
29
|
+
.response(new_response_handler
|
|
30
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
31
|
+
.deserialize_into(Activity.method(:from_hash))
|
|
32
|
+
.is_api_response(true))
|
|
33
|
+
.execute
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# TODO: type endpoint description here
|
|
37
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
38
|
+
# with the Activity resources to update.
|
|
39
|
+
# @param [String] sid Required parameter: The SID of the Activity resource
|
|
40
|
+
# to update.
|
|
41
|
+
# @param [String] friendly_name Optional parameter: A descriptive string
|
|
42
|
+
# that you create to describe the Activity resource. It can be up to 64
|
|
43
|
+
# characters long. These names are used to calculate and expose statistics
|
|
44
|
+
# about Workers, and provide visibility into the state of each Worker.
|
|
45
|
+
# Examples of friendly names include: `on-call`, `break`, and `email`.
|
|
46
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
47
|
+
def update_activity(workspace_sid,
|
|
48
|
+
sid,
|
|
49
|
+
friendly_name: nil)
|
|
50
|
+
@api_call
|
|
51
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
52
|
+
'/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}',
|
|
53
|
+
Server::DEFAULT4)
|
|
54
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
55
|
+
.is_required(true)
|
|
56
|
+
.should_encode(true))
|
|
57
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
58
|
+
.is_required(true)
|
|
59
|
+
.should_encode(true))
|
|
60
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
61
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
62
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
63
|
+
.auth(Single.new('accountSid_authToken')))
|
|
64
|
+
.response(new_response_handler
|
|
65
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
66
|
+
.deserialize_into(Activity.method(:from_hash))
|
|
67
|
+
.is_api_response(true))
|
|
68
|
+
.execute
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# TODO: type endpoint description here
|
|
72
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
73
|
+
# with the Activity resources to delete.
|
|
74
|
+
# @param [String] sid Required parameter: The SID of the Activity resource
|
|
75
|
+
# to delete.
|
|
76
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
77
|
+
def delete_activity(workspace_sid,
|
|
78
|
+
sid)
|
|
79
|
+
@api_call
|
|
80
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
81
|
+
'/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}',
|
|
82
|
+
Server::DEFAULT4)
|
|
83
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
84
|
+
.is_required(true)
|
|
85
|
+
.should_encode(true))
|
|
86
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
87
|
+
.is_required(true)
|
|
88
|
+
.should_encode(true))
|
|
89
|
+
.auth(Single.new('accountSid_authToken')))
|
|
90
|
+
.response(new_response_handler
|
|
91
|
+
.is_response_void(true)
|
|
92
|
+
.is_api_response(true))
|
|
93
|
+
.execute
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# TODO: type endpoint description here
|
|
97
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
98
|
+
# with the Activity resources to read.
|
|
99
|
+
# @param [String] friendly_name Optional parameter: The `friendly_name` of
|
|
100
|
+
# the Activity resources to read.
|
|
101
|
+
# @param [String] available Optional parameter: Whether return only Activity
|
|
102
|
+
# resources that are available or unavailable. A value of `true` returns
|
|
103
|
+
# only available activities. Values of '1' or `yes` also indicate `true`.
|
|
104
|
+
# All other values represent `false` and return activities that are
|
|
105
|
+
# unavailable.
|
|
106
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
107
|
+
# return in each list page. The default is 50, and the maximum is 1000.
|
|
108
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
109
|
+
# simply for client state.
|
|
110
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
111
|
+
# provided by the API.
|
|
112
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
113
|
+
def list_activity(workspace_sid,
|
|
114
|
+
friendly_name: nil,
|
|
115
|
+
available: nil,
|
|
116
|
+
page_size: nil,
|
|
117
|
+
page: nil,
|
|
118
|
+
page_token: nil)
|
|
119
|
+
@api_call
|
|
120
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
121
|
+
'/v1/Workspaces/{WorkspaceSid}/Activities',
|
|
122
|
+
Server::DEFAULT4)
|
|
123
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
124
|
+
.is_required(true)
|
|
125
|
+
.should_encode(true))
|
|
126
|
+
.query_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
127
|
+
.query_param(new_parameter(available, key: 'Available'))
|
|
128
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
129
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
130
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
131
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
132
|
+
.auth(Single.new('accountSid_authToken')))
|
|
133
|
+
.response(new_response_handler
|
|
134
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
135
|
+
.deserialize_into(ListActivityResponse.method(:from_hash))
|
|
136
|
+
.is_api_response(true))
|
|
137
|
+
.execute
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# TODO: type endpoint description here
|
|
141
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
142
|
+
# that the new Activity belongs to.
|
|
143
|
+
# @param [String] friendly_name Required parameter: A descriptive string
|
|
144
|
+
# that you create to describe the Activity resource. It can be up to 64
|
|
145
|
+
# characters long. These names are used to calculate and expose statistics
|
|
146
|
+
# about Workers, and provide visibility into the state of each Worker.
|
|
147
|
+
# Examples of friendly names include: `on-call`, `break`, and `email`.
|
|
148
|
+
# @param [TrueClass | FalseClass] available Optional parameter: Whether the
|
|
149
|
+
# Worker should be eligible to receive a Task when it occupies the Activity.
|
|
150
|
+
# A value of `true`, `1`, or `yes` specifies the Activity is available. All
|
|
151
|
+
# other values specify that it is not. The value cannot be changed after the
|
|
152
|
+
# Activity is created.
|
|
153
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
154
|
+
def create_activity(workspace_sid,
|
|
155
|
+
friendly_name,
|
|
156
|
+
available: nil)
|
|
157
|
+
@api_call
|
|
158
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
159
|
+
'/v1/Workspaces/{WorkspaceSid}/Activities',
|
|
160
|
+
Server::DEFAULT4)
|
|
161
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
162
|
+
.is_required(true)
|
|
163
|
+
.should_encode(true))
|
|
164
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName')
|
|
165
|
+
.is_required(true))
|
|
166
|
+
.form_param(new_parameter(available, key: 'Available'))
|
|
167
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
168
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
169
|
+
.auth(Single.new('accountSid_authToken')))
|
|
170
|
+
.response(new_response_handler
|
|
171
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
172
|
+
.deserialize_into(Activity.method(:from_hash))
|
|
173
|
+
.is_api_response(true))
|
|
174
|
+
.execute
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
end
|
|
@@ -0,0 +1,125 @@
|
|
|
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
|
+
# TaskrouterV1EventApi
|
|
8
|
+
class TaskrouterV1EventApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
11
|
+
# with the Event to fetch.
|
|
12
|
+
# @param [String] sid Required parameter: The SID of the Event resource to
|
|
13
|
+
# fetch.
|
|
14
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
15
|
+
def fetch_event(workspace_sid,
|
|
16
|
+
sid)
|
|
17
|
+
@api_call
|
|
18
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
19
|
+
'/v1/Workspaces/{WorkspaceSid}/Events/{Sid}',
|
|
20
|
+
Server::DEFAULT4)
|
|
21
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
22
|
+
.is_required(true)
|
|
23
|
+
.should_encode(true))
|
|
24
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
25
|
+
.is_required(true)
|
|
26
|
+
.should_encode(true))
|
|
27
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
28
|
+
.auth(Single.new('accountSid_authToken')))
|
|
29
|
+
.response(new_response_handler
|
|
30
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
31
|
+
.deserialize_into(Event.method(:from_hash))
|
|
32
|
+
.is_api_response(true))
|
|
33
|
+
.execute
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# TODO: type endpoint description here
|
|
37
|
+
# @param [String] workspace_sid Required parameter: The SID of the Workspace
|
|
38
|
+
# with the Events to read. Returns only the Events that pertain to the
|
|
39
|
+
# specified Workspace.
|
|
40
|
+
# @param [DateTime] end_date Optional parameter: Only include Events that
|
|
41
|
+
# occurred on or before this date, specified in GMT as an [ISO
|
|
42
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
|
|
43
|
+
# @param [String] event_type Optional parameter: The type of Events to read.
|
|
44
|
+
# Returns only Events of the type specified.
|
|
45
|
+
# @param [Integer] minutes Optional parameter: The period of events to read
|
|
46
|
+
# in minutes. Returns only Events that occurred since this many minutes in
|
|
47
|
+
# the past. The default is `15` minutes. Task Attributes for Events occuring
|
|
48
|
+
# more 43,200 minutes ago will be redacted.
|
|
49
|
+
# @param [String] reservation_sid Optional parameter: The SID of the
|
|
50
|
+
# Reservation with the Events to read. Returns only Events that pertain to
|
|
51
|
+
# the specified Reservation.
|
|
52
|
+
# @param [DateTime] start_date Optional parameter: Only include Events from
|
|
53
|
+
# on or after this date and time, specified in [ISO
|
|
54
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for
|
|
55
|
+
# Events older than 30 days will be redacted.
|
|
56
|
+
# @param [String] task_queue_sid Optional parameter: The SID of the
|
|
57
|
+
# TaskQueue with the Events to read. Returns only the Events that pertain to
|
|
58
|
+
# the specified TaskQueue.
|
|
59
|
+
# @param [String] task_sid Optional parameter: The SID of the Task with the
|
|
60
|
+
# Events to read. Returns only the Events that pertain to the specified
|
|
61
|
+
# Task.
|
|
62
|
+
# @param [String] worker_sid Optional parameter: The SID of the Worker with
|
|
63
|
+
# the Events to read. Returns only the Events that pertain to the specified
|
|
64
|
+
# Worker.
|
|
65
|
+
# @param [String] workflow_sid Optional parameter: The SID of the Workflow
|
|
66
|
+
# with the Events to read. Returns only the Events that pertain to the
|
|
67
|
+
# specified Workflow.
|
|
68
|
+
# @param [String] task_channel Optional parameter: The TaskChannel with the
|
|
69
|
+
# Events to read. Returns only the Events that pertain to the specified
|
|
70
|
+
# TaskChannel.
|
|
71
|
+
# @param [String] sid Optional parameter: The SID of the Event resource to
|
|
72
|
+
# read.
|
|
73
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
74
|
+
# return in each list page. The default is 50, and the maximum is 1000.
|
|
75
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
76
|
+
# simply for client state.
|
|
77
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
78
|
+
# provided by the API.
|
|
79
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
80
|
+
def list_event(workspace_sid,
|
|
81
|
+
end_date: nil,
|
|
82
|
+
event_type: nil,
|
|
83
|
+
minutes: nil,
|
|
84
|
+
reservation_sid: nil,
|
|
85
|
+
start_date: nil,
|
|
86
|
+
task_queue_sid: nil,
|
|
87
|
+
task_sid: nil,
|
|
88
|
+
worker_sid: nil,
|
|
89
|
+
workflow_sid: nil,
|
|
90
|
+
task_channel: nil,
|
|
91
|
+
sid: nil,
|
|
92
|
+
page_size: nil,
|
|
93
|
+
page: nil,
|
|
94
|
+
page_token: nil)
|
|
95
|
+
@api_call
|
|
96
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
97
|
+
'/v1/Workspaces/{WorkspaceSid}/Events',
|
|
98
|
+
Server::DEFAULT4)
|
|
99
|
+
.template_param(new_parameter(workspace_sid, key: 'WorkspaceSid')
|
|
100
|
+
.is_required(true)
|
|
101
|
+
.should_encode(true))
|
|
102
|
+
.query_param(new_parameter(end_date, key: 'EndDate'))
|
|
103
|
+
.query_param(new_parameter(event_type, key: 'EventType'))
|
|
104
|
+
.query_param(new_parameter(minutes, key: 'Minutes'))
|
|
105
|
+
.query_param(new_parameter(reservation_sid, key: 'ReservationSid'))
|
|
106
|
+
.query_param(new_parameter(start_date, key: 'StartDate'))
|
|
107
|
+
.query_param(new_parameter(task_queue_sid, key: 'TaskQueueSid'))
|
|
108
|
+
.query_param(new_parameter(task_sid, key: 'TaskSid'))
|
|
109
|
+
.query_param(new_parameter(worker_sid, key: 'WorkerSid'))
|
|
110
|
+
.query_param(new_parameter(workflow_sid, key: 'WorkflowSid'))
|
|
111
|
+
.query_param(new_parameter(task_channel, key: 'TaskChannel'))
|
|
112
|
+
.query_param(new_parameter(sid, key: 'Sid'))
|
|
113
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
114
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
115
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
116
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
117
|
+
.auth(Single.new('accountSid_authToken')))
|
|
118
|
+
.response(new_response_handler
|
|
119
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
120
|
+
.deserialize_into(ListEventResponse.method(:from_hash))
|
|
121
|
+
.is_api_response(true))
|
|
122
|
+
.execute
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|