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,497 @@
|
|
|
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
|
+
# ConversationsV1MessageApi
|
|
8
|
+
class ConversationsV1MessageApi < BaseApi
|
|
9
|
+
# Add a new message to the conversation
|
|
10
|
+
# @param [String] conversation_sid Required parameter: The unique ID of the
|
|
11
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
12
|
+
# resource) for this message.
|
|
13
|
+
# @param [ChannelWebhookEnabledType] x_twilio_webhook_enabled Optional
|
|
14
|
+
# parameter: The X-Twilio-Webhook-Enabled HTTP request header
|
|
15
|
+
# @param [String] author Optional parameter: The channel specific identifier
|
|
16
|
+
# of the message's author. Defaults to `system`.
|
|
17
|
+
# @param [String] body Optional parameter: The content of the message, can
|
|
18
|
+
# be up to 1,600 characters long.
|
|
19
|
+
# @param [DateTime] date_created Optional parameter: The date that this
|
|
20
|
+
# resource was created.
|
|
21
|
+
# @param [DateTime] date_updated Optional parameter: The date that this
|
|
22
|
+
# resource was last updated. `null` if the message has not been edited.
|
|
23
|
+
# @param [String] attributes Optional parameter: A string metadata field you
|
|
24
|
+
# can use to store any data you wish. The string value must contain
|
|
25
|
+
# structurally valid JSON if specified. **Note** that if the attributes are
|
|
26
|
+
# not set "{}" will be returned.
|
|
27
|
+
# @param [String] media_sid Optional parameter: The Media SID to be attached
|
|
28
|
+
# to the new Message.
|
|
29
|
+
# @param [String] content_sid Optional parameter: The unique ID of the
|
|
30
|
+
# multi-channel [Rich Content](https://www.twilio.com/docs/content)
|
|
31
|
+
# template, required for template-generated messages. **Note** that if this
|
|
32
|
+
# field is set, `Body` and `MediaSid` parameters are ignored.
|
|
33
|
+
# @param [String] content_variables Optional parameter: A structurally valid
|
|
34
|
+
# JSON string that contains values to resolve Rich Content template
|
|
35
|
+
# variables.
|
|
36
|
+
# @param [String] subject Optional parameter: The subject of the message,
|
|
37
|
+
# can be up to 256 characters long.
|
|
38
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
39
|
+
def create_conversation_message(conversation_sid,
|
|
40
|
+
x_twilio_webhook_enabled: nil,
|
|
41
|
+
author: nil,
|
|
42
|
+
body: nil,
|
|
43
|
+
date_created: nil,
|
|
44
|
+
date_updated: nil,
|
|
45
|
+
attributes: nil,
|
|
46
|
+
media_sid: nil,
|
|
47
|
+
content_sid: nil,
|
|
48
|
+
content_variables: nil,
|
|
49
|
+
subject: nil)
|
|
50
|
+
@api_call
|
|
51
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
52
|
+
'/v1/Conversations/{ConversationSid}/Messages',
|
|
53
|
+
Server::DEFAULT2)
|
|
54
|
+
.template_param(new_parameter(conversation_sid, key: 'ConversationSid')
|
|
55
|
+
.is_required(true)
|
|
56
|
+
.should_encode(true))
|
|
57
|
+
.header_param(new_parameter(x_twilio_webhook_enabled, key: 'X-Twilio-Webhook-Enabled'))
|
|
58
|
+
.form_param(new_parameter(author, key: 'Author'))
|
|
59
|
+
.form_param(new_parameter(body, key: 'Body'))
|
|
60
|
+
.form_param(new_parameter(date_created, key: 'DateCreated'))
|
|
61
|
+
.form_param(new_parameter(date_updated, key: 'DateUpdated'))
|
|
62
|
+
.form_param(new_parameter(attributes, key: 'Attributes'))
|
|
63
|
+
.form_param(new_parameter(media_sid, key: 'MediaSid'))
|
|
64
|
+
.form_param(new_parameter(content_sid, key: 'ContentSid'))
|
|
65
|
+
.form_param(new_parameter(content_variables, key: 'ContentVariables'))
|
|
66
|
+
.form_param(new_parameter(subject, key: 'Subject'))
|
|
67
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
68
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
69
|
+
.auth(Single.new('accountSid_authToken')))
|
|
70
|
+
.response(new_response_handler
|
|
71
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
72
|
+
.deserialize_into(ConversationMessage.method(:from_hash))
|
|
73
|
+
.is_api_response(true))
|
|
74
|
+
.execute
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Retrieve a list of all messages in the conversation
|
|
78
|
+
# @param [String] conversation_sid Required parameter: The unique ID of the
|
|
79
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
80
|
+
# resource) for messages.
|
|
81
|
+
# @param [ConversationMessageOrderType] order Optional parameter: The sort
|
|
82
|
+
# order of the returned messages. Can be: `asc` (ascending) or `desc`
|
|
83
|
+
# (descending), with `asc` as the default.
|
|
84
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
85
|
+
# return in each list page. The default is 50, and the maximum is 100.
|
|
86
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
87
|
+
# simply for client state.
|
|
88
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
89
|
+
# provided by the API.
|
|
90
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
91
|
+
def list_conversation_message(conversation_sid,
|
|
92
|
+
order: nil,
|
|
93
|
+
page_size: nil,
|
|
94
|
+
page: nil,
|
|
95
|
+
page_token: nil)
|
|
96
|
+
@api_call
|
|
97
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
98
|
+
'/v1/Conversations/{ConversationSid}/Messages',
|
|
99
|
+
Server::DEFAULT2)
|
|
100
|
+
.template_param(new_parameter(conversation_sid, key: 'ConversationSid')
|
|
101
|
+
.is_required(true)
|
|
102
|
+
.should_encode(true))
|
|
103
|
+
.query_param(new_parameter(order, key: 'Order'))
|
|
104
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
105
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
106
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
107
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
108
|
+
.auth(Single.new('accountSid_authToken')))
|
|
109
|
+
.response(new_response_handler
|
|
110
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
111
|
+
.deserialize_into(ListConversationMessageResponse.method(:from_hash))
|
|
112
|
+
.is_api_response(true))
|
|
113
|
+
.execute
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Update an existing message in the conversation
|
|
117
|
+
# @param [String] conversation_sid Required parameter: The unique ID of the
|
|
118
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
119
|
+
# resource) for this message.
|
|
120
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
121
|
+
# uniquely identifies this resource.
|
|
122
|
+
# @param [ChannelWebhookEnabledType] x_twilio_webhook_enabled Optional
|
|
123
|
+
# parameter: The X-Twilio-Webhook-Enabled HTTP request header
|
|
124
|
+
# @param [String] author Optional parameter: The channel specific identifier
|
|
125
|
+
# of the message's author. Defaults to `system`.
|
|
126
|
+
# @param [String] body Optional parameter: The content of the message, can
|
|
127
|
+
# be up to 1,600 characters long.
|
|
128
|
+
# @param [DateTime] date_created Optional parameter: The date that this
|
|
129
|
+
# resource was created.
|
|
130
|
+
# @param [DateTime] date_updated Optional parameter: The date that this
|
|
131
|
+
# resource was last updated. `null` if the message has not been edited.
|
|
132
|
+
# @param [String] attributes Optional parameter: A string metadata field you
|
|
133
|
+
# can use to store any data you wish. The string value must contain
|
|
134
|
+
# structurally valid JSON if specified. **Note** that if the attributes are
|
|
135
|
+
# not set "{}" will be returned.
|
|
136
|
+
# @param [String] subject Optional parameter: The subject of the message,
|
|
137
|
+
# can be up to 256 characters long.
|
|
138
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
139
|
+
def update_conversation_message(conversation_sid,
|
|
140
|
+
sid,
|
|
141
|
+
x_twilio_webhook_enabled: nil,
|
|
142
|
+
author: nil,
|
|
143
|
+
body: nil,
|
|
144
|
+
date_created: nil,
|
|
145
|
+
date_updated: nil,
|
|
146
|
+
attributes: nil,
|
|
147
|
+
subject: nil)
|
|
148
|
+
@api_call
|
|
149
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
150
|
+
'/v1/Conversations/{ConversationSid}/Messages/{Sid}',
|
|
151
|
+
Server::DEFAULT2)
|
|
152
|
+
.template_param(new_parameter(conversation_sid, key: 'ConversationSid')
|
|
153
|
+
.is_required(true)
|
|
154
|
+
.should_encode(true))
|
|
155
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
156
|
+
.is_required(true)
|
|
157
|
+
.should_encode(true))
|
|
158
|
+
.header_param(new_parameter(x_twilio_webhook_enabled, key: 'X-Twilio-Webhook-Enabled'))
|
|
159
|
+
.form_param(new_parameter(author, key: 'Author'))
|
|
160
|
+
.form_param(new_parameter(body, key: 'Body'))
|
|
161
|
+
.form_param(new_parameter(date_created, key: 'DateCreated'))
|
|
162
|
+
.form_param(new_parameter(date_updated, key: 'DateUpdated'))
|
|
163
|
+
.form_param(new_parameter(attributes, key: 'Attributes'))
|
|
164
|
+
.form_param(new_parameter(subject, key: 'Subject'))
|
|
165
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
166
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
167
|
+
.auth(Single.new('accountSid_authToken')))
|
|
168
|
+
.response(new_response_handler
|
|
169
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
170
|
+
.deserialize_into(ConversationMessage.method(:from_hash))
|
|
171
|
+
.is_api_response(true))
|
|
172
|
+
.execute
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Remove a message from the conversation
|
|
176
|
+
# @param [String] conversation_sid Required parameter: The unique ID of the
|
|
177
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
178
|
+
# resource) for this message.
|
|
179
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
180
|
+
# uniquely identifies this resource.
|
|
181
|
+
# @param [ChannelWebhookEnabledType] x_twilio_webhook_enabled Optional
|
|
182
|
+
# parameter: The X-Twilio-Webhook-Enabled HTTP request header
|
|
183
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
184
|
+
def delete_conversation_message(conversation_sid,
|
|
185
|
+
sid,
|
|
186
|
+
x_twilio_webhook_enabled: nil)
|
|
187
|
+
@api_call
|
|
188
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
189
|
+
'/v1/Conversations/{ConversationSid}/Messages/{Sid}',
|
|
190
|
+
Server::DEFAULT2)
|
|
191
|
+
.template_param(new_parameter(conversation_sid, key: 'ConversationSid')
|
|
192
|
+
.is_required(true)
|
|
193
|
+
.should_encode(true))
|
|
194
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
195
|
+
.is_required(true)
|
|
196
|
+
.should_encode(true))
|
|
197
|
+
.header_param(new_parameter(x_twilio_webhook_enabled, key: 'X-Twilio-Webhook-Enabled'))
|
|
198
|
+
.auth(Single.new('accountSid_authToken')))
|
|
199
|
+
.response(new_response_handler
|
|
200
|
+
.is_response_void(true)
|
|
201
|
+
.is_api_response(true))
|
|
202
|
+
.execute
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Fetch a message from the conversation
|
|
206
|
+
# @param [String] conversation_sid Required parameter: The unique ID of the
|
|
207
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
208
|
+
# resource) for this message.
|
|
209
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
210
|
+
# uniquely identifies this resource.
|
|
211
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
212
|
+
def fetch_conversation_message(conversation_sid,
|
|
213
|
+
sid)
|
|
214
|
+
@api_call
|
|
215
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
216
|
+
'/v1/Conversations/{ConversationSid}/Messages/{Sid}',
|
|
217
|
+
Server::DEFAULT2)
|
|
218
|
+
.template_param(new_parameter(conversation_sid, key: 'ConversationSid')
|
|
219
|
+
.is_required(true)
|
|
220
|
+
.should_encode(true))
|
|
221
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
222
|
+
.is_required(true)
|
|
223
|
+
.should_encode(true))
|
|
224
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
225
|
+
.auth(Single.new('accountSid_authToken')))
|
|
226
|
+
.response(new_response_handler
|
|
227
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
228
|
+
.deserialize_into(ConversationMessage.method(:from_hash))
|
|
229
|
+
.is_api_response(true))
|
|
230
|
+
.execute
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Add a new message to the conversation in a specific service
|
|
234
|
+
# @param [String] chat_service_sid Required parameter: The SID of the
|
|
235
|
+
# [Conversation
|
|
236
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
237
|
+
# the Participant resource is associated with.
|
|
238
|
+
# @param [String] conversation_sid Required parameter: The unique ID of the
|
|
239
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
240
|
+
# resource) for this message.
|
|
241
|
+
# @param [ChannelWebhookEnabledType] x_twilio_webhook_enabled Optional
|
|
242
|
+
# parameter: The X-Twilio-Webhook-Enabled HTTP request header
|
|
243
|
+
# @param [String] author Optional parameter: The channel specific identifier
|
|
244
|
+
# of the message's author. Defaults to `system`.
|
|
245
|
+
# @param [String] body Optional parameter: The content of the message, can
|
|
246
|
+
# be up to 1,600 characters long.
|
|
247
|
+
# @param [DateTime] date_created Optional parameter: The date that this
|
|
248
|
+
# resource was created.
|
|
249
|
+
# @param [DateTime] date_updated Optional parameter: The date that this
|
|
250
|
+
# resource was last updated. `null` if the message has not been edited.
|
|
251
|
+
# @param [String] attributes Optional parameter: A string metadata field you
|
|
252
|
+
# can use to store any data you wish. The string value must contain
|
|
253
|
+
# structurally valid JSON if specified. **Note** that if the attributes are
|
|
254
|
+
# not set "{}" will be returned.
|
|
255
|
+
# @param [String] media_sid Optional parameter: The Media SID to be attached
|
|
256
|
+
# to the new Message.
|
|
257
|
+
# @param [String] content_sid Optional parameter: The unique ID of the
|
|
258
|
+
# multi-channel [Rich Content](https://www.twilio.com/docs/content)
|
|
259
|
+
# template, required for template-generated messages. **Note** that if this
|
|
260
|
+
# field is set, `Body` and `MediaSid` parameters are ignored.
|
|
261
|
+
# @param [String] content_variables Optional parameter: A structurally valid
|
|
262
|
+
# JSON string that contains values to resolve Rich Content template
|
|
263
|
+
# variables.
|
|
264
|
+
# @param [String] subject Optional parameter: The subject of the message,
|
|
265
|
+
# can be up to 256 characters long.
|
|
266
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
267
|
+
def create_service_conversation_message(chat_service_sid,
|
|
268
|
+
conversation_sid,
|
|
269
|
+
x_twilio_webhook_enabled: nil,
|
|
270
|
+
author: nil,
|
|
271
|
+
body: nil,
|
|
272
|
+
date_created: nil,
|
|
273
|
+
date_updated: nil,
|
|
274
|
+
attributes: nil,
|
|
275
|
+
media_sid: nil,
|
|
276
|
+
content_sid: nil,
|
|
277
|
+
content_variables: nil,
|
|
278
|
+
subject: nil)
|
|
279
|
+
@api_call
|
|
280
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
281
|
+
'/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages',
|
|
282
|
+
Server::DEFAULT2)
|
|
283
|
+
.template_param(new_parameter(chat_service_sid, key: 'ChatServiceSid')
|
|
284
|
+
.is_required(true)
|
|
285
|
+
.should_encode(true))
|
|
286
|
+
.template_param(new_parameter(conversation_sid, key: 'ConversationSid')
|
|
287
|
+
.is_required(true)
|
|
288
|
+
.should_encode(true))
|
|
289
|
+
.header_param(new_parameter(x_twilio_webhook_enabled, key: 'X-Twilio-Webhook-Enabled'))
|
|
290
|
+
.form_param(new_parameter(author, key: 'Author'))
|
|
291
|
+
.form_param(new_parameter(body, key: 'Body'))
|
|
292
|
+
.form_param(new_parameter(date_created, key: 'DateCreated'))
|
|
293
|
+
.form_param(new_parameter(date_updated, key: 'DateUpdated'))
|
|
294
|
+
.form_param(new_parameter(attributes, key: 'Attributes'))
|
|
295
|
+
.form_param(new_parameter(media_sid, key: 'MediaSid'))
|
|
296
|
+
.form_param(new_parameter(content_sid, key: 'ContentSid'))
|
|
297
|
+
.form_param(new_parameter(content_variables, key: 'ContentVariables'))
|
|
298
|
+
.form_param(new_parameter(subject, key: 'Subject'))
|
|
299
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
300
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
301
|
+
.auth(Single.new('accountSid_authToken')))
|
|
302
|
+
.response(new_response_handler
|
|
303
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
304
|
+
.deserialize_into(ServiceConversationMessage.method(:from_hash))
|
|
305
|
+
.is_api_response(true))
|
|
306
|
+
.execute
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# Retrieve a list of all messages in the conversation
|
|
310
|
+
# @param [String] chat_service_sid Required parameter: The SID of the
|
|
311
|
+
# [Conversation
|
|
312
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
313
|
+
# the Participant resource is associated with.
|
|
314
|
+
# @param [String] conversation_sid Required parameter: The unique ID of the
|
|
315
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
316
|
+
# resource) for messages.
|
|
317
|
+
# @param [ServiceConversationMessageOrderType] order Optional parameter: The
|
|
318
|
+
# sort order of the returned messages. Can be: `asc` (ascending) or `desc`
|
|
319
|
+
# (descending), with `asc` as the default.
|
|
320
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
321
|
+
# return in each list page. The default is 50, and the maximum is 100.
|
|
322
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
323
|
+
# simply for client state.
|
|
324
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
325
|
+
# provided by the API.
|
|
326
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
327
|
+
def list_service_conversation_message(chat_service_sid,
|
|
328
|
+
conversation_sid,
|
|
329
|
+
order: nil,
|
|
330
|
+
page_size: nil,
|
|
331
|
+
page: nil,
|
|
332
|
+
page_token: nil)
|
|
333
|
+
@api_call
|
|
334
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
335
|
+
'/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages',
|
|
336
|
+
Server::DEFAULT2)
|
|
337
|
+
.template_param(new_parameter(chat_service_sid, key: 'ChatServiceSid')
|
|
338
|
+
.is_required(true)
|
|
339
|
+
.should_encode(true))
|
|
340
|
+
.template_param(new_parameter(conversation_sid, key: 'ConversationSid')
|
|
341
|
+
.is_required(true)
|
|
342
|
+
.should_encode(true))
|
|
343
|
+
.query_param(new_parameter(order, key: 'Order'))
|
|
344
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
345
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
346
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
347
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
348
|
+
.auth(Single.new('accountSid_authToken')))
|
|
349
|
+
.response(new_response_handler
|
|
350
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
351
|
+
.deserialize_into(ListServiceConversationMessageResponse.method(:from_hash))
|
|
352
|
+
.is_api_response(true))
|
|
353
|
+
.execute
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# Update an existing message in the conversation
|
|
357
|
+
# @param [String] chat_service_sid Required parameter: The SID of the
|
|
358
|
+
# [Conversation
|
|
359
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
360
|
+
# the Participant resource is associated with.
|
|
361
|
+
# @param [String] conversation_sid Required parameter: The unique ID of the
|
|
362
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
363
|
+
# resource) for this message.
|
|
364
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
365
|
+
# uniquely identifies this resource.
|
|
366
|
+
# @param [ChannelWebhookEnabledType] x_twilio_webhook_enabled Optional
|
|
367
|
+
# parameter: The X-Twilio-Webhook-Enabled HTTP request header
|
|
368
|
+
# @param [String] author Optional parameter: The channel specific identifier
|
|
369
|
+
# of the message's author. Defaults to `system`.
|
|
370
|
+
# @param [String] body Optional parameter: The content of the message, can
|
|
371
|
+
# be up to 1,600 characters long.
|
|
372
|
+
# @param [DateTime] date_created Optional parameter: The date that this
|
|
373
|
+
# resource was created.
|
|
374
|
+
# @param [DateTime] date_updated Optional parameter: The date that this
|
|
375
|
+
# resource was last updated. `null` if the message has not been edited.
|
|
376
|
+
# @param [String] attributes Optional parameter: A string metadata field you
|
|
377
|
+
# can use to store any data you wish. The string value must contain
|
|
378
|
+
# structurally valid JSON if specified. **Note** that if the attributes are
|
|
379
|
+
# not set "{}" will be returned.
|
|
380
|
+
# @param [String] subject Optional parameter: The subject of the message,
|
|
381
|
+
# can be up to 256 characters long.
|
|
382
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
383
|
+
def update_service_conversation_message(chat_service_sid,
|
|
384
|
+
conversation_sid,
|
|
385
|
+
sid,
|
|
386
|
+
x_twilio_webhook_enabled: nil,
|
|
387
|
+
author: nil,
|
|
388
|
+
body: nil,
|
|
389
|
+
date_created: nil,
|
|
390
|
+
date_updated: nil,
|
|
391
|
+
attributes: nil,
|
|
392
|
+
subject: nil)
|
|
393
|
+
@api_call
|
|
394
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
395
|
+
'/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}',
|
|
396
|
+
Server::DEFAULT2)
|
|
397
|
+
.template_param(new_parameter(chat_service_sid, key: 'ChatServiceSid')
|
|
398
|
+
.is_required(true)
|
|
399
|
+
.should_encode(true))
|
|
400
|
+
.template_param(new_parameter(conversation_sid, key: 'ConversationSid')
|
|
401
|
+
.is_required(true)
|
|
402
|
+
.should_encode(true))
|
|
403
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
404
|
+
.is_required(true)
|
|
405
|
+
.should_encode(true))
|
|
406
|
+
.header_param(new_parameter(x_twilio_webhook_enabled, key: 'X-Twilio-Webhook-Enabled'))
|
|
407
|
+
.form_param(new_parameter(author, key: 'Author'))
|
|
408
|
+
.form_param(new_parameter(body, key: 'Body'))
|
|
409
|
+
.form_param(new_parameter(date_created, key: 'DateCreated'))
|
|
410
|
+
.form_param(new_parameter(date_updated, key: 'DateUpdated'))
|
|
411
|
+
.form_param(new_parameter(attributes, key: 'Attributes'))
|
|
412
|
+
.form_param(new_parameter(subject, key: 'Subject'))
|
|
413
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
414
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
415
|
+
.auth(Single.new('accountSid_authToken')))
|
|
416
|
+
.response(new_response_handler
|
|
417
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
418
|
+
.deserialize_into(ServiceConversationMessage.method(:from_hash))
|
|
419
|
+
.is_api_response(true))
|
|
420
|
+
.execute
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
# Remove a message from the conversation
|
|
424
|
+
# @param [String] chat_service_sid Required parameter: The SID of the
|
|
425
|
+
# [Conversation
|
|
426
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
427
|
+
# the Participant resource is associated with.
|
|
428
|
+
# @param [String] conversation_sid Required parameter: The unique ID of the
|
|
429
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
430
|
+
# resource) for this message.
|
|
431
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
432
|
+
# uniquely identifies this resource.
|
|
433
|
+
# @param [ChannelWebhookEnabledType] x_twilio_webhook_enabled Optional
|
|
434
|
+
# parameter: The X-Twilio-Webhook-Enabled HTTP request header
|
|
435
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
436
|
+
def delete_service_conversation_message(chat_service_sid,
|
|
437
|
+
conversation_sid,
|
|
438
|
+
sid,
|
|
439
|
+
x_twilio_webhook_enabled: nil)
|
|
440
|
+
@api_call
|
|
441
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
442
|
+
'/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}',
|
|
443
|
+
Server::DEFAULT2)
|
|
444
|
+
.template_param(new_parameter(chat_service_sid, key: 'ChatServiceSid')
|
|
445
|
+
.is_required(true)
|
|
446
|
+
.should_encode(true))
|
|
447
|
+
.template_param(new_parameter(conversation_sid, key: 'ConversationSid')
|
|
448
|
+
.is_required(true)
|
|
449
|
+
.should_encode(true))
|
|
450
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
451
|
+
.is_required(true)
|
|
452
|
+
.should_encode(true))
|
|
453
|
+
.header_param(new_parameter(x_twilio_webhook_enabled, key: 'X-Twilio-Webhook-Enabled'))
|
|
454
|
+
.auth(Single.new('accountSid_authToken')))
|
|
455
|
+
.response(new_response_handler
|
|
456
|
+
.is_response_void(true)
|
|
457
|
+
.is_api_response(true))
|
|
458
|
+
.execute
|
|
459
|
+
end
|
|
460
|
+
|
|
461
|
+
# Fetch a message from the conversation
|
|
462
|
+
# @param [String] chat_service_sid Required parameter: The SID of the
|
|
463
|
+
# [Conversation
|
|
464
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
465
|
+
# the Participant resource is associated with.
|
|
466
|
+
# @param [String] conversation_sid Required parameter: The unique ID of the
|
|
467
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
468
|
+
# resource) for this message.
|
|
469
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
470
|
+
# uniquely identifies this resource.
|
|
471
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
472
|
+
def fetch_service_conversation_message(chat_service_sid,
|
|
473
|
+
conversation_sid,
|
|
474
|
+
sid)
|
|
475
|
+
@api_call
|
|
476
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
477
|
+
'/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}',
|
|
478
|
+
Server::DEFAULT2)
|
|
479
|
+
.template_param(new_parameter(chat_service_sid, key: 'ChatServiceSid')
|
|
480
|
+
.is_required(true)
|
|
481
|
+
.should_encode(true))
|
|
482
|
+
.template_param(new_parameter(conversation_sid, key: 'ConversationSid')
|
|
483
|
+
.is_required(true)
|
|
484
|
+
.should_encode(true))
|
|
485
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
486
|
+
.is_required(true)
|
|
487
|
+
.should_encode(true))
|
|
488
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
489
|
+
.auth(Single.new('accountSid_authToken')))
|
|
490
|
+
.response(new_response_handler
|
|
491
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
492
|
+
.deserialize_into(ServiceConversationMessage.method(:from_hash))
|
|
493
|
+
.is_api_response(true))
|
|
494
|
+
.execute
|
|
495
|
+
end
|
|
496
|
+
end
|
|
497
|
+
end
|
|
@@ -0,0 +1,124 @@
|
|
|
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
|
+
# ConversationsV1NotificationApi
|
|
8
|
+
class ConversationsV1NotificationApi < BaseApi
|
|
9
|
+
# Update push notification service settings
|
|
10
|
+
# @param [String] chat_service_sid Required parameter: The SID of the
|
|
11
|
+
# [Conversation
|
|
12
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
13
|
+
# the Configuration applies to.
|
|
14
|
+
# @param [TrueClass | FalseClass] log_enabled Optional parameter: Weather
|
|
15
|
+
# the notification logging is enabled.
|
|
16
|
+
# @param [TrueClass | FalseClass] new_message_enabled Optional parameter:
|
|
17
|
+
# Whether to send a notification when a new message is added to a
|
|
18
|
+
# conversation. The default is `false`.
|
|
19
|
+
# @param [String] new_message_template Optional parameter: The template to
|
|
20
|
+
# use to create the notification text displayed when a new message is added
|
|
21
|
+
# to a conversation and `new_message.enabled` is `true`.
|
|
22
|
+
# @param [String] new_message_sound Optional parameter: The name of the
|
|
23
|
+
# sound to play when a new message is added to a conversation and
|
|
24
|
+
# `new_message.enabled` is `true`.
|
|
25
|
+
# @param [TrueClass | FalseClass] new_message_badge_count_enabled Optional
|
|
26
|
+
# parameter: Whether the new message badge is enabled. The default is
|
|
27
|
+
# `false`.
|
|
28
|
+
# @param [TrueClass | FalseClass] added_to_conversation_enabled Optional
|
|
29
|
+
# parameter: Whether to send a notification when a participant is added to a
|
|
30
|
+
# conversation. The default is `false`.
|
|
31
|
+
# @param [String] added_to_conversation_template Optional parameter: The
|
|
32
|
+
# template to use to create the notification text displayed when a
|
|
33
|
+
# participant is added to a conversation and `added_to_conversation.enabled`
|
|
34
|
+
# is `true`.
|
|
35
|
+
# @param [String] added_to_conversation_sound Optional parameter: The name
|
|
36
|
+
# of the sound to play when a participant is added to a conversation and
|
|
37
|
+
# `added_to_conversation.enabled` is `true`.
|
|
38
|
+
# @param [TrueClass | FalseClass] removed_from_conversation_enabled Optional
|
|
39
|
+
# parameter: Whether to send a notification to a user when they are removed
|
|
40
|
+
# from a conversation. The default is `false`.
|
|
41
|
+
# @param [String] removed_from_conversation_template Optional parameter: The
|
|
42
|
+
# template to use to create the notification text displayed to a user when
|
|
43
|
+
# they are removed from a conversation and
|
|
44
|
+
# `removed_from_conversation.enabled` is `true`.
|
|
45
|
+
# @param [String] removed_from_conversation_sound Optional parameter: The
|
|
46
|
+
# name of the sound to play to a user when they are removed from a
|
|
47
|
+
# conversation and `removed_from_conversation.enabled` is `true`.
|
|
48
|
+
# @param [TrueClass | FalseClass] new_message_with_media_enabled Optional
|
|
49
|
+
# parameter: Whether to send a notification when a new message with
|
|
50
|
+
# media/file attachments is added to a conversation. The default is
|
|
51
|
+
# `false`.
|
|
52
|
+
# @param [String] new_message_with_media_template Optional parameter: The
|
|
53
|
+
# template to use to create the notification text displayed when a new
|
|
54
|
+
# message with media/file attachments is added to a conversation and
|
|
55
|
+
# `new_message.attachments.enabled` is `true`.
|
|
56
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
57
|
+
def update_service_notification(chat_service_sid,
|
|
58
|
+
log_enabled: nil,
|
|
59
|
+
new_message_enabled: nil,
|
|
60
|
+
new_message_template: nil,
|
|
61
|
+
new_message_sound: nil,
|
|
62
|
+
new_message_badge_count_enabled: nil,
|
|
63
|
+
added_to_conversation_enabled: nil,
|
|
64
|
+
added_to_conversation_template: nil,
|
|
65
|
+
added_to_conversation_sound: nil,
|
|
66
|
+
removed_from_conversation_enabled: nil,
|
|
67
|
+
removed_from_conversation_template: nil,
|
|
68
|
+
removed_from_conversation_sound: nil,
|
|
69
|
+
new_message_with_media_enabled: nil,
|
|
70
|
+
new_message_with_media_template: nil)
|
|
71
|
+
@api_call
|
|
72
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
73
|
+
'/v1/Services/{ChatServiceSid}/Configuration/Notifications',
|
|
74
|
+
Server::DEFAULT2)
|
|
75
|
+
.template_param(new_parameter(chat_service_sid, key: 'ChatServiceSid')
|
|
76
|
+
.is_required(true)
|
|
77
|
+
.should_encode(true))
|
|
78
|
+
.form_param(new_parameter(log_enabled, key: 'LogEnabled'))
|
|
79
|
+
.form_param(new_parameter(new_message_enabled, key: 'NewMessage.Enabled'))
|
|
80
|
+
.form_param(new_parameter(new_message_template, key: 'NewMessage.Template'))
|
|
81
|
+
.form_param(new_parameter(new_message_sound, key: 'NewMessage.Sound'))
|
|
82
|
+
.form_param(new_parameter(new_message_badge_count_enabled, key: 'NewMessage.BadgeCountEnabled'))
|
|
83
|
+
.form_param(new_parameter(added_to_conversation_enabled, key: 'AddedToConversation.Enabled'))
|
|
84
|
+
.form_param(new_parameter(added_to_conversation_template, key: 'AddedToConversation.Template'))
|
|
85
|
+
.form_param(new_parameter(added_to_conversation_sound, key: 'AddedToConversation.Sound'))
|
|
86
|
+
.form_param(new_parameter(removed_from_conversation_enabled, key: 'RemovedFromConversation.Enabled'))
|
|
87
|
+
.form_param(new_parameter(removed_from_conversation_template, key: 'RemovedFromConversation.Template'))
|
|
88
|
+
.form_param(new_parameter(removed_from_conversation_sound, key: 'RemovedFromConversation.Sound'))
|
|
89
|
+
.form_param(new_parameter(new_message_with_media_enabled, key: 'NewMessage.WithMedia.Enabled'))
|
|
90
|
+
.form_param(new_parameter(new_message_with_media_template, key: 'NewMessage.WithMedia.Template'))
|
|
91
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
92
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
93
|
+
.auth(Single.new('accountSid_authToken')))
|
|
94
|
+
.response(new_response_handler
|
|
95
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
96
|
+
.deserialize_into(ServiceNotification.method(:from_hash))
|
|
97
|
+
.is_api_response(true))
|
|
98
|
+
.execute
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Fetch push notification service settings
|
|
102
|
+
# @param [String] chat_service_sid Required parameter: The SID of the
|
|
103
|
+
# [Conversation
|
|
104
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
105
|
+
# the Configuration applies to.
|
|
106
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
107
|
+
def fetch_service_notification(chat_service_sid)
|
|
108
|
+
@api_call
|
|
109
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
110
|
+
'/v1/Services/{ChatServiceSid}/Configuration/Notifications',
|
|
111
|
+
Server::DEFAULT2)
|
|
112
|
+
.template_param(new_parameter(chat_service_sid, key: 'ChatServiceSid')
|
|
113
|
+
.is_required(true)
|
|
114
|
+
.should_encode(true))
|
|
115
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
116
|
+
.auth(Single.new('accountSid_authToken')))
|
|
117
|
+
.response(new_response_handler
|
|
118
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
119
|
+
.deserialize_into(ServiceNotification.method(:from_hash))
|
|
120
|
+
.is_api_response(true))
|
|
121
|
+
.execute
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
end
|